feat(events): reorganize badge admin tools and enhance dependency tracking
- Migrated 'Add New Badge' and 'Upload Badge List' to centralized Event Settings hub. - Secured Admin Tools visibility with Administrator access and Edit Mode requirements. - Restored and modernized Badge Template management route with Svelte 5 runes. - Patched 'Archive' and 'Session' database interfaces to resolve compiler errors. - Added project-wide dependency comments to key interfaces (Archive, Badge, Session) to prevent cascading change regressions. - Fixed duplicate import errors in the Settings page.
This commit is contained in:
@@ -85,13 +85,11 @@
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{#await lq__badge_templates}
|
||||
<p>Loading badge templates...</p>
|
||||
{:then templates}
|
||||
{#if templates.length > 0}
|
||||
{#if $lq__badge_templates}
|
||||
{#if $lq__badge_templates.length > 0}
|
||||
<div class="card p-4">
|
||||
<ul class="list-group">
|
||||
{#each templates as template (template.event_badge_template_id_random)}
|
||||
{#each $lq__badge_templates as template (template.event_badge_template_id_random)}
|
||||
<li class="list-group-item flex justify-between items-center">
|
||||
<span>{template.name}</span>
|
||||
<div>
|
||||
@@ -117,31 +115,31 @@
|
||||
{:else}
|
||||
<p>No badge templates found for this event. Click "Add New Template" to create one.</p>
|
||||
{/if}
|
||||
{:catch error}
|
||||
<p class="text-error-500">Error loading templates: {error.message}</p>
|
||||
{/await}
|
||||
{:else}
|
||||
<p>Loading badge templates...</p>
|
||||
{/if}
|
||||
</section>
|
||||
|
||||
{#if show_create_template_modal}
|
||||
<Modal bind:show={show_create_template_modal}>
|
||||
<Modal bind:open={show_create_template_modal}>
|
||||
<div class="card p-4">
|
||||
<Comp_badge_template_form
|
||||
{event_id}
|
||||
on:success={handle_create_success}
|
||||
on:cancel={handle_cancel}
|
||||
onsuccess={handle_create_success}
|
||||
oncancel={handle_cancel}
|
||||
/>
|
||||
</div>
|
||||
</Modal>
|
||||
{/if}
|
||||
|
||||
{#if show_edit_template_modal}
|
||||
<Modal bind:show={show_edit_template_modal}>
|
||||
<Modal bind:open={show_edit_template_modal}>
|
||||
<div class="card p-4">
|
||||
<Comp_badge_template_form
|
||||
{event_id}
|
||||
template_id={selected_template_id}
|
||||
on:success={handle_edit_success}
|
||||
on:cancel={handle_cancel}
|
||||
onsuccess={handle_edit_success}
|
||||
oncancel={handle_cancel}
|
||||
/>
|
||||
</div>
|
||||
</Modal>
|
||||
Reference in New Issue
Block a user