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:
@@ -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}
|
||||||
|
|||||||
Reference in New Issue
Block a user