Stuck and done for the night

This commit is contained in:
Scott Idem
2024-03-20 19:39:48 -04:00
parent e21b7ef584
commit c490bca265
5 changed files with 192 additions and 48 deletions

View File

@@ -52,6 +52,7 @@ storePopup.set({ computePosition, autoUpdate, flip, shift, offset, arrow });
import { api } from '$lib/api';
import { ae_loc, ae_sess, ae_api, slct, slct_trigger } from '$lib/ae_stores';
import { events_loc, events_slct } from '$lib/ae_events_stores';
import type { key_val } from '$lib/ae_stores';
// console.log($ae_loc, $ae_sess, $ae_api);
@@ -60,6 +61,21 @@ import Element_app_cfg from '$lib/element_app_cfg.svelte';
import Element_data_store from '$lib/element_data_store.svelte';
if (data.url.searchParams.get('event_id')) {
$events_slct.event_id = data.url.searchParams.get('event_id');
$events_loc.event_id = data.url.searchParams.get('event_id');
} else if (data.ae_loc.site_cfg_json.slct__event_id) {
$events_slct.event_id = data.ae_loc.site_cfg_json.slct__event_id;
$events_loc.event_id = data.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 (data.ae_loc.default__event_id) {
$events_slct.event_id = data.ae_loc.default__event_id;
$events_loc.event_id = data.ae_loc.default__event_id;
} else {
console.log(`No Event ID set.`);
}
onMount(() => {