Fix calendar view to correctly filter stores for all user roles

Adjusted the calendar page logic to apply store filtering for all user roles, not just administrators.

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/s75PPM5
This commit is contained in:
michaelschal committed 2025-08-20 10:00:03 +00:00
1 parent 9dbb5e0768
commit e98abae9fe
1 file changed
+2 -1
+2 -1
View File
@@ -44,7 +44,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());
}