Changes. Work on new review page searching.
This commit is contained in:
154
src/lib/ae_events_stores.ts
Normal file
154
src/lib/ae_events_stores.ts
Normal file
@@ -0,0 +1,154 @@
|
||||
import { localStorageStore } from '@skeletonlabs/skeleton';
|
||||
import { writable } from 'svelte/store';
|
||||
import type { Writable } from 'svelte/store';
|
||||
|
||||
import type { key_val } from '$lib/ae_stores';
|
||||
|
||||
/* *** BEGIN *** Initialize events_local_data_struct */
|
||||
// Longer-term app data. This should be stored to *local* storage.
|
||||
// Updated 2024-03-06
|
||||
let events_local_data_struct: key_val = {
|
||||
'ver': '2024-03-06_17',
|
||||
// Shared
|
||||
'name': 'Aether - Events (SvelteKit 2.x Svelte 4.x)',
|
||||
'title': `OSIT's Æ Events - Dev SvelteKit`, // Æ
|
||||
|
||||
'ds': {},
|
||||
|
||||
'events_cfg_json': {},
|
||||
|
||||
'default__event_id': null, // OSIT Demo pjrcghqwert
|
||||
'default__location_id': null,
|
||||
'default__session_id': null,
|
||||
|
||||
// all, disabled, enabled
|
||||
'qry__enabled': 'enabled',
|
||||
// all, hidden, not_hidden
|
||||
'qry__hidden': 'not_hidden',
|
||||
'qry__limit': 20,
|
||||
'qry__offset': 0,
|
||||
|
||||
// Badge Printing
|
||||
'badges': {
|
||||
'show_element__cfg': true,
|
||||
'show_element__cfg_detail': false,
|
||||
'show_element__access_type': true,
|
||||
'theme_mode': 'dark',
|
||||
'theme_name': 'wintry',
|
||||
|
||||
'classes__form': 'border border-surface-200 p-4 space-y-4 rounded-container-token',
|
||||
},
|
||||
|
||||
// Lead Retrievals (Exhibit)
|
||||
|
||||
// Presentation Management (Distributing)
|
||||
|
||||
// Speakers Management (Collection)
|
||||
'speakers': {
|
||||
'default__session_id': null, // Assign to new presenters by default
|
||||
status__submit: null, // 'saving', 'created', 'updated'
|
||||
},
|
||||
|
||||
// other
|
||||
}
|
||||
console.log(`AE Stores - App Events Local Storage Data:`, events_local_data_struct);
|
||||
|
||||
// This works, but does not uses local storage:
|
||||
// export let ae_loc = writable(events_local_data_struct);
|
||||
|
||||
// This works and uses *local* storage:
|
||||
export let events_loc: Writable<key_val> = localStorageStore('ae_ events_loc', events_local_data_struct);
|
||||
// console.log(`AE Stores - App Local Storage Data:`, get(ae_loc));
|
||||
|
||||
|
||||
/* *** BEGIN *** Initialize events_session_data_struct */
|
||||
// Temporary app data. This should be stored to session storage.
|
||||
// Updated 2024-03-06
|
||||
let events_session_data_struct: key_val = {
|
||||
'ver': '2024-03-06_17',
|
||||
// Shared
|
||||
'ds': {
|
||||
'submit_status': null,
|
||||
},
|
||||
'ds_loaded': {
|
||||
},
|
||||
|
||||
// Badge Printing
|
||||
'badges': {
|
||||
'status_qry__search': null,
|
||||
},
|
||||
|
||||
// Lead Retrievals (Exhibit)
|
||||
|
||||
// Presentation Management (Distributing)
|
||||
|
||||
// Speakers Management (Collection)
|
||||
|
||||
// other
|
||||
};
|
||||
console.log(`AE Stores - App Events Session Storage Data:`, events_session_data_struct);
|
||||
export let events_sess = writable(events_session_data_struct);
|
||||
|
||||
|
||||
/* *** BEGIN *** Initialize ae_events_slct */
|
||||
// Updated 2024-03-06
|
||||
let events_slct_obj_template: key_val = {
|
||||
// Top level
|
||||
'event_id': null,
|
||||
'event_obj': {},
|
||||
'event_obj_li': [],
|
||||
|
||||
// Sub-level event_
|
||||
'abstract_id': null,
|
||||
'abstract_obj': {},
|
||||
'abstract_obj_li': [],
|
||||
'badge_id': null,
|
||||
'badge_obj': {},
|
||||
'badge_obj_li': [],
|
||||
'badge_template_id': null,
|
||||
'badge_template_obj': {},
|
||||
'badge_template_obj_li': [],
|
||||
'device_id': null,
|
||||
'device_obj': {},
|
||||
'device_obj_li': [],
|
||||
'exhibit_id': null,
|
||||
'exhibit_obj': {},
|
||||
'exhibit_obj_li': [],
|
||||
|
||||
// Rename these to badge_tracking_*?
|
||||
'exhibit_tracking_id': null,
|
||||
'exhibit_tracking_obj': {},
|
||||
'exhibit_tracking_obj_li': [],
|
||||
|
||||
'file_id': null,
|
||||
'file_obj': {},
|
||||
'file_obj_li': [],
|
||||
'location_id': null,
|
||||
'location_obj': {},
|
||||
'location_obj_li': [],
|
||||
'person_id': null,
|
||||
'person_obj': {},
|
||||
'person_obj_li': [],
|
||||
'presentation_id': null,
|
||||
'presentation_obj': {},
|
||||
'presentation_obj_li': [],
|
||||
'presenter_id': null,
|
||||
'presenter_obj': {},
|
||||
'presenter_obj_li': [],
|
||||
'session_id': null,
|
||||
'session_obj': {},
|
||||
'session_obj_li': [],
|
||||
};
|
||||
// console.log(`AE Stores - Selected Events Objects:`, events_slct_obj_template);
|
||||
|
||||
// This works, but does not uses local storage:
|
||||
// export let slct = writable(events_slct_obj_template);
|
||||
|
||||
// This works and uses *local* storage:
|
||||
export let events_slct: Writable<key_val> = localStorageStore('ae_events_slct', events_slct_obj_template);
|
||||
|
||||
|
||||
/* *** BEGIN *** Initialize ae_events_trigger */
|
||||
// Updated 2024-03-06
|
||||
export let events_trigger: any = writable(null);
|
||||
// console.log(`AE Stores - Selected Trigger:`, ae_events_trigger);
|
||||
@@ -36,8 +36,8 @@ export type 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-03-04_10',
|
||||
'name': 'Aether App SvelteKit Template',
|
||||
'ver': '2024-03-06_18',
|
||||
'name': 'Aether - App Hub (SvelteKit 2.x Svelte 4.x)',
|
||||
'theme': 'light',
|
||||
'iframe': false,
|
||||
'title': `OSIT's Æ - Dev SvelteKit`, // Æ
|
||||
|
||||
@@ -9,10 +9,11 @@ import { ae_util } from '$lib/ae_utils';
|
||||
import type { key_val } from '$lib/ae_stores';
|
||||
|
||||
export let ds_code: string;
|
||||
export let ds_name: string;
|
||||
export let ds_name: null|string = null;
|
||||
export let ds_type: string = 'text';
|
||||
export let for_type: null|string;
|
||||
export let for_id: null|string;
|
||||
console.log(`ae_e_data_store ${ds_code} for_type=${for_type} for_id=${for_id}`);
|
||||
|
||||
export let store: string = 'local';
|
||||
export let display: string = 'block';
|
||||
|
||||
Reference in New Issue
Block a user