feat: improve assessments filters and cleaning
This commit is contained in:
@@ -52,6 +52,16 @@
|
||||
'label': 'Classe',
|
||||
'options': class_options
|
||||
},
|
||||
{
|
||||
'id': 'correction-filter',
|
||||
'label': 'Correction',
|
||||
'options': [
|
||||
{'value': '', 'label': 'Toutes'},
|
||||
{'value': 'incomplete', 'label': 'Non terminées'},
|
||||
{'value': 'complete', 'label': 'Terminées'},
|
||||
{'value': 'not_started', 'label': 'Non commencées'}
|
||||
]
|
||||
},
|
||||
{
|
||||
'id': 'sort-filter',
|
||||
'label': 'Tri',
|
||||
@@ -64,7 +74,7 @@
|
||||
}
|
||||
] %}
|
||||
|
||||
{% call filter_section(filters, {'trimester-filter': current_trimester, 'class-filter': current_class, 'sort-filter': current_sort}) %}
|
||||
{% call filter_section(filters, {'trimester-filter': current_trimester, 'class-filter': current_class, 'correction-filter': current_correction, 'sort-filter': current_sort}) %}
|
||||
<div class="flex items-center space-x-4">
|
||||
<div class="text-sm text-gray-500 font-medium">
|
||||
{{ assessments|length }} évaluation(s)
|
||||
|
||||
@@ -191,7 +191,7 @@
|
||||
{% for filter in filters %}
|
||||
<div class="flex items-center space-x-2">
|
||||
<label class="text-sm font-medium text-gray-700">{{ filter.label }} :</label>
|
||||
<select data-filter="{{ filter.id.replace('-filter', '') }}" class="filter-control">
|
||||
<select data-filter="{{ filter.id.replace('-filter', '') }}" class="filter-control border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white shadow-sm hover:border-gray-400 transition-colors">
|
||||
{% for option in filter.options %}
|
||||
<option value="{{ option.value }}" {% if current_values.get(filter.id) == option.value %}selected{% endif %}>
|
||||
{{ option.label }}
|
||||
|
||||
Reference in New Issue
Block a user