From 9c837f8adb3e1d56cb1358c9bd92ca3f6adbd6ca Mon Sep 17 00:00:00 2001 From: Pierre Date: Mon, 26 Jan 2026 11:51:18 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20Bouton=20r=C3=A9initialiser=20filtres?= =?UTF-8?q?=20historique=20admin=20(#42)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- app/lib/presentation/pages/history_page.dart | 21 ++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/app/lib/presentation/pages/history_page.dart b/app/lib/presentation/pages/history_page.dart index 2d58784a..0a7986c2 100755 --- a/app/lib/presentation/pages/history_page.dart +++ b/app/lib/presentation/pages/history_page.dart @@ -351,6 +351,27 @@ class _HistoryContentState extends State { 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), + ), + ), + ], ], ), ),