General work through out the day. Lots of interruptions from the dogs.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<script lang="ts">
|
||||
/** @type {import('./$types').LayoutData} */
|
||||
export let data;
|
||||
export let data: any;
|
||||
|
||||
import { goto } from '$app/navigation';
|
||||
import { onMount } from 'svelte';
|
||||
|
||||
@@ -8,11 +9,26 @@ 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_loc.account_id) {
|
||||
$ae_api.account_id = $ae_loc.account_id;
|
||||
$ae_api.headers['x-account-id'] = $ae_loc.account_id;
|
||||
} else {
|
||||
goto('/');
|
||||
}
|
||||
}
|
||||
|
||||
$events_loc.qry__enabled = 'enabled';
|
||||
$events_loc.qry__hidden = 'not_hidden';
|
||||
$events_loc.qry__limit = 25;
|
||||
$events_loc.qry__offset = 0;
|
||||
|
||||
$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
|
||||
|
||||
onMount(() => {
|
||||
console.log('Events Leads: +layout.svelte');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user