Slowly updating things to Data Store v3. Also doing some safe code clean up. Mainly removing commented out code.
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
// *** Import Aether specific variables and functions
|
// *** Import Aether specific variables and functions
|
||||||
import type { key_val } from '$lib/stores/ae_stores';
|
import type { key_val } from '$lib/stores/ae_stores';
|
||||||
import { ae_loc, ae_sess, ae_api, slct } from '$lib/stores/ae_stores';
|
import { ae_loc, ae_sess, ae_api, slct } from '$lib/stores/ae_stores';
|
||||||
import Element_data_store from '$lib/elements/element_data_store_v2.svelte';
|
import Element_data_store from '$lib/elements/element_data_store_v3.svelte';
|
||||||
import {
|
import {
|
||||||
events_loc,
|
events_loc,
|
||||||
events_sess,
|
events_sess,
|
||||||
@@ -223,7 +223,10 @@
|
|||||||
<abbr title="Aether - Events Module"> Æ Events </abbr>
|
<abbr title="Aether - Events Module"> Æ Events </abbr>
|
||||||
</span>
|
</span>
|
||||||
{#if !$ae_sess?.disable_sys_header}
|
{#if !$ae_sess?.disable_sys_header}
|
||||||
<Element_data_store ds_code="hub__site__appshell_header" ds_type="html" />
|
<Element_data_store
|
||||||
|
ds_code="hub__site__appshell_header"
|
||||||
|
ds_type="html"
|
||||||
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
<a
|
<a
|
||||||
href="/"
|
href="/"
|
||||||
|
|||||||
@@ -7,12 +7,10 @@
|
|||||||
let { data }: Props = $props();
|
let { data }: Props = $props();
|
||||||
|
|
||||||
let log_lvl: number = $state(0);
|
let log_lvl: number = $state(0);
|
||||||
// console.log(`ae_events_pres_mgmt location [slug] +page.svelte data:`, data);
|
|
||||||
|
|
||||||
// Imports
|
// Imports
|
||||||
// import type { key_val } from '$lib/ae_stores';
|
// import type { key_val } from '$lib/ae_stores';
|
||||||
import { ae_util } from '$lib/ae_utils/ae_utils';
|
import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||||
// import Element_data_store from '$lib/element_data_store_v2.svelte';
|
|
||||||
|
|
||||||
// let ae_promises: key_val = {};
|
// let ae_promises: key_val = {};
|
||||||
// let ae_tmp: key_val = {};
|
// let ae_tmp: key_val = {};
|
||||||
@@ -53,21 +51,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Quickly save the data passed from the parent(s) to the Svelte stores, localStorage, and other.
|
// Quickly save the data passed from the parent(s) to the Svelte stores, localStorage, and other.
|
||||||
// $slct.account_id = data.account_id;
|
|
||||||
// console.log(`$slct.account_id = `, $slct.account_id);
|
|
||||||
let ae_acct = data[$slct.account_id];
|
let ae_acct = data[$slct.account_id];
|
||||||
// console.log(`ae_acct = `, ae_acct);
|
|
||||||
|
|
||||||
$ae_loc.url_origin = data.url.origin;
|
$ae_loc.url_origin = data.url.origin;
|
||||||
|
|
||||||
$events_slct.event_id = ae_acct.slct.event_id;
|
$events_slct.event_id = ae_acct.slct.event_id;
|
||||||
// $events_slct.event_obj = ae_acct.slct.event_obj;
|
|
||||||
$events_slct.event_location_id = ae_acct.slct.event_location_id;
|
$events_slct.event_location_id = ae_acct.slct.event_location_id;
|
||||||
// $events_slct.event_location_obj = ae_acct.slct.event_location_obj;
|
|
||||||
$events_slct.event_session_id = null;
|
$events_slct.event_session_id = null;
|
||||||
// $events_slct.event_session_obj = null;
|
|
||||||
$events_slct.event_session_obj_li = ae_acct.slct.event_session_obj_li;
|
$events_slct.event_session_obj_li = ae_acct.slct.event_session_obj_li;
|
||||||
// $events_slct.event_file_obj_li = ae_acct.slct.event_file_obj_li;
|
|
||||||
|
|
||||||
if (!$events_loc.pres_mgmt) {
|
if (!$events_loc.pres_mgmt) {
|
||||||
$events_loc.pres_mgmt = {};
|
$events_loc.pres_mgmt = {};
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
import { events_func } from '$lib/ae_events_functions';
|
import { events_func } from '$lib/ae_events_functions';
|
||||||
|
|
||||||
import Element_ae_crud from '$lib/elements/element_ae_crud.svelte';
|
import Element_ae_crud from '$lib/elements/element_ae_crud.svelte';
|
||||||
import Element_data_store from '$lib/elements/element_data_store_v2.svelte';
|
import Element_data_store from '$lib/elements/element_data_store_v3.svelte';
|
||||||
import Comp__events_menu_nav from '../../../../ae_comp__events_menu_nav.svelte';
|
import Comp__events_menu_nav from '../../../../ae_comp__events_menu_nav.svelte';
|
||||||
|
|
||||||
let ae_tmp: key_val = $state({});
|
let ae_tmp: key_val = $state({});
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
import type { key_val } from '$lib/stores/ae_stores';
|
import type { key_val } from '$lib/stores/ae_stores';
|
||||||
import { ae_util } from '$lib/ae_utils/ae_utils';
|
import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||||
import Element_data_store from '$lib/elements/element_data_store_v2.svelte';
|
import Element_data_store from '$lib/elements/element_data_store_v3.svelte';
|
||||||
|
|
||||||
let ae_promises: key_val = {};
|
let ae_promises: key_val = {};
|
||||||
let ae_tmp: key_val = {};
|
let ae_tmp: key_val = {};
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
// import { browser } from '$app/environment';
|
// import { browser } from '$app/environment';
|
||||||
|
|
||||||
// *** Import other supporting libraries
|
// *** Import other supporting libraries
|
||||||
// import * as icons from '@lucide/svelte';
|
|
||||||
import { Brain, House, Library, RefreshCw, Satellite } from '@lucide/svelte';
|
import { Brain, House, Library, RefreshCw, Satellite } from '@lucide/svelte';
|
||||||
|
|
||||||
// *** Import Aether specific variables and functions
|
// *** Import Aether specific variables and functions
|
||||||
@@ -21,8 +20,7 @@
|
|||||||
slct,
|
slct,
|
||||||
slct_trigger
|
slct_trigger
|
||||||
} from '$lib/stores/ae_stores';
|
} from '$lib/stores/ae_stores';
|
||||||
// import { core_func } from '$lib/ae_core/ae_core_functions';
|
// import Element_data_store from '$lib/elements/element_data_store_v3.svelte';
|
||||||
import Element_data_store from '$lib/elements/element_data_store_v2.svelte';
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
/** @type {import('./$types').LayoutData} */
|
/** @type {import('./$types').LayoutData} */
|
||||||
|
|||||||
@@ -41,8 +41,6 @@
|
|||||||
|
|
||||||
import Archive_obj_id_edit from './ae_idaa_comp__archive_obj_id_edit.svelte';
|
import Archive_obj_id_edit from './ae_idaa_comp__archive_obj_id_edit.svelte';
|
||||||
import Archive_view from './ae_idaa_comp__archive_obj_id_view.svelte';
|
import Archive_view from './ae_idaa_comp__archive_obj_id_view.svelte';
|
||||||
// import Archive_page_menu from './session_page_menu.svelte';
|
|
||||||
// import Element_data_store from '$lib/element_data_store_v2.svelte';
|
|
||||||
|
|
||||||
import Archive_content_obj_li from './ae_idaa_comp__archive_content_obj_li.svelte';
|
import Archive_content_obj_li from './ae_idaa_comp__archive_content_obj_li.svelte';
|
||||||
import Archive_content_obj_id_edit from './ae_idaa_comp__archive_content_obj_id_edit.svelte';
|
import Archive_content_obj_id_edit from './ae_idaa_comp__archive_content_obj_id_edit.svelte';
|
||||||
@@ -54,17 +52,6 @@
|
|||||||
// let ae_tmp: key_val = {};
|
// let ae_tmp: key_val = {};
|
||||||
// let ae_triggers: key_val = {};
|
// let ae_triggers: key_val = {};
|
||||||
|
|
||||||
// Variables
|
|
||||||
|
|
||||||
// let archive_content_id = page.url.searchParams.get('archive_content_id') ?? null;
|
|
||||||
// if (!archive_content_id) {
|
|
||||||
// $idaa_slct.archive_content_id = null;
|
|
||||||
// } else {
|
|
||||||
// console.log(`ae Archives - [archive_content_id] +page.ts: archive_content_id = `, archive_content_id);
|
|
||||||
// $idaa_slct.archive_content_id = archive_content_id;
|
|
||||||
// $idaa_trig.archive_content_id = archive_content_id;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// *** Quickly pull out data from parent(s)
|
// *** Quickly pull out data from parent(s)
|
||||||
let ae_acct = data[$slct.account_id];
|
let ae_acct = data[$slct.account_id];
|
||||||
if (log_lvl) {
|
if (log_lvl) {
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
} from '$lib/stores/ae_stores';
|
} from '$lib/stores/ae_stores';
|
||||||
import { events_func } from '$lib/ae_events_functions';
|
import { events_func } from '$lib/ae_events_functions';
|
||||||
|
|
||||||
import Element_data_store from '$lib/elements/element_data_store_v2.svelte';
|
import Element_data_store from '$lib/elements/element_data_store_v3.svelte';
|
||||||
import Comp__event_obj_qry from './ae_idaa_comp__event_obj_qry.svelte';
|
import Comp__event_obj_qry from './ae_idaa_comp__event_obj_qry.svelte';
|
||||||
import Comp__event_obj_li_wrapper from './ae_idaa_comp__event_obj_li_wrapper.svelte';
|
import Comp__event_obj_li_wrapper from './ae_idaa_comp__event_obj_li_wrapper.svelte';
|
||||||
|
|
||||||
|
|||||||
@@ -20,14 +20,7 @@
|
|||||||
} from '$lib/stores/ae_stores';
|
} from '$lib/stores/ae_stores';
|
||||||
import { core_func } from '$lib/ae_core/ae_core_functions';
|
import { core_func } from '$lib/ae_core/ae_core_functions';
|
||||||
import { idaa_loc, idaa_sess, idaa_slct } from '$lib/stores/ae_idaa_stores';
|
import { idaa_loc, idaa_sess, idaa_slct } from '$lib/stores/ae_idaa_stores';
|
||||||
import Element_data_store from '$lib/elements/element_data_store_v2.svelte';
|
import Element_data_store from '$lib/elements/element_data_store_v3.svelte';
|
||||||
|
|
||||||
// const modalRegistry: Record<string, ModalComponent> = {
|
|
||||||
// // Set a unique modal ID, then pass the component reference
|
|
||||||
// // modalComponentEditSponsorshipObj: { ref: ModalComponentEditSponsorshipObj },
|
|
||||||
// // modalComponentTwo: { ref: ModalComponentTwo },
|
|
||||||
// // ...
|
|
||||||
// };
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
/** @type {import('./$types').LayoutData} */
|
/** @type {import('./$types').LayoutData} */
|
||||||
@@ -37,13 +30,6 @@
|
|||||||
|
|
||||||
let { data, children }: Props = $props();
|
let { data, children }: Props = $props();
|
||||||
|
|
||||||
// if (browser) {
|
|
||||||
// add_activity_log({
|
|
||||||
// action: 'idaa_root_layout',
|
|
||||||
// action_with: 'browser'
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
|
|
||||||
function add_activity_log({
|
function add_activity_log({
|
||||||
action = 'idaa_root_layout',
|
action = 'idaa_root_layout',
|
||||||
action_with = 'none'
|
action_with = 'none'
|
||||||
@@ -179,15 +165,6 @@
|
|||||||
// });
|
// });
|
||||||
});
|
});
|
||||||
|
|
||||||
// if (browser) {
|
|
||||||
// $idaa_loc.novi_uuid = data.params.uuid;
|
|
||||||
// $idaa_loc.novi_email = decodeURIComponent(data.params.email);
|
|
||||||
// $idaa_loc.novi_full_name = decodeURIComponent(data.params.full_name);
|
|
||||||
// // $idaa_loc.novi_admin_li = novi_admin_li;
|
|
||||||
// // $idaa_loc.novi_trusted_li = novi_trusted_li;
|
|
||||||
// console.log(`$idaa_loc.novi_uuid:`, $idaa_loc.novi_uuid);
|
|
||||||
// }
|
|
||||||
|
|
||||||
let iframe = data.url.searchParams.get('iframe');
|
let iframe = data.url.searchParams.get('iframe');
|
||||||
if (browser && iframe == 'true') {
|
if (browser && iframe == 'true') {
|
||||||
console.log('Use iframe layout!');
|
console.log('Use iframe layout!');
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
journals_slct,
|
journals_slct,
|
||||||
journals_trig
|
journals_trig
|
||||||
} from '$lib/ae_journals/ae_journals_stores';
|
} from '$lib/ae_journals/ae_journals_stores';
|
||||||
import Element_data_store from '$lib/elements/element_data_store_v2.svelte';
|
import Element_data_store from '$lib/elements/element_data_store_v3.svelte';
|
||||||
import Help_tech from '$lib/app_components/e_app_help_tech.svelte';
|
import Help_tech from '$lib/app_components/e_app_help_tech.svelte';
|
||||||
|
|
||||||
// *** Setup Svelte properties
|
// *** Setup Svelte properties
|
||||||
|
|||||||
@@ -30,12 +30,9 @@
|
|||||||
journals_prom,
|
journals_prom,
|
||||||
journals_trig
|
journals_trig
|
||||||
} from '$lib/ae_journals/ae_journals_stores';
|
} from '$lib/ae_journals/ae_journals_stores';
|
||||||
// import { journals_func } from '$lib/ae_journals/ae_journals_functions';
|
|
||||||
|
|
||||||
// import Journal_entry_obj_id_edit from './ae_journals_comp__journal_entry_obj_id_edit.svelte';
|
|
||||||
import Journal_entry_view from './../../../ae_comp__journal_entry_obj_id_view.svelte';
|
import Journal_entry_view from './../../../ae_comp__journal_entry_obj_id_view.svelte';
|
||||||
// import Journal_page_menu from './session_page_menu.svelte';
|
// import Element_data_store from '$lib/elements/element_data_store_v3.svelte';
|
||||||
// import Element_data_store from '$lib/element_data_store_v2.svelte';
|
|
||||||
import AeCompModalJournalExport from '../../../ae_comp__modal_journal_export.svelte';
|
import AeCompModalJournalExport from '../../../ae_comp__modal_journal_export.svelte';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
@@ -183,59 +180,6 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// $effect(() => {
|
|
||||||
// if (browser && $lq__journal_entry_obj?.journal_entry_id) {
|
|
||||||
|
|
||||||
// // $journals_loc.entry_view_history_li = [...new Set($journals_loc.entry_view_history_li)]
|
|
||||||
|
|
||||||
// let tmp_history_li = [
|
|
||||||
// ...new Set($journals_loc?.entry_view_history_li ?? [])
|
|
||||||
// ];
|
|
||||||
|
|
||||||
// // Limit to last 15 entries
|
|
||||||
// if (tmp_history_li.length > 15) {
|
|
||||||
// tmp_history_li = tmp_history_li.slice(tmp_history_li.length - 15);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // let chk_history_li = tmp_history_li?.filter(item => item.id === $lq__journal_entry_obj?.journal_entry_id);
|
|
||||||
|
|
||||||
// // if (chk_history_li?.length) {
|
|
||||||
// // // Already in history, do not add again
|
|
||||||
// // console.log(`Entry ID = ${$lq__journal_entry_obj?.journal_entry_id} already in history, not adding again.`, tmp_history_li);
|
|
||||||
|
|
||||||
// // // if (tmp_history_li !== $journals_loc.entry_view_history_li) {
|
|
||||||
// // if (JSON.stringify(tmp_history_li) !== JSON.stringify($journals_loc.entry_view_history_li)) {
|
|
||||||
// // $journals_loc.entry_view_history_li = tmp_history_li;
|
|
||||||
|
|
||||||
// // console.log(`$journals_loc.entry_view_history_li = `, $journals_loc.entry_view_history_li);
|
|
||||||
// // }
|
|
||||||
|
|
||||||
// // return;
|
|
||||||
// // }
|
|
||||||
|
|
||||||
// tmp_history_li.push({
|
|
||||||
// id: $lq__journal_entry_obj?.journal_entry_id ?? 'NONE',
|
|
||||||
// name: $lq__journal_entry_obj?.name ?? ae_util.iso_datetime_formatter($lq__journal_entry_obj?.created_on, 'datetime_iso_12_no_seconds'),
|
|
||||||
// url: `/journals/${$lq__journal_entry_obj?.journal_id ?? 'NONE'}/entry/${$lq__journal_entry_obj?.journal_entry_id ?? 'NONE'}`,
|
|
||||||
// });
|
|
||||||
|
|
||||||
// // Remove duplicates and keep most recent
|
|
||||||
// tmp_history_li = [...new Set(tmp_history_li.map(item => JSON.stringify(item)))].map(item => JSON.parse(item));
|
|
||||||
|
|
||||||
// // Limit to last 15 entries
|
|
||||||
// if (tmp_history_li.length > 15) {
|
|
||||||
// tmp_history_li = tmp_history_li.slice(tmp_history_li.length - 15);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (JSON.stringify(tmp_history_li) !== JSON.stringify($journals_loc?.entry_view_history_li)) {
|
|
||||||
// $journals_loc.entry_view_history_li = tmp_history_li;
|
|
||||||
|
|
||||||
// console.log(`$journals_loc.entry_view_history_li = `, $journals_loc?.entry_view_history_li);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// console.log(`$journals_loc.entry_view_history_li = `, $journals_loc?.entry_view_history_li);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
if (browser && $lq__journal_entry_obj?.journal_entry_id) {
|
if (browser && $lq__journal_entry_obj?.journal_entry_id) {
|
||||||
|
|||||||
Reference in New Issue
Block a user