Clean up to get ready for CMSC and LCI.

This commit is contained in:
Scott Idem
2025-05-22 13:27:23 -04:00
parent 15d417ba52
commit 6b585090d0
4 changed files with 22 additions and 47 deletions

View File

@@ -354,17 +354,17 @@ if ($ae_loc.site_access_key || $ae_loc.site_domain_access_key) {
// BEGIN: Special Checks for Events, Sponsorships, IDAA, CHOW, etc.:
// There should almost always be an event_id set.
if ($ae_loc?.site_cfg_json?.slct__event_id) {
$events_slct.event_id = $ae_loc.site_cfg_json.slct__event_id;
$events_loc.event_id = $ae_loc.site_cfg_json.slct__event_id;
} else if ($events_slct?.event_id) {
// console.log(`Event ID already set:`, $events_slct.event_id);
$events_loc.event_id = $events_slct.event_id;
} else {
if (log_lvl > 1) {
console.log(`No Event ID set!`);
}
}
// if ($ae_loc?.site_cfg_json?.slct__event_id) {
// $events_slct.event_id = $ae_loc.site_cfg_json.slct__event_id;
// $events_loc.event_id = $ae_loc.site_cfg_json.slct__event_id;
// } else if ($events_slct?.event_id) {
// // console.log(`Event ID already set:`, $events_slct.event_id);
// $events_loc.event_id = $events_slct.event_id;
// } else {
// if (log_lvl > 1) {
// console.log(`No Event ID set!`);
// }
// }
// This is mainly for Precon CHOW
if ($ae_loc?.site_cfg_json?.slct__sponsorship_cfg_id) {

View File

@@ -298,7 +298,7 @@ export async function load({ fetch, params, parent, route, url }) { // params, r
// For events_leads, events_badges, events_speakers
'event_id': ae_loc_init.site_cfg_json?.slct__event_id,
'event_badge_template': ae_loc_init.site_cfg_json?.slct__event_badge_template,
'event_badge_template_id': ae_loc_init.site_cfg_json?.slct__event_badge_template_id,
// For sponsorships
'sponsorship_cfg_id': ae_loc_init.site_cfg_json?.slct__sponsorship_cfg_id,

View File

@@ -21,31 +21,6 @@ export async function load({ parent }) {
// console.log(`ae_acct = `, ae_acct);
// }
// // // Should we limit these to event.conference = true?
// // let load_event_obj_li = events_func.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.load_ae_obj_id__event({
// api_cfg: ae_acct.api,
// event_id: event_id,
// try_cache: true
// });
// 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},

View File

@@ -24,10 +24,10 @@ export async function load({ parent }) {
}
let event_id = ae_acct.slct.event_id; // From root +layout.ts
if (!event_id) {
console.log(`ERROR: events_pres_mgmt +layout.ts: The event_id was not found in the data!!!`);
return false;
}
// if (!event_id) {
// console.log(`ERROR: events_pres_mgmt +layout.ts: The event_id was not found in the data!!!`);
// return false;
// }
if (browser) {
if (log_lvl) {
@@ -55,12 +55,12 @@ export async function load({ parent }) {
// 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/${event_id}/locations`, access: false, disable: false, hide: false},
};
data.submenu = submenu
// 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/${event_id}/locations`, access: false, disable: false, hide: false},
// };
// data.submenu = submenu
// WARNING: Precaution against shared data between sites and sessions.
data[account_id] = ae_acct;