Fix for filter not working after selecting a single exercise

This commit is contained in:
Peter Stockings
2022-11-23 22:48:03 +11:00
parent 41bfce9513
commit 56ceb87867
2 changed files with 95 additions and 97 deletions

View File

@@ -3,6 +3,6 @@
{% block content %}
{{ render_partial('partials/page/dashboard.html',
people=people, exercises=exercises) }}
model=model) }}
{% endblock %}

View File

@@ -1,5 +1,4 @@
<div>
<div class="flex justify-center">
<div class="flex justify-center">
<div class="bg-white shadow rounded-lg p-4 sm:w-full xl:p-8 md:w-full lg:w-10/12 xl:w-8/12 2xl:w-6/12">
<div class="mb-4 flex items-center justify-between">
@@ -22,7 +21,7 @@
{% for e in person['Exercises'] %}
<div class="flex items-center mr-4"
hx-post="{{ url_for('filter_exercises_for_person', person_id=person['PersonId']) }}"
hx-include="[name='exercise_id']" hx-target="#container" hx-swap="outerHTML">
hx-include="[name='exercise_id']" hx-target="#container">
<input {{ is_checked(e['ExerciseId'], selected_exercise_ids) }} type="checkbox" name="exercise_id"
value="{{ e['ExerciseId'] }}"
class="w-4 h-4 text-blue-600 bg-gray-100 rounded border-gray-300 focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600">
@@ -110,7 +109,6 @@
</div>
</div>
</div>
</div>
{{ render_partial('partials/stats.html', stats=person['Stats']) }}
</div>
{{ render_partial('partials/stats.html', stats=person['Stats']) }}