style: Apply Prettier formatting with 4-space indentation
Applied consistent code formatting across the project using Prettier, now configured to use 4-space indentation instead of tabs.
This commit is contained in:
@@ -6,66 +6,66 @@ import { browser } from '$app/environment';
|
||||
import { events_func } from '$lib/ae_events_functions';
|
||||
|
||||
export async function load({ params, parent, url }) {
|
||||
// route
|
||||
const log_lvl: number = 0;
|
||||
// route
|
||||
const log_lvl: number = 0;
|
||||
|
||||
const data = await parent();
|
||||
// console.log(`ae events_pres_mgmt event [event_id] +page.ts data:`, data);
|
||||
data.log_lvl = log_lvl;
|
||||
const data = await parent();
|
||||
// console.log(`ae events_pres_mgmt event [event_id] +page.ts data:`, data);
|
||||
data.log_lvl = log_lvl;
|
||||
|
||||
const account_id = data.account_id;
|
||||
const ae_acct = data[account_id];
|
||||
const account_id = data.account_id;
|
||||
const ae_acct = data[account_id];
|
||||
|
||||
const 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: 'Events Pres Mgmt - Event ID not found'
|
||||
});
|
||||
}
|
||||
const 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: 'Events Pres Mgmt - Event ID not found'
|
||||
});
|
||||
}
|
||||
|
||||
ae_acct.slct.event_id = event_id;
|
||||
ae_acct.slct.event_id = event_id;
|
||||
|
||||
if (browser) {
|
||||
// console.log(`TEST URL Params`, params);
|
||||
// console.log(`TEST URL`, url);
|
||||
if (browser) {
|
||||
// console.log(`TEST URL Params`, params);
|
||||
// console.log(`TEST URL`, url);
|
||||
|
||||
const load_event_obj = await events_func.load_ae_obj_id__event({
|
||||
api_cfg: ae_acct.api,
|
||||
event_id: event_id,
|
||||
// inc_file_li: true,
|
||||
// inc_device_li: true,
|
||||
inc_location_li: true,
|
||||
inc_session_li: true,
|
||||
// inc_badge_li: true,
|
||||
inc_template_li: true,
|
||||
log_lvl: log_lvl
|
||||
// })
|
||||
// .then((results) => {
|
||||
// if (!results) {
|
||||
// error(404, {
|
||||
// message: 'Events - Event not found'
|
||||
// });
|
||||
// } else {
|
||||
// // ae_acct.slct.event_obj = results;
|
||||
// }
|
||||
});
|
||||
if (!load_event_obj) {
|
||||
error(404, {
|
||||
message: 'Events - Event not found'
|
||||
});
|
||||
}
|
||||
console.log(`load_event_obj = `, load_event_obj);
|
||||
ae_acct.slct.event_obj = load_event_obj;
|
||||
// ae_acct.slct.event_device_obj_li = load_event_obj.event_device_obj_li;
|
||||
ae_acct.slct.event_location_obj_li = load_event_obj.event_location_obj_li;
|
||||
ae_acct.slct.event_session_obj_li = load_event_obj.event_session_obj_li;
|
||||
}
|
||||
const load_event_obj = await events_func.load_ae_obj_id__event({
|
||||
api_cfg: ae_acct.api,
|
||||
event_id: event_id,
|
||||
// inc_file_li: true,
|
||||
// inc_device_li: true,
|
||||
inc_location_li: true,
|
||||
inc_session_li: true,
|
||||
// inc_badge_li: true,
|
||||
inc_template_li: true,
|
||||
log_lvl: log_lvl
|
||||
// })
|
||||
// .then((results) => {
|
||||
// if (!results) {
|
||||
// error(404, {
|
||||
// message: 'Events - Event not found'
|
||||
// });
|
||||
// } else {
|
||||
// // ae_acct.slct.event_obj = results;
|
||||
// }
|
||||
});
|
||||
if (!load_event_obj) {
|
||||
error(404, {
|
||||
message: 'Events - Event not found'
|
||||
});
|
||||
}
|
||||
console.log(`load_event_obj = `, load_event_obj);
|
||||
ae_acct.slct.event_obj = load_event_obj;
|
||||
// ae_acct.slct.event_device_obj_li = load_event_obj.event_device_obj_li;
|
||||
ae_acct.slct.event_location_obj_li = load_event_obj.event_location_obj_li;
|
||||
ae_acct.slct.event_session_obj_li = load_event_obj.event_session_obj_li;
|
||||
}
|
||||
|
||||
// WARNING: Precaution against shared data between sites and sessions.
|
||||
data[account_id] = ae_acct;
|
||||
// WARNING: Precaution against shared data between sites and sessions.
|
||||
data[account_id] = ae_acct;
|
||||
|
||||
return data;
|
||||
return data;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user