Fix calendar data filtering for all user roles

Apply store filtering to the calendar view for all user roles, resolving issues with persistent data display after reload.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 15f19c36-9aac-46a4-a181-3dc5f496fabd
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/15f19c36-9aac-46a4-a181-3dc5f496fabd/6vGI9xw
This commit is contained in:
michaelschal committed 2025-08-20 10:03:42 +00:00
1 parent e98abae9fe
commit cca9942178
2 files changed
+3 -2

No files matched your search

+2 -1
View File
@@ -93,7 +93,8 @@ export default function Calendar() {
startDate: format(monthStart, 'yyyy-MM-dd'),
endDate: format(monthEnd, 'yyyy-MM-dd')
});
if (selectedStoreId && user?.role === 'admin') {
// CRITICAL FIX: Appliquer le filtrage par storeId pour TOUS les rôles, pas seulement admin
if (selectedStoreId) {
params.append('storeId', selectedStoreId.toString());
}
+1 -1
View File
@@ -34,7 +34,7 @@ The platform is built with a clear separation of concerns, utilizing a modern fu
- **Weather Integration:** A comprehensive weather interface displaying detailed conditions from the Visual Crossing API, with French language support, intelligent date comparison, and automatic geolocation detection.
- **Order and Delivery Management:** Full CRUD operations for orders and deliveries, including linking orders to deliveries and managing their statuses.
- **Reconciliation:** Functionality for reconciling Bills of Lading (BL) and invoices with immediate UI updates.
- **Task Management:** A comprehensive task management system with advanced temporal features, intelligent sorting (pending > priority > date), due dates with calendar selector, visual indicators for overdue/urgent tasks, filters by due date, Kanban and list views, and colored badges for temporal status. Includes start dates with role-based visibility.
- **Task Management:** A comprehensive task management system with advanced temporal features, intelligent sorting (pending > priority > date), due dates with calendar selector, visual indicators for overdue/urgent tasks, filters by due date, Kanban and list views, and colored badges for temporal status. Includes start dates with role-based visibility. **CRITICAL GROUP FILTERING FIX (August 2025)**: Fixed group selection persistence issues - all pages (Tasks, Orders, Deliveries, Calendar) now properly apply selectedStoreId filtering for ALL user roles, not just admin. Prevents mixed data display after page reload.
- **Information System (Announcements):** A complete announcement system with priority levels (normal, important, urgent), role-based access control (admin: full CRUD; others: read-only), intelligent sorting by priority and date, and store-based filtering for administrators. Includes an automatic dashboard modal for recent announcements.
- **DLC Module:** Permissions allow admin, director, and manager roles to validate DLC products. Includes explanatory tooltips for UX enhancement.
- **Reporting:** Statistical reporting, including monthly summaries of deliveries.