style: fix require-each-key — add missing keys to all {#each} blocks
This commit is contained in:
@@ -608,7 +608,7 @@ ${hasVAT ? `<p class="warning">VAT is included at ${biz?.default_vat_rate ?? 20}
|
||||
<div
|
||||
class="my-2 space-y-1 rounded-md border-y border-fuchsia-100 bg-fuchsia-50/20 px-2 py-2"
|
||||
>
|
||||
{#each selectedBooking.discounts as d}
|
||||
{#each selectedBooking.discounts as d (d.id)}
|
||||
<div class="flex items-center justify-between text-xs text-fuchsia-800">
|
||||
<span class="flex items-center gap-1.5">
|
||||
<span class="h-1.5 w-1.5 rounded-full bg-fuchsia-400"></span>
|
||||
|
||||
@@ -663,7 +663,7 @@
|
||||
{#if booking.discounts && booking.discounts.length > 0}
|
||||
<div class="mt-3 rounded-md border border-blue-200 bg-blue-50 p-3 text-sm text-blue-800">
|
||||
<p class="font-medium">Applied Discounts</p>
|
||||
{#each booking.discounts as d}
|
||||
{#each booking.discounts as d (d.id)}
|
||||
<p class="mt-1">
|
||||
- {d.discount_source === 'loyalty'
|
||||
? 'Loyalty Stamp Card'
|
||||
|
||||
@@ -575,7 +575,7 @@
|
||||
<div
|
||||
class="my-2 space-y-1 rounded-md border-y border-fuchsia-100 bg-fuchsia-50/20 px-2 py-2"
|
||||
>
|
||||
{#each selectedBooking.discounts as d}
|
||||
{#each selectedBooking.discounts as d (d.id)}
|
||||
<div class="flex items-center justify-between text-xs text-fuchsia-800">
|
||||
<span class="flex items-center gap-1.5">
|
||||
<span class="h-1.5 w-1.5 rounded-full bg-fuchsia-400"></span>
|
||||
|
||||
@@ -628,7 +628,7 @@
|
||||
onchange={() => validateField('voucher_type')}
|
||||
>
|
||||
<option value="" disabled>Select voucher type</option>
|
||||
{#each VOUCHER_TYPES as vt}
|
||||
{#each VOUCHER_TYPES as vt (vt.value)}
|
||||
<option value={vt.value}>{vt.label}</option>
|
||||
{/each}
|
||||
</select>
|
||||
|
||||
@@ -561,7 +561,7 @@
|
||||
disabled={!row.is_open}
|
||||
class="w-24 text-sm"
|
||||
>
|
||||
{#each Array(24) as _, hour}
|
||||
{#each Array(24) as _, hour (hour)}
|
||||
{#each TIME15 as min (min)}
|
||||
<option value="{String(hour).padStart(2, '0')}:{min}"
|
||||
>{String(hour).padStart(2, '0')}:{min}</option
|
||||
@@ -572,7 +572,7 @@
|
||||
</td>
|
||||
<td class="py-2">
|
||||
<select bind:value={row.end_time} disabled={!row.is_open} class="w-24 text-sm">
|
||||
{#each Array(24) as _, hour}
|
||||
{#each Array(24) as _, hour (hour)}
|
||||
{#each TIME15 as min (min)}
|
||||
<option value="{String(hour).padStart(2, '0')}:{min}"
|
||||
>{String(hour).padStart(2, '0')}:{min}</option
|
||||
|
||||
@@ -485,7 +485,7 @@
|
||||
disabled={!row.is_open}
|
||||
class="max-w-[70px] text-sm"
|
||||
>
|
||||
{#each Array(24) as _, hour}
|
||||
{#each Array(24) as _, hour (hour)}
|
||||
{#each TIME15 as min (min)}
|
||||
<option value="{String(hour).padStart(2, '0')}:{min}"
|
||||
>{String(hour).padStart(2, '0')}:{min}</option
|
||||
@@ -500,7 +500,7 @@
|
||||
disabled={!row.is_open}
|
||||
class="max-w-[70px] text-sm"
|
||||
>
|
||||
{#each Array(24) as _, hour}
|
||||
{#each Array(24) as _, hour (hour)}
|
||||
{#each TIME15 as min (min)}
|
||||
<option value="{String(hour).padStart(2, '0')}:{min}"
|
||||
>{String(hour).padStart(2, '0')}:{min}</option
|
||||
|
||||
@@ -1561,7 +1561,7 @@
|
||||
|
||||
{#if !authReady}
|
||||
<div class="mb-6 flex items-center justify-center gap-2">
|
||||
{#each [1, 2, 3, 4] as _}
|
||||
{#each [1, 2, 3, 4] as _ (_)}
|
||||
<div class="flex items-center gap-1">
|
||||
<div class="h-8 w-8 animate-pulse rounded-full bg-gray-200" />
|
||||
<div class="h-3 w-16 animate-pulse rounded bg-gray-200" />
|
||||
@@ -2088,7 +2088,7 @@
|
||||
{/each}
|
||||
<div class="border-t pt-2">
|
||||
{#if discountPreview?.eligible}
|
||||
{#each discountPreview.discounts as d}
|
||||
{#each discountPreview.discounts as d (d.name)}
|
||||
<div class="flex justify-between text-sm text-gray-600">
|
||||
<span>{d.name}</span>
|
||||
<span>-£{d.amount.toFixed(2)}</span>
|
||||
|
||||
@@ -767,7 +767,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="space-y-2 text-sm">
|
||||
{#each booking.discounts as d}
|
||||
{#each booking.discounts as d (d.id)}
|
||||
<div class="flex items-center justify-between text-gray-600">
|
||||
<div class="flex items-center gap-1.5">
|
||||
<span class="h-1.5 w-1.5 rounded-full bg-fuchsia-400"></span>
|
||||
|
||||
@@ -772,7 +772,7 @@
|
||||
{/if}
|
||||
</div>
|
||||
<div class="space-y-2 text-sm">
|
||||
{#each booking.discounts as d}
|
||||
{#each booking.discounts as d (d.id)}
|
||||
<div class="flex items-center justify-between text-gray-600">
|
||||
<div class="flex items-center gap-1.5">
|
||||
<span class="h-1.5 w-1.5 rounded-full bg-fuchsia-400"></span>
|
||||
@@ -802,7 +802,7 @@
|
||||
>
|
||||
</div>
|
||||
{#if discountPreview?.eligible}
|
||||
{#each discountPreview.discounts as d}
|
||||
{#each discountPreview.discounts as d (d.name)}
|
||||
<div class="flex justify-between text-sm">
|
||||
<span class="text-gray-600">{d.name}</span>
|
||||
<span class="font-medium text-green-700"
|
||||
|
||||
@@ -1748,7 +1748,7 @@
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-5 gap-3 sm:grid-cols-10">
|
||||
{#each Array(10) as _, i}
|
||||
{#each Array(10) as _, i (i)}
|
||||
{@const slotNum = i + 1}
|
||||
{@const rot = ((slotNum * 37 + 13) % 7) - 3}
|
||||
{#if slotNum <= (stamps > 0 ? stamps % 10 || 10 : 0)}
|
||||
@@ -2341,7 +2341,7 @@
|
||||
>Select Value</span
|
||||
>
|
||||
<div class="grid grid-cols-3 gap-2">
|
||||
{#each [10, 20, 50] as amount}
|
||||
{#each [10, 20, 50] as amount (amount)}
|
||||
<button
|
||||
type="button"
|
||||
class="rounded-lg border py-2.5 text-center text-sm font-semibold transition-colors {buyAmount ===
|
||||
|
||||
@@ -185,7 +185,7 @@
|
||||
<div class="h-8 w-44 rounded-lg bg-gray-200"></div>
|
||||
<div class="h-4 w-64 rounded bg-gray-200"></div>
|
||||
<div class="space-y-4 pt-2">
|
||||
{#each Array(3) as _, i}
|
||||
{#each Array(3) as _, i (i)}
|
||||
<div class="rounded-xl border bg-white p-5 shadow-sm">
|
||||
<div class="mb-3 flex items-center gap-3">
|
||||
<div class="h-4 w-24 rounded bg-gray-200"></div>
|
||||
@@ -218,7 +218,7 @@
|
||||
|
||||
{#if loading}
|
||||
<div class="space-y-6">
|
||||
{#each Array(3) as _, i}
|
||||
{#each Array(3) as _, i (i)}
|
||||
<div class="animate-pulse rounded-xl border bg-white p-5 shadow-sm">
|
||||
<div class="mb-3 flex items-center gap-3">
|
||||
<div class="h-4 w-24 rounded bg-gray-200"></div>
|
||||
|
||||
Reference in New Issue
Block a user