From f1a9d129e6c5ada230002cca752222c05d069ce0 Mon Sep 17 00:00:00 2001 From: Stephen Adamson Date: Sun, 10 May 2026 11:57:05 +0100 Subject: [PATCH] fix: unique keys for time slot each block to prevent duplicate key errors - Use type+startTime+endTime composite key instead of startTime alone - Prevents collisions when available and unavailable slots share start times --- frontend/src/lib/components/booking/TimeSlotPicker.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/lib/components/booking/TimeSlotPicker.svelte b/frontend/src/lib/components/booking/TimeSlotPicker.svelte index 8681751..b464d60 100644 --- a/frontend/src/lib/components/booking/TimeSlotPicker.svelte +++ b/frontend/src/lib/components/booking/TimeSlotPicker.svelte @@ -52,7 +52,7 @@ {/if}
- {#each groupedTimeSlots as slot (slot.startTime)} + {#each groupedTimeSlots as slot (slot.type + '-' + slot.startTime + '-' + slot.endTime)} {#if slot.type === 'available'} {@const protection = lunchProtectionStatus.get(slot.startTime)} {#if protection?.isBlocked}