feat: Bouton réinitialiser filtres historique admin (#42)

- Ajout bouton IconButton avec icône clear (X)
- Visible uniquement si au moins un filtre est actif
- Réinitialise : recherche textuelle + membre + secteur
- Remet les 2 selects à "Tous"
- Style : fond gris clair, padding 12px
- Tooltip : "Réinitialiser les filtres"

Affichage conditionnel :
isAdmin && (recherche OU membre OU secteur non vides)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-01-26 11:51:18 +01:00
parent 16b30b0e9e
commit 9c837f8adb

View File

@@ -351,6 +351,27 @@ class _HistoryContentState extends State<HistoryContent> {
child: _buildSectorDropdown(), child: _buildSectorDropdown(),
), ),
], ],
// Bouton réinitialiser les filtres
if (isAdmin && (_searchQuery.isNotEmpty || _selectedMemberId != null || _selectedSectorId != null)) ...[
const SizedBox(width: 8),
IconButton(
icon: const Icon(Icons.clear, size: 20),
tooltip: 'Réinitialiser les filtres',
onPressed: () {
setState(() {
_searchQuery = '';
_searchController.clear();
_selectedMemberId = null;
_selectedSectorId = null;
});
_applyFilters();
},
style: IconButton.styleFrom(
backgroundColor: Colors.grey[200],
padding: const EdgeInsets.all(12),
),
),
],
], ],
), ),
), ),