Getting the badges up and running again

This commit is contained in:
Scott Idem
2024-04-03 19:37:28 -04:00
parent 8d2f4e30f4
commit 5671423467
5 changed files with 143 additions and 350 deletions

View File

@@ -1,22 +1,14 @@
/** @type {import('./$types').LayoutLoad} */
console.log(`ae_events_badges +layout.ts start`);
// import { get } from 'svelte/store';
// import { api } from '$lib/api';
// import { ae_loc, ae_sess, ae_api, slct, slct_trigger } from '$lib/ae_stores';
// import { ae_events_loc, ae_events_sess, ae_events_triggers, ae_events_badges_loc, ae_events_badges_sess, ae_events_badges_triggers } from '$lib/ae_events_stores';
// import { ae_events_loc, ae_events_slct, ae_events_trigger } from '$lib/ae_events_stores';
// import type { key_val } from '$lib/ae_stores';
import { events_func } from '$lib/ae_events_functions';
export async function load({ parent }) { // route
export async function load({ parent }) {
let data = await parent();
// console.log(`ae_events_badges +layout.ts data:`, data);
console.log(`ae_events_badges +layout.ts data:`, data);
// console.log(`ae_events_badges +layout.ts data.params:`, params);
// console.log(`ae_events_badges +layout.ts data.route:`, route);
// console.log(`ae_events_badges +layout.ts data.url:`, url);
let account_id = data.account_id;
let ae_acct = data[account_id];
@@ -33,13 +25,15 @@ export async function load({ parent }) { // route
return false;
}
data.ae_events_badges_layout_ts = true;
let load_event_obj = events_func.handle_load_ae_obj_id__event({api_cfg: ae_acct.api, event_id: event_id, try_cache: false});
ae_acct.slct.event_obj = load_event_obj;
let submenu = {
main: {name: 'Main', href: '/events_badges', access: false},
manage: {name: 'Manage', href: '/events_badges/manage', access: 'administrator', disable: true, hide: true},
review: {name: 'Review', href: '/events_badges/review', access: false, disable: true, hide: false},
print: {name: 'Print', href: '/events_badges/print', access: 'trusted', disable: true, hide: false},
// manage: {name: 'Manage', href: '/events_badges/manage', access: 'administrator', disable: true, hide: true},
review: {name: 'Review', href: '/events_badges/review', access: false, disable: false, hide: false},
// print: {name: 'Print', href: '/events_badges/print', access: 'trusted', disable: true, hide: false},
// view: {name: 'View', href: '/events_badges/view', access: 'trusted', hide: true}, // event_badge_id
// new: {name: 'New', href: '/events_badges/new'},
// sponsorships: {name: 'Sponsorships', href: '/sponsorships', disable: true, hide: true},