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:
@@ -0,0 +1,34 @@
|
||||
/** @type {import('./$types').PageLoad} */
|
||||
console.log(`Events - Badges [badge_id] +page.ts start`);
|
||||
|
||||
import { browser } from '$app/environment';
|
||||
import { events_func } from '$lib/ae_events_functions';
|
||||
|
||||
// This file needs to load the Event Badge ID. It should also include the associated Event Badge Template for the specific badge ID.
|
||||
export async function load({ params, parent, url }) {
|
||||
const log_lvl: number = 2;
|
||||
|
||||
const parent_data = await parent();
|
||||
|
||||
const account_id = parent_data.account_id;
|
||||
|
||||
const ae_acct = parent_data[account_id];
|
||||
|
||||
if (browser) {
|
||||
if (log_lvl) console.log(`ae_events +page.ts (Non-Blocking Refresh)`);
|
||||
|
||||
const event_id = params.event_id;
|
||||
const event_badge_id = params.badge_id;
|
||||
|
||||
if (event_badge_id) {
|
||||
// Refresh the specific selected Event Badge ID
|
||||
events_func.load_ae_obj_id__event_badge({
|
||||
api_cfg: ae_acct.api,
|
||||
event_badge_id: event_badge_id,
|
||||
event_id: event_id, // This event_id should not be needed here... 2026-02-04
|
||||
inc_template: true,
|
||||
log_lvl: log_lvl
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -292,7 +292,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
$effect(async () => {
|
||||
$effect(() => {
|
||||
if (browser && $lq__event_badge_obj?.event_badge_id) {
|
||||
console.log('Generating QR code...');
|
||||
qr_error_message = '';
|
||||
|
||||
Reference in New Issue
Block a user