I guess this is better than it was...

This commit is contained in:
Scott Idem
2024-03-27 17:55:31 -04:00
parent 3082c07e3e
commit 8d8fb0b638
22 changed files with 582 additions and 443 deletions

View File

@@ -9,34 +9,37 @@ import { ae_loc, ae_sess, ae_api, slct, slct_trigger } from '$lib/ae_stores';
import { events_loc, events_slct, events_trigger } from '$lib/ae_events_stores';
import { ae_util } from '$lib/ae_utils';
if (!$ae_api.account_id || !$ae_api.headers['x-account-id']) {
console.log(`Account ID not set. Redirecting to root if can not fix.`);
// if (!$ae_api.account_id || !$ae_api.headers['x-account-id']) {
// console.log(`Account ID not set. Redirecting to root if can not fix.`);
if ($ae_loc.account_id) {
$ae_api.account_id = $ae_loc.account_id;
$ae_api.headers['x-account-id'] = $ae_loc.account_id;
} else {
console.log(`Account ID not set!!!`);
}
}
// if ($ae_loc.account_id) {
// $ae_api.account_id = $ae_loc.account_id;
// $ae_api.headers['x-account-id'] = $ae_loc.account_id;
// } else {
// console.log(`Account ID not set!!!`);
// }
// }
$events_loc.qry__enabled = 'enabled';
$events_loc.qry__hidden = 'not_hidden';
$events_loc.qry__limit = 25;
$events_loc.qry__offset = 0;
// Quickly save the data passed from the parent to the Svelte stores.
$events_slct.event_id = data.ae_slct.event_id
$events_slct.event_obj = data.ae_slct.event_obj
$events_slct.exhibit_obj_li = data.ae_slct.event_exhibit_obj_li
// Quickly save the data passed from the parent(s) to the Svelte stores, localStorage, and other.
$slct.account_id = data.account_id;
console.log(`$slct.account_id = `, $slct.account_id);
let ae_acct = data[$slct.account_id];
console.log(`ae_acct = `, ae_acct);
$events_slct.event_id = ae_acct.slct.event_id
$events_slct.event_obj = ae_acct.slct.event_obj
$events_slct.exhibit_obj_li = ae_acct.slct.event_exhibit_obj_li
onMount(() => {
console.log('Events Leads: +layout.svelte');
// console.log('ae_ slct:', $slct);
// console.log(window.location.href);
let href_url = window.location.href;
// let href_url = window.location.href;
// $ae_loc.href_url = href_url;
// console.log(`$ae_loc.href_url = `, $ae_loc.href_url);
@@ -52,7 +55,7 @@ onMount(() => {
<svelte:head>
<title>Events Leads - {data.ae_loc.title}</title>
<title>Events Leads - {$events_loc.title}</title>
</svelte:head>