diff --git a/frontend/src/routes/account/+page.svelte b/frontend/src/routes/account/+page.svelte index 4452ad7..2e24169 100644 --- a/frontend/src/routes/account/+page.svelte +++ b/frontend/src/routes/account/+page.svelte @@ -1439,16 +1439,27 @@ {#if authStore.currentUser?.role !== 'admin'} + + {#if stamps >= 10} +
+

+ Card Completed — 10% Off Your Next Booking! +

+
+ {/if} +
{#if userData}

Loyalty Stamp Card

{stamps < 10 - ? 'Collect 10 stamps to get 10% off your next booking.' - : 'Your card is full — enjoy 10% off your next service!'} + ? `Collect ${10 - stamps} more stamp${10 - stamps === 1 ? '' : 's'} to get 10% off your next booking.` + : (() => { const fc = Math.floor(stamps / 10); return `You have ${fc === 1 ? 'a' : fc} full stampcard${fc === 1 ? '' : 's'} ready to take advantage of at your next booking!`; })()}

@@ -1456,7 +1467,7 @@ {#each Array(10) as _, i} {@const slotNum = i + 1} {@const rot = ((slotNum * 37 + 13) % 7) - 3} - {#if slotNum <= stamps} + {#if slotNum <= (stamps > 0 ? (stamps % 10 || 10) : 0)}
@@ -1508,16 +1519,6 @@ {/if} {/each}
- - {#if stamps >= 10} -
-

- 🎉 Card Completed — 10% Off Your Next Booking! -

-
- {/if} {/if}
{/if} @@ -1706,7 +1707,7 @@