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:
Scott Idem
2026-02-04 14:04:44 -05:00
parent 49f0a888b0
commit bc30724628
19 changed files with 299 additions and 276 deletions

View File

@@ -262,38 +262,6 @@
}
</script>
{#if show_create_badge_modal}
<Modal bind:open={show_create_badge_modal}>
<div class="card p-4">
<h3 class="h3">Create New Badge</h3>
<Comp_badge_create_form
event_id={$events_slct?.event_id ?? ''}
on:success={() => {
show_create_badge_modal = false;
$events_loc.badges.search_version++;
}}
on:cancel={() => (show_create_badge_modal = false)}
/>
</div>
</Modal>
{/if}
{#if show_upload_badge_modal}
<Modal bind:open={show_upload_badge_modal}>
<div class="card p-4">
<h3 class="h3">Upload Badges (CSV)</h3>
<Comp_badge_upload_form
event_id={$events_slct?.event_id ?? ''}
on:success={() => {
show_upload_badge_modal = false;
$events_loc.badges.search_version++;
}}
on:cancel={() => (show_upload_badge_modal = false)}
/>
</div>
</Modal>
{/if}
<svelte:head>
<title>
Badges -
@@ -307,50 +275,6 @@
log_lvl={1}
></Comp_badge_search>
{#if $ae_loc.trusted_access}
<div class="mt-4 text-center">
<button type="button" class="btn btn-primary" onclick={() => (show_create_badge_modal = true)}>
<span class="fas fa-plus mr-2"></span> Add New Badge
</button>
<button type="button" class="btn btn-primary ml-2" onclick={() => (show_upload_badge_modal = true)}>
<span class="fas fa-upload mr-2"></span> Upload Badge List
</button>
</div>
<div class="mt-4 text-center p-4 border rounded-md">
<h4 class="h4">Mass Print Options</h4>
<div class="flex flex-wrap justify-center gap-2">
<a
href={`/events/${$events_slct?.event_id ?? ''}/badges/print_list?printed_status=not_printed`}
class="btn variant-filled-secondary"
>
<span class="fas fa-print mr-2"></span> Print All Unprinted
</a>
<a
href={`/events/${$events_slct?.event_id ?? ''}/badges/print_list?badge_type_code=guest&printed_status=not_printed`}
class="btn variant-filled-secondary"
>
<span class="fas fa-print mr-2"></span> Print Unprinted Guests
</a>
<a
href={`/events/${$events_slct?.event_id ?? ''}/badges/print_list`}
class="btn variant-filled-secondary"
>
<span class="fas fa-print mr-2"></span> Print All
</a>
</div>
</div>
<div class="mt-4 text-center">
<a
href={`/events/${$events_slct?.event_id ?? ''}/badges/templates`}
class="btn btn-tertiary"
>
<span class="fas fa-file-alt mr-2"></span> Manage Badge Templates
</a>
</div>
{/if}
{#if $events_sess?.badges?.search_status === 'loading' && event_badge_id_li.length === 0}
<div class="flex flex-col items-center justify-center p-10 opacity-50 text-center">
<LoaderCircle size="3em" class="animate-spin mb-4 mx-auto" />