Applied consistent code formatting across the project using Prettier, now configured to use 4-space indentation instead of tabs.
65 lines
2.8 KiB
TypeScript
65 lines
2.8 KiB
TypeScript
/** @type {import('./$types').PageLoad} */
|
|
console.log(`Events - [event_id] +page.ts start`);
|
|
|
|
// import { error } from '@sveltejs/kit';
|
|
// import { browser } from '$app/environment';
|
|
// import { events_func } from '$lib/ae_events_functions';
|
|
|
|
export async function load({ params, parent }) {
|
|
// route
|
|
// let log_lvl: number = 0;
|
|
// let data = await parent();
|
|
// // console.log(`ae events_pres_mgmt event [event_id] +page.ts data:`, data);
|
|
// data.log_lvl = log_lvl;
|
|
// let account_id = data.account_id;
|
|
// let ae_acct = data[account_id];
|
|
// // console.log(`ae_acct = `, ae_acct);
|
|
// // if (!account_id) {
|
|
// // console.log(`events_pres_mgmt_event [event_id] +page.ts: The account_id was not found in the data!!!`);
|
|
// // return false;
|
|
// // }
|
|
// // data.ae_events_pres_mgmt_event_event_id_page_ts = true;
|
|
// let event_id = params.event_id;
|
|
// if (!event_id) {
|
|
// console.log(`ae Events - [event_id] +page.ts: The event_id was not found in the params.event_id!!!`);
|
|
// error(404, {
|
|
// message: 'Event ID not found'
|
|
// });
|
|
// }
|
|
// // ae_acct.slct.event_id = event_id;
|
|
// // let load_event_obj = events_func.handle_load_ae_obj_id__event({
|
|
// // api_cfg: ae_acct.api, event_id: event_id, try_cache: true
|
|
// // });
|
|
// // ae_acct.slct.event_obj = await load_event_obj;
|
|
// if (browser) {
|
|
// let load_event_obj = events_func.handle_load_ae_obj_id__event({
|
|
// api_cfg: ae_acct.api, event_id: event_id, try_cache: true
|
|
// });
|
|
// console.log(`load_event_obj = `, load_event_obj);
|
|
// ae_acct.slct.event_obj = load_event_obj;
|
|
// let load_event_session_obj_li = events_func.load_ae_obj_li__event_session({
|
|
// api_cfg: ae_acct.api,
|
|
// for_obj_type: 'event',
|
|
// for_obj_id: event_id,
|
|
// params: {qry__enabled: 'enabled', qry__hidden: 'all', qry__limit: 200},
|
|
// try_cache: true,
|
|
// log_lvl: 1
|
|
// });
|
|
// console.log(`load_event_session_obj_li = `, load_event_session_obj_li);
|
|
// ae_acct.slct.event_session_obj_li = load_event_session_obj_li;
|
|
// let load_event_location_obj_li = events_func.load_ae_obj_li__event_location({
|
|
// api_cfg: ae_acct.api,
|
|
// for_obj_type: 'event',
|
|
// for_obj_id: event_id,
|
|
// params: {qry__enabled: 'enabled', qry__hidden: 'all', qry__limit: 200},
|
|
// try_cache: true,
|
|
// log_lvl: 1
|
|
// });
|
|
// console.log(`load_event_location_obj_li = `, load_event_location_obj_li);
|
|
// ae_acct.slct.event_location_obj_li = load_event_location_obj_li;
|
|
// }
|
|
// // WARNING: Precaution against shared data between sites and sessions.
|
|
// data[account_id] = ae_acct;
|
|
// return data;
|
|
}
|