refactor: Rename date parsing helper functions for consistency

This commit is contained in:
Paul
2026-03-09 11:17:03 +01:00
parent bc93f3fa9a
commit 9bd4b29967
27 changed files with 70 additions and 138 deletions

View File

@@ -15,13 +15,13 @@ class ContainerProvider with ChangeNotifier {
Timer? _searchDebounceTimer;
// Liste paginée pour la page de gestion
List<ContainerModel> _paginatedContainers = [];
final List<ContainerModel> _paginatedContainers = [];
bool _hasMore = true;
bool _isLoadingMore = false;
String? _lastVisible;
// Cache complet pour compatibilité
List<ContainerModel> _containers = [];
final List<ContainerModel> _containers = [];
// Filtres et recherche
ContainerType? _selectedType;

View File

@@ -12,13 +12,13 @@ class EquipmentProvider extends ChangeNotifier {
Timer? _searchDebounceTimer;
// Liste paginée pour la page de gestion
List<EquipmentModel> _paginatedEquipment = [];
final List<EquipmentModel> _paginatedEquipment = [];
bool _hasMore = true;
bool _isLoadingMore = false;
String? _lastVisible;
// Cache complet pour getEquipmentsByIds et compatibilité
List<EquipmentModel> _equipment = [];
final List<EquipmentModel> _equipment = [];
List<String> _models = [];
List<String> _brands = [];

View File

@@ -19,7 +19,7 @@ class EventProvider with ChangeNotifier {
bool _lastCanViewAll = false;
// Nouveau: Cache par mois pour le lazy loading
Map<String, List<EventModel>> _eventsByMonth = {}; // "2026-02" => [events]
final Map<String, List<EventModel>> _eventsByMonth = {}; // "2026-02" => [events]
String? _currentMonth; // Mois actuellement affiché
List<EventModel> get events => _events;
@@ -88,7 +88,7 @@ class EventProvider with ChangeNotifier {
_lastUserId = userId;
_lastCanViewAll = canViewAllEvents;
print('Successfully loaded ${_events.length} events (${failedCount} failed)');
print('Successfully loaded ${_events.length} events ($failedCount failed)');
_isLoading = false;
notifyListeners();
@@ -176,7 +176,7 @@ class EventProvider with ChangeNotifier {
_lastUserId = userId;
_lastCanViewAll = canViewAllEvents;
print('[EventProvider] Successfully loaded ${monthEvents.length} events for $monthKey (${failedCount} failed)');
print('[EventProvider] Successfully loaded ${monthEvents.length} events for $monthKey ($failedCount failed)');
if (!silent) {
_isLoading = false;