ui(badges): show template name on create form when only one exists
Single-template events auto-select silently but gave no visual confirmation. Added a read-only display of the template name so staff can verify the correct template is in use before submitting. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -221,9 +221,14 @@ let step_label = $derived(
|
||||
<p class="text-error-600 dark:text-error-400 text-sm font-medium">
|
||||
No badge templates are configured for this event. Set up a template before creating badges.
|
||||
</p>
|
||||
{:else if template_li.length > 1}
|
||||
<!-- Template selector — only shown when the event has multiple templates.
|
||||
Single-template events auto-select silently; the selector would just add noise. -->
|
||||
{:else if template_li.length === 1}
|
||||
<!-- Single template — auto-selected. Show it so the user can confirm. -->
|
||||
<div class="text-sm">
|
||||
<span class="text-surface-500">Badge Template:</span>
|
||||
<span class="text-surface-900-50 font-medium">{template_li[0].name}</span>
|
||||
</div>
|
||||
{:else}
|
||||
<!-- Multiple templates — let the user pick; always pre-selected to first. -->
|
||||
<label class="label">
|
||||
<span class="label-text">Badge Template</span>
|
||||
<select bind:value={selected_template_id} class="select">
|
||||
|
||||
Reference in New Issue
Block a user