diff --git a/client/src/pages/mobile/CalendarPage.tsx b/client/src/pages/mobile/CalendarPage.tsx index d4e9382..e30c95f 100644 --- a/client/src/pages/mobile/CalendarPage.tsx +++ b/client/src/pages/mobile/CalendarPage.tsx @@ -51,9 +51,6 @@ export default function MobileCalendarPage() { // Debug log - doit apparaître dans la console console.log('🗓️ MobileCalendarPage RENDER', { user: !!user, selectedStoreId, currentMonth: currentMonth.toISOString() }); - const monthStart = startOfMonth(currentMonth); - const monthEnd = endOfMonth(currentMonth); - // Fetch orders for current month const { data: orders = [], isLoading: loadingOrders } = useQuery({ queryKey: ["/api/orders", selectedStoreId, format(currentMonth, 'yyyy-MM')], @@ -83,7 +80,6 @@ export default function MobileCalendarPage() { enabled: !!user, }); - // Fetch deliveries for current month const { data: deliveries = [], isLoading: loadingDeliveries } = useQuery({ queryKey: ["/api/deliveries", selectedStoreId, format(currentMonth, 'yyyy-MM')], @@ -133,6 +129,9 @@ export default function MobileCalendarPage() { })) ]; + const monthStart = startOfMonth(currentMonth); + const monthEnd = endOfMonth(currentMonth); + // Get days for the calendar grid const calendarStart = startOfWeek(monthStart, { locale: fr }); const calendarEnd = endOfWeek(monthEnd, { locale: fr }); @@ -280,8 +279,8 @@ export default function MobileCalendarPage() {
{event.type === 'order' ? @@ -333,23 +332,7 @@ export default function MobileCalendarPage() {
)}
- - {event.status} - - )} - -
- - )) - ) -} - - )} - - + ); }