General work through out the day. Lots of interruptions from the dogs.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
/** @type {import('./$types').PageLoad} */
|
||||
console.log(`ae_events_leads slug +page.ts start`);
|
||||
|
||||
import { events_func } from '$lib/ae_events_functions';
|
||||
|
||||
@@ -10,35 +11,30 @@ export async function load({ params, parent, url }) { // route
|
||||
let data = await parent();
|
||||
// console.log(`ae_events_leads +page.ts data:`, data);
|
||||
|
||||
// console.log(`ae_events_leads +page.ts data.ae_loc:`, data.ae_loc);
|
||||
if (data.ae_loc.account_id) {
|
||||
} else {
|
||||
console.log(`The account_id was not found in the data.ae_loc!!!`);
|
||||
return false;
|
||||
}
|
||||
|
||||
data.ae_events_leads_exhibit_slug_page_ts = true;
|
||||
|
||||
// let submenu = {
|
||||
// main: {name: 'Main', href: '/events_leads', access: false},
|
||||
// manage: {name: 'Manage', href: '/events_leads/manage', access: 'administrator', disable: true, hide: true},
|
||||
// review: {name: 'Exhibitor', href: '/events_leads/exhibitor', access: false, disable: false, hide: false},
|
||||
// };
|
||||
// data.submenu = submenu
|
||||
|
||||
// Do not wait on these:
|
||||
// let event_id = url.searchParams.get('event_id');
|
||||
// let load_event_obj = events_func.handle_load_ae_obj_id__event({api_cfg: data.ae_api, event_id: event_id, try_cache: false});
|
||||
// console.log(`load_event_obj = `, load_event_obj);
|
||||
|
||||
let param_slug_event_exhibit_id = data.params.slug;
|
||||
|
||||
let load_event_exhibit_tracking_obj_li = events_func.handle_load_ae_obj_li__exhibit_tracking({api_cfg: data.ae_api, exhibit_id: param_slug_event_exhibit_id, try_cache: false});
|
||||
// console.log(`load_event_exhibit_tracking_obj_li = `, load_event_exhibit_tracking_obj_li);
|
||||
let event_exhibit_id = null;
|
||||
if (param_slug_event_exhibit_id) {
|
||||
event_exhibit_id = param_slug_event_exhibit_id;
|
||||
} else if (data.url.searchParams.get('event_exhibit_id')) {
|
||||
event_exhibit_id = data.url.searchParams.get('event_exhibit_id');
|
||||
} else {
|
||||
console.log(`The slct__event_exhibit_id was not found in the data.params.slug or data.url!!!`);
|
||||
return false;
|
||||
}
|
||||
|
||||
// let exhibit_id = data.params.slug;
|
||||
// let load_event_exhibit_obj = events_func.handle_load_ae_obj_id__exhibit({api_cfg: data.ae_api, exhibit_id: exhibit_id, try_cache: false});
|
||||
// console.log(`load_event_exhibit_obj = `, load_event_exhibit_obj);
|
||||
data.ae_slct.event_exhibit_id = event_exhibit_id;
|
||||
|
||||
let load_event_exhibit_obj = events_func.handle_load_ae_obj_id__exhibit({api_cfg: data.ae_api, exhibit_id: event_exhibit_id, try_cache: false});
|
||||
|
||||
data.ae_slct.event_exhibit_obj = await load_event_exhibit_obj;
|
||||
|
||||
let load_event_exhibit_tracking_obj_li = events_func.handle_load_ae_obj_li__exhibit_tracking({api_cfg: data.ae_api, exhibit_id: event_exhibit_id, try_cache: false});
|
||||
console.log(`load_event_exhibit_tracking_obj_li = `, load_event_exhibit_tracking_obj_li);
|
||||
|
||||
data.ae_slct.event_exhibit_tracking_obj_li = load_event_exhibit_tracking_obj_li;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user