diff --git a/frontend/src/lib/components/booking/BookingFlow.svelte b/frontend/src/lib/components/booking/BookingFlow.svelte index 4743e77..e40d367 100644 --- a/frontend/src/lib/components/booking/BookingFlow.svelte +++ b/frontend/src/lib/components/booking/BookingFlow.svelte @@ -499,7 +499,8 @@ function generateGroupedTimeSlots( duration: number, - date: CalendarDate | undefined + date: CalendarDate | undefined, + lunchProtection: Map = new Map() ): Array<{ type: 'available' | 'unavailable'; startTime: string; @@ -549,7 +550,7 @@ const minute = minutes % 60; const timeStr = `${String(hour).padStart(2, '0')}:${String(minute).padStart(2, '0')}`; - const isAvailable = availableSlots.includes(timeStr); + const isAvailable = availableSlots.includes(timeStr) && !lunchProtection.get(timeStr)?.isBlocked; if (isAvailable) { if (currentUnavailableStart !== null) { @@ -749,7 +750,7 @@ const formattedTotalDuration = $derived(formatDuration(getTotalDuration())); const groupedTimeSlots = $derived( currentStep === 2 && selectedServices.length > 0 && selectedDate - ? generateGroupedTimeSlots(getTotalDuration(), selectedDate) + ? generateGroupedTimeSlots(getTotalDuration(), selectedDate, lunchProtectionStatus()) : [] ); const formattedSelectedDate = $derived(