fix(badges): show 'already printed' notice to public users on print page

Without this, a public user who navigates to a printed badge's print page
sees a blank controls panel with no explanation. Now shows an amber notice
directing them to event staff. Gated on !can_print && is_printed && !is_trusted
so it never shows to staff.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Scott Idem
2026-04-13 23:51:25 -04:00
parent 71c615bf4a
commit 345641e4c4

View File

@@ -952,6 +952,16 @@ let allow_tracking_open = $derived(
</div>
{/if}
<!-- Already-printed notice for public/attendee users who can't reprint.
Without this they see a blank controls panel with no explanation. -->
{#if !can_print && is_printed && !is_trusted}
<div class="mb-2 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-center text-sm text-amber-800 dark:border-amber-800 dark:bg-amber-950/30 dark:text-amber-300">
This badge has already been printed.
<br />
<span class="text-xs opacity-70">Please see event staff if you need assistance.</span>
</div>
{/if}
<div class="space-y-1 text-sm">
<!-- Attendee section header — clickable, collapses staff when opened -->
<button