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());
}