64 lines
2.0 KiB
TypeScript
64 lines
2.0 KiB
TypeScript
/** @type {import('./$types').LayoutLoad} */
|
|
console.log(`ae_core root +layout.ts start`);
|
|
|
|
// import { core_func } from '$lib/ae_core_functions';
|
|
|
|
|
|
export async function load({ parent }) {
|
|
let log_lvl = 0;
|
|
|
|
let data = await parent();
|
|
// console.log(`ae_events_pres_mgmt +layout.ts data:`, data);
|
|
|
|
// let account_id = data.account_id;
|
|
// if (!account_id) {
|
|
// console.log(`events_pres_mgmt +layout.ts: The account_id was not found in the data!!!`);
|
|
// return false;
|
|
// }
|
|
|
|
// let ae_acct = data[account_id];
|
|
// if (log_lvl) {
|
|
// console.log(`ae_acct = `, ae_acct);
|
|
// }
|
|
|
|
// // // Should we limit these to event.conference = true?
|
|
// // let load_event_obj_li = events_func.handle_load_ae_obj_li__event({
|
|
// // api_cfg: ae_acct.api,
|
|
// // account_id: account_id,
|
|
// // params: {enabled: 'enabled', qry__limit: 25},
|
|
// // try_cache: false,
|
|
// // log_lvl: 1
|
|
// // });
|
|
// // ae_acct.slct.event_obj_li = load_event_obj_li;
|
|
|
|
|
|
// let event_id = ae_acct.slct.event_id;
|
|
// if (!event_id) {
|
|
// console.log(`ERROR: events_pres_mgmt +layout.ts: The event_id was not found in the data!!!`);
|
|
// return false;
|
|
// }
|
|
|
|
// 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_pres_mgmt', access: false},
|
|
// // manage: {name: 'Manage', href: '/events_pres_mgmt/manage', access: 'administrator', disable: true, hide: true},
|
|
// locations: {name: 'Locations', href: '/events_pres_mgmt/locations', access: false, disable: false, hide: false},
|
|
// };
|
|
// data.submenu = submenu
|
|
|
|
// // WARNING: Precaution against shared data between sites and sessions.
|
|
// data[account_id] = ae_acct;
|
|
|
|
return data;
|
|
}
|
|
|
|
// export const prerender = false;
|
|
// export const prerender = true;
|