Sponsorships and Speakers are working and looking pretty well. Other general clean up.
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import { localStorageStore } from '@skeletonlabs/skeleton'
|
||||
import { readable, writable } from 'svelte/store';
|
||||
import { get, readable, writable } from 'svelte/store';
|
||||
import type { get, Writable } from 'svelte/store';
|
||||
|
||||
|
||||
import { PUBLIC_TESTING, PUBLIC_AE_API_PROTOCOL, PUBLIC_AE_API_SERVER, PUBLIC_AE_API_BAK_SERVER, PUBLIC_AE_API_PORT, PUBLIC_AE_API_PATH, PUBLIC_AE_API_SECRET_KEY, PUBLIC_AE_API_CRUD_SUPER_KEY, PUBLIC_AE_NO_ACCOUNT_ID, PUBLIC_AE_NO_ACCOUNT_ID_TOKEN, PUBLIC_AE_ACCOUNT_ID, PUBLIC_AE_EVENT_ID, PUBLIC_AE_SPONSORSHIP_CFG_ID } from '$env/static/public';
|
||||
console.log(`Aether Config - TESTING:`, PUBLIC_TESTING);
|
||||
console.log(`AE Stores - PUBLIC_TESTING:`, PUBLIC_TESTING);
|
||||
|
||||
const api_base_url = `${PUBLIC_AE_API_PROTOCOL}://${PUBLIC_AE_API_SERVER}:${PUBLIC_AE_API_PORT}${PUBLIC_AE_API_PATH}`;
|
||||
const api_base_url_bak = `${PUBLIC_AE_API_PROTOCOL}://${PUBLIC_AE_API_BAK_SERVER}:${PUBLIC_AE_API_PORT}${PUBLIC_AE_API_PATH}`;
|
||||
@@ -19,28 +19,24 @@ const ae_no_account_id_token = PUBLIC_AE_NO_ACCOUNT_ID_TOKEN;
|
||||
const ae_event_id = PUBLIC_AE_EVENT_ID;
|
||||
const ae_sponsorship_cfg_id = PUBLIC_AE_SPONSORSHIP_CFG_ID;
|
||||
|
||||
// import { api } from '$lib/api';
|
||||
// console.log(`Aether Config - API:`, api);
|
||||
|
||||
// import { getStores, navigating, page, updated } from '$app/stores';
|
||||
// import { assets, base, resolveRoute } from '$app/paths';
|
||||
// console.log(page.path); // Everything after the domian name
|
||||
|
||||
|
||||
// const hostname = base;
|
||||
|
||||
// console.log(import.meta.env.MODE);
|
||||
// console.log(import.meta.env.BASE_URL);
|
||||
|
||||
type key_val = {
|
||||
|
||||
// Export the key_val type for use in other files.
|
||||
export type key_val = {
|
||||
[key: string]: any; // variable key
|
||||
// name: string;
|
||||
};
|
||||
|
||||
// export type key_val = key_val;
|
||||
|
||||
// *** BEGIN *** Longer-term app data. This should be stored to local storage.
|
||||
export let ae_app_local_data_struct: key_val = {
|
||||
'ver': '2024-02-22_17',
|
||||
'ver': '2024-02-27_13',
|
||||
'name': 'Aether App Template',
|
||||
'theme': 'light',
|
||||
|
||||
@@ -60,10 +56,25 @@ export let ae_app_local_data_struct: key_val = {
|
||||
|
||||
'ds': {},
|
||||
'hub': {
|
||||
'ds': {},
|
||||
'show_xyz': 'abc',
|
||||
},
|
||||
'mod': { // module
|
||||
'events': {},
|
||||
'mod': {
|
||||
'archives': {},
|
||||
|
||||
'events': {
|
||||
// Badge Printing
|
||||
|
||||
// Lead Retrievals
|
||||
|
||||
// Presentation Management
|
||||
|
||||
// other
|
||||
},
|
||||
|
||||
'journals': {},
|
||||
|
||||
'posts': {},
|
||||
|
||||
'sponsorships': {
|
||||
'cfg_id': ae_sponsorship_cfg_id,
|
||||
|
||||
@@ -75,16 +86,18 @@ export let ae_app_local_data_struct: key_val = {
|
||||
show_view__sponsorship_obj: false,
|
||||
disable_submit__sponsorship_obj: false,
|
||||
},
|
||||
|
||||
'testing': {},
|
||||
},
|
||||
}
|
||||
console.log(`Aether Config - App Local Storage Data:`, ae_app_local_data_struct);
|
||||
console.log(`AE Stores - App Local Storage Data:`, ae_app_local_data_struct);
|
||||
|
||||
// This works, but does not uses local storage:
|
||||
// export let ae_loc = writable(ae_app_local_data_struct);
|
||||
|
||||
// This works and uses local storage:
|
||||
export let ae_loc: Writable<key_val> = localStorageStore('ae_loc', ae_app_local_data_struct);
|
||||
console.log(`AE Stores - App Local Storage Data:`, get(ae_loc));
|
||||
|
||||
|
||||
// This does not work yet...? Don't use.
|
||||
@@ -94,13 +107,32 @@ export let ae_loc: Writable<key_val> = localStorageStore('ae_loc', ae_app_local_
|
||||
|
||||
// *** BEGIN *** Temporary app data. This should be stored to session storage.
|
||||
export let ae_app_session_data_struct: key_val = {
|
||||
'ver': '2024-02-22_17',
|
||||
'ver': '2024-02-27_13',
|
||||
// 'name': 'Aether App Template',
|
||||
// 'theme': 'light',
|
||||
// 'account_id': ae_account_id,
|
||||
// 'obj': {},
|
||||
}
|
||||
console.log(`Aether Config - App Session Storage Data:`, ae_app_session_data_struct);
|
||||
'ds': {},
|
||||
'hub': {
|
||||
'show_xyz': null,
|
||||
},
|
||||
'mod': {
|
||||
'archives': {},
|
||||
'events': {
|
||||
// Badge Printing
|
||||
|
||||
// Lead Retrievals
|
||||
|
||||
// Presentation Management
|
||||
|
||||
// other
|
||||
},
|
||||
'journals': {},
|
||||
'posts': {},
|
||||
'sponsorships': {},
|
||||
'testing': {},
|
||||
},
|
||||
};
|
||||
console.log(`AE Stores - App Session Storage Data:`, ae_app_session_data_struct);
|
||||
export let ae_sess = writable(ae_app_session_data_struct);
|
||||
|
||||
|
||||
@@ -114,7 +146,7 @@ export let ae_api_data_struct: key_val = {
|
||||
'api_crud_super_key': api_crud_super_key, // 'YOUR_SUPER_KEY' 'zp5PtX4zUsI'
|
||||
'headers': {},
|
||||
'account_id': ae_account_id,
|
||||
}
|
||||
};
|
||||
|
||||
let ae_api_headers: key_val = {};
|
||||
ae_api_headers['Access-Control-Allow-Origin'] = '*';
|
||||
@@ -132,40 +164,53 @@ if (ae_no_account_id) {
|
||||
}
|
||||
ae_api_data_struct['headers'] = ae_api_headers;
|
||||
|
||||
console.log(`Aether Config - API Data:`, ae_api_data_struct);
|
||||
console.log(`AE Stores - API Data:`, ae_api_data_struct);
|
||||
export let ae_api = writable(ae_api_data_struct);
|
||||
|
||||
|
||||
/* *** BEGIN *** Initialize slct_trigger and slct variables */
|
||||
// Updated 2024-02-15
|
||||
/* *** BEGIN *** Initialize slct_trigger and slct variables. The slct variable can be stored with local storage. */
|
||||
// Updated 2024-02-27
|
||||
export let slct_trigger: any = writable(null);
|
||||
console.log(`Aether Config - Selected Trigger:`, slct_trigger);
|
||||
// console.log(`AE Stores - Selected Trigger:`, slct_trigger);
|
||||
|
||||
let slct_obj_template: key_val = {
|
||||
'account_id': ae_account_id,
|
||||
'account_obj': {},
|
||||
'event_id': null,
|
||||
'event_obj': {},
|
||||
'event_obj_li': [],
|
||||
'event_exhibit_id': null,
|
||||
'event_exhibit_obj': {},
|
||||
'event_exhibit_obj_li': [],
|
||||
'event_presentation_id': null,
|
||||
'event_presentation_obj': {},
|
||||
'event_presentation_obj_li': [],
|
||||
'event_presenter_id': null,
|
||||
'event_presenter_obj': {},
|
||||
'event_presenter_obj_li': [],
|
||||
'event_session_id': null,
|
||||
'event_session_obj': {},
|
||||
'event_session_obj_li': [],
|
||||
'sponsorship_id': null,
|
||||
'sponsorship_obj': {},
|
||||
'sponsorship_obj_li': [],
|
||||
'sponsorship_cfg_id': ae_sponsorship_cfg_id,
|
||||
'sponsorship_cfg_obj': {},
|
||||
'sponsorship_cfg_obj_li': [],
|
||||
'post_id': null,
|
||||
'post_obj': {},
|
||||
'post_obj_li': [],
|
||||
'post_comment_id': null,
|
||||
'post_comment_obj': {},
|
||||
'post_comment_obj_li': [] };
|
||||
console.log(`Aether Config - Selected Objects:`, slct_obj_template);
|
||||
export let slct = writable(slct_obj_template);
|
||||
'post_comment_obj_li': []
|
||||
};
|
||||
// console.log(`AE Stores - Selected Objects:`, slct_obj_template);
|
||||
|
||||
// This works, but does not uses local storage:
|
||||
// export let slct = writable(slct_obj_template);
|
||||
|
||||
// This works and uses local storage:
|
||||
export let slct: Writable<key_val> = localStorageStore('ae_slct', slct_obj_template);
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user