Slowly updating things to Data Store v3. Also doing some safe code clean up. Mainly removing commented out code.
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
journals_slct,
|
||||
journals_trig
|
||||
} 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';
|
||||
|
||||
// *** Setup Svelte properties
|
||||
|
||||
@@ -30,12 +30,9 @@
|
||||
journals_prom,
|
||||
journals_trig
|
||||
} 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_page_menu from './session_page_menu.svelte';
|
||||
// import Element_data_store from '$lib/element_data_store_v2.svelte';
|
||||
// import Element_data_store from '$lib/elements/element_data_store_v3.svelte';
|
||||
import AeCompModalJournalExport from '../../../ae_comp__modal_journal_export.svelte';
|
||||
|
||||
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(() => {
|
||||
if (browser && $lq__journal_entry_obj?.journal_entry_id) {
|
||||
|
||||
Reference in New Issue
Block a user