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
This commit is contained in:
2026-05-10 11:57:05 +01:00
parent 1c237cc97b
commit f1a9d129e6
@@ -52,7 +52,7 @@
{/if} {/if}
<div class="grid gap-2"> <div class="grid gap-2">
{#each groupedTimeSlots as slot (slot.startTime)} {#each groupedTimeSlots as slot (slot.type + '-' + slot.startTime + '-' + slot.endTime)}
{#if slot.type === 'available'} {#if slot.type === 'available'}
{@const protection = lunchProtectionStatus.get(slot.startTime)} {@const protection = lunchProtectionStatus.get(slot.startTime)}
{#if protection?.isBlocked} {#if protection?.isBlocked}