Creating version to of the data store element. Hopefully better now.
This commit is contained in:
@@ -61,7 +61,7 @@ import type { key_val } from '$lib/ae_stores';
|
||||
|
||||
import Element_access_type from '$lib/element_access_type.svelte';
|
||||
import Element_app_cfg from '$lib/element_app_cfg.svelte';
|
||||
import Element_data_store from '$lib/element_data_store.svelte';
|
||||
import Element_data_store from '$lib/element_data_store_v2.svelte';
|
||||
|
||||
// let account_id = localStorage.getItem('ae_account_id');
|
||||
// console.log(`account_id = `, account_id);
|
||||
@@ -93,33 +93,28 @@ $slct = {
|
||||
}
|
||||
// console.log(`$slct = `, $slct);
|
||||
|
||||
// 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 ($ae_loc.default__event_id) {
|
||||
$events_slct.event_id = $ae_loc.default__event_id;
|
||||
$events_loc.event_id = $ae_loc.default__event_id;
|
||||
} else {
|
||||
console.log(`No Event ID set.`);
|
||||
console.log(`No Event ID set!`);
|
||||
}
|
||||
|
||||
// This is mainly for Precon CHOW
|
||||
if ($ae_loc.site_cfg_json.slct__sponsorship_cfg_id) {
|
||||
$slct.sponsorship_cfg_id = $ae_loc.site_cfg_json.slct__sponsorship_cfg_id;
|
||||
$ae_loc.mod.sponsorships.cfg_id = $ae_loc.site_cfg_json.slct__sponsorship_cfg_id;
|
||||
} else if ($ae_loc.default__sponsorship_cfg_id) {
|
||||
$slct.sponsorship_cfg_id = $ae_loc.default__sponsorship_cfg_id;
|
||||
$ae_loc.mod.sponsorships.cfg_id = $ae_loc.default__sponsorship_cfg_id;
|
||||
} else if ($ae_loc.sponsorship_cfg_id) {
|
||||
$slct.sponsorship_cfg_id = $ae_loc.sponsorship_cfg_id;
|
||||
$ae_loc.mod.sponsorships.cfg_id = $ae_loc.sponsorship_cfg_id;
|
||||
} else {
|
||||
console.log(`No Sponsorship Config ID set.`);
|
||||
}
|
||||
|
||||
if (!$ae_loc.user_email) {
|
||||
$ae_loc.user_email = 'test@oneskyit.com';
|
||||
}
|
||||
|
||||
if (browser) {
|
||||
// Waiting until the browser exists.
|
||||
if ($ae_loc && $ae_sess && $ae_loc.ver_idb != $ae_sess.ver_idb) {
|
||||
|
||||
Reference in New Issue
Block a user