diff --git a/src/routes/journals/[journal_id]/+layout.svelte b/src/routes/journals/[journal_id]/+layout.svelte
index 42b68b64..c28db4e9 100644
--- a/src/routes/journals/[journal_id]/+layout.svelte
+++ b/src/routes/journals/[journal_id]/+layout.svelte
@@ -4,35 +4,40 @@ let log_lvl: number = $state(0);
let { data, children } = $props();
+// *** Import Svelte specific
import { goto } from '$app/navigation';
+
+// *** Import other supporting libraries
import {
- ArrowDown01, ArrowDown10, ArrowDownUp,
- BetweenVerticalEnd, BetweenVerticalStart,
- BookHeart, BookImage, Bookmark, BookOpenText, BriefcaseBusiness,
- Check, Copy,
- Expand, Eye, EyeOff,
- Flag, FlagOff, FilePlus, Fingerprint,
- Globe,
- Library,
- MessageSquareWarning, Minus,
- Notebook,
- Pencil, Plus,
- RemoveFormatting,
- SquareLibrary,
- Shapes, Share2, ShieldCheck, ShieldMinus, Siren, Skull,
- Tags, Target, ToggleLeft, ToggleRight, Trash2, TypeOutline,
- X
- } from '@lucide/svelte';
+ ArrowDown01, ArrowDown10, ArrowDownUp,
+ BetweenVerticalEnd, BetweenVerticalStart,
+ BookHeart, BookImage, Bookmark, BookOpenText, BriefcaseBusiness,
+ Check, Copy,
+ Expand, Eye, EyeOff,
+ Flag, FlagOff, FilePlus, Fingerprint,
+ Globe,
+ Library,
+ MessageSquareWarning, Minus,
+ Notebook,
+ Pencil, Plus,
+ RemoveFormatting,
+ SquareLibrary,
+ Shapes, Share2, ShieldCheck, ShieldMinus, Siren, Skull,
+ Tags, Target, ToggleLeft, ToggleRight, Trash2, TypeOutline,
+ X
+} from '@lucide/svelte';
import { liveQuery } from "dexie";
-import { Modal } from 'flowbite-svelte';
+// import { Modal } from 'flowbite-svelte';
-import { ae_util } from '$lib/ae_utils/ae_utils';
+// import { ae_util } from '$lib/ae_utils/ae_utils';
import { db_journals } from "$lib/ae_journals/db_journals";
import { ae_snip, ae_loc, ae_sess, ae_api, ae_trig, slct, slct_trigger } from '$lib/ae_stores';
import { journals_loc, journals_sess, journals_slct, journals_prom, journals_trig } from '$lib/ae_journals/ae_journals_stores';
import { journals_func } from '$lib/ae_journals/ae_journals_functions';
+// import Journal_obj_id_edit from '../ae_comp__journal_obj_id_edit.svelte';
+import Journal_entry_obj_qry from './../ae_comp__journal_entry_obj_qry.svelte';
// interface Props {
// data: any;
@@ -40,8 +45,8 @@ import { journals_func } from '$lib/ae_journals/ae_journals_functions';
// let { data }: Props = $props();
-let tmp_journal_obj_changed: boolean = $state(false);
-let tmp_journal_obj: key_val = $state({});
+// let tmp_journal_obj_changed: boolean = $state(false);
+// let tmp_journal_obj: key_val = $state({});
let ae_acct = data[$slct.account_id];
@@ -49,21 +54,20 @@ if (log_lvl) {
console.log(`ae_acct = `, ae_acct);
}
-$journals_sess.entry_li = [];
-$journals_slct.journal_id = ae_acct.slct.journal_id;
+// $journals_sess.entry_li = [];
+// $journals_slct.journal_id = ae_acct.slct.journal_id;
let lq__journal_obj = $derived(liveQuery(async () => {
if (log_lvl) {
console.log(`lq__journal_obj: journal_id = ${$journals_slct?.journal_id}`);
}
+
let results = await db_journals.journal
.get($journals_slct?.journal_id ?? ''); // null or undefined does not reset things like '' does
-
- $journals_slct.journal_obj = results;
- tmp_journal_obj = { ...results };
if (log_lvl) {
console.log(`lq__journal_obj: results = `, results);
}
+ // tmp_journal_obj = { ...results };
// Check if results are different than the current session version stored under $journals_slct
if ($journals_slct.journal_obj && results) {
@@ -89,58 +93,58 @@ let lq__journal_obj = $derived(liveQuery(async () => {
// }
// });
-$effect(() => {
- if (tmp_journal_obj) {
- tmp_journal_obj_changed = JSON.stringify(tmp_journal_obj) != JSON.stringify($lq__journal_obj);
- }
-});
+// $effect(() => {
+// if (tmp_journal_obj) {
+// tmp_journal_obj_changed = JSON.stringify(tmp_journal_obj) != JSON.stringify($lq__journal_obj);
+// }
+// });
-async function handle_update_journal() {
- if (tmp_journal_obj.name && tmp_journal_obj.type_code) {
- try {
- let data_kv = {
- // account: $slct.account_id,
- name: tmp_journal_obj.name,
- description: tmp_journal_obj.description ?? '', // Ensure description is at least an empty string
- type_code: tmp_journal_obj.type_code,
- passcode: tmp_journal_obj.passcode,
- private_passcode: tmp_journal_obj.private_passcode,
- passcode_timeout: tmp_journal_obj.passcode_timeout,
- auth_key: tmp_journal_obj.auth_key, // The Journal Entry encryption password
+// async function handle_update_journal() {
+// if (tmp_journal_obj.name && tmp_journal_obj.type_code) {
+// try {
+// let data_kv = {
+// // account: $slct.account_id,
+// name: tmp_journal_obj.name,
+// description: tmp_journal_obj.description ?? '', // Ensure description is at least an empty string
+// type_code: tmp_journal_obj.type_code,
+// passcode: tmp_journal_obj.passcode,
+// private_passcode: tmp_journal_obj.private_passcode,
+// passcode_timeout: tmp_journal_obj.passcode_timeout,
+// auth_key: tmp_journal_obj.auth_key, // The Journal Entry encryption password
- cfg_json: tmp_journal_obj.cfg_json
+// cfg_json: tmp_journal_obj.cfg_json
- };
- journals_func.update_ae_obj__journal({
- api_cfg: $ae_api,
- journal_id: $lq__journal_obj?.journal_id ?? '',
- data_kv: data_kv,
- log_lvl: log_lvl
- }).then((results) => {
- if (log_lvl) {
- console.log('Journal updated:', results);
- }
- // $journals_slct.journal_id = results?.journal_id_random;
- }).catch((error) => {
- console.error('Error updating journal:', error);
- alert('Failed to update journal.');
- }).finally(() => {
- if ($journals_slct.journal_id) {
- $journals_sess.show__modal_new__journal_obj = false;
- // goto(`/journals/${$journals_slct.journal_id}`);
- }
- });
- // console.log('New journal updated:', result);
- // $journals_sess.show__modal_new__journal_obj = false;
- // goto(`/journals/${result.journal_id_random}`);
- } catch (error) {
- console.error('Error updating journal:', error);
- alert('Failed to update journal.');
- }
- } else {
- alert('Please provide both name and type for the journal.');
- }
-}
+// };
+// journals_func.update_ae_obj__journal({
+// api_cfg: $ae_api,
+// journal_id: $lq__journal_obj?.journal_id ?? '',
+// data_kv: data_kv,
+// log_lvl: log_lvl
+// }).then((results) => {
+// if (log_lvl) {
+// console.log('Journal updated:', results);
+// }
+// // $journals_slct.journal_id = results?.journal_id_random;
+// }).catch((error) => {
+// console.error('Error updating journal:', error);
+// alert('Failed to update journal.');
+// }).finally(() => {
+// if ($journals_slct.journal_id) {
+// $journals_sess.show__modal_new__journal_obj = false;
+// // goto(`/journals/${$journals_slct.journal_id}`);
+// }
+// });
+// // console.log('New journal updated:', result);
+// // $journals_sess.show__modal_new__journal_obj = false;
+// // goto(`/journals/${result.journal_id_random}`);
+// } catch (error) {
+// console.error('Error updating journal:', error);
+// alert('Failed to update journal.');
+// }
+// } else {
+// alert('Please provide both name and type for the journal.');
+// }
+// }
@@ -161,6 +165,7 @@ async function handle_update_journal() {
>
+
-
- Search:
-
- {
- if (event.key === 'Enter') {
- log_lvl = 1;
- // $journals_loc.qry__search_text = event.target.value;
- // $journals_trig.journal_entry_li = true;
- // console.log('Search query:', $journals_loc.qry__search_text);
-
- $journals_prom.load__journal_entry_obj_qry = await journals_func.qry__journal_entry({
- api_cfg: $ae_api,
- journal_id: $lq__journal_obj?.journal_id ?? '',
- qry_str: $journals_loc.qry__search_text,
-
- // qry_created_on: null,
- // qry_alert: null,
- // qry_priority: null,
- // qry_type: and_type,
-
- // enabled: $journals_loc.recovery_meetings.qry__enabled,
- // hidden: $journals_loc.recovery_meetings.qry__hidden,
- // order_by_li: $journals_loc.recovery_meetings.qry__order_by_li,
- // limit: $journals_loc.recovery_meetings.qry__limit,
- // try_cache: try_cache,
- log_lvl: log_lvl,
- });
- if ($journals_prom.load__journal_entry_obj_qry.length) {
- $journals_sess.entry_li = $journals_prom.load__journal_entry_obj_qry;
-
- $journals_sess = {
- ...$journals_sess }; // ensure session is updated
-
- // $journals_trig.journal_entry_li = true; // trigger the entry list to refresh
- // $journals_trig.journal_entry_li = $journals_prom.load__journal_entry_obj_qry;
- } else {
- console.log('Clear the search results: no entries found for that query.');
- // $journals_sess.entry_li = [''];
- $journals_sess.entry_li = null;
- // $journals_trig.journal_entry_li = true;
- // alert('No journal entries found for that search query.');
- // $journals_sess = $journals_sess;
- }
- }
- }}
- title="Search Journal Entries"
- class="input input-sm input-bordered w-44 text-sm md:w-52"
- class:bg-red-200={$journals_sess.entry_li == null}
- class:dark:bg-red-800={$journals_sess.entry_li == null}
+
-
-
-
-
-
-
-
- Category:
-
-
-
@@ -423,1073 +326,11 @@ async function handle_update_journal() {
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- * This passcode is used to encrypt the Journal Entries.
-
-
-
-
-
-
-
- * This passcode is combined with the regular passcode and used to encrypt the Journal Entries.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Journal Type:
-
-
-
-
-
-
-
-
- Journal Categories:
-
-
-
-
-
-
-
- Journal Entry List Max Height:
-
- {#if tmp_journal_obj?.cfg_json}
-
- {/if}
-
-
-
-
-
- Journal Entry List Hover Max Height:
-
-
-
-
-
-
-
- Journal Entry List Active (click/press) Max Height:
-
-
-
-
-
-
-
-
- Journal Entry List Expand Contents:
-
-
-
-
-
-
-
-
-
-
-
- Journal Entry Add Content:
-
-
-
-
-
-
-
-
-
-
-
-
- Color Scheme:
-
-
-
-
-
-
- Preferred Viewer:
-
-
-
-
-
-
- Preferred Editor:
-
-
-
-
-
-
-
-
- Journal Entry Copy Options:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Journal Entry Visibility:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Journal Entry View Buttons:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {#if $lq__journal_obj?.sort}
- {$lq__journal_obj.sort}
- {:else}
-
- {/if}
-
-
-
-
-
-
{
- let data_kv = {
- group: tmp_journal_obj.group,
- };
- journals_func.update_ae_obj__journal({
- api_cfg: $ae_api,
- journal_id: $lq__journal_obj?.journal_id,
- data_kv: data_kv,
- log_lvl: log_lvl
- }).then(() => {
- alert('Journal group updated successfully!');
- }).catch((error) => {
- console.error('Error updating journal group:', error);
- alert('Failed to update journal group.');
- });
- }}
- class="input input-sm input-bordered w-24"
- title="Set group (for sorting) of this journal"
- />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/routes/journals/[journal_id]/+page.svelte b/src/routes/journals/[journal_id]/+page.svelte
index e309171e..977f9dc4 100644
--- a/src/routes/journals/[journal_id]/+page.svelte
+++ b/src/routes/journals/[journal_id]/+page.svelte
@@ -2,14 +2,38 @@
/** @type {import('./$types').PageData} */
let log_lvl: number = $state(1);
+interface Props {
+ data: any;
+}
+
+let { data }: Props = $props();
+
// *** Import Svelte specific
import { browser } from '$app/environment';
// import { goto } from '$app/navigation';
+
// *** Import other supporting libraries
+// import {
+// ArrowDown01, ArrowDown10, ArrowDownUp,
+// BetweenVerticalEnd, BetweenVerticalStart,
+// BookHeart, BookImage, Bookmark, BookOpenText, BriefcaseBusiness,
+// Check, Copy,
+// Expand, Eye, EyeOff,
+// Flag, FlagOff, FilePlus, Fingerprint,
+// Globe,
+// Library,
+// MessageSquareWarning, Minus,
+// Notebook,
+// Pencil, Plus,
+// RemoveFormatting,
+// SquareLibrary,
+// Shapes, Share2, ShieldCheck, ShieldMinus, Siren, Skull,
+// Tags, Target, ToggleLeft, ToggleRight, Trash2, TypeOutline,
+// X
+// } from '@lucide/svelte';
// import * as icons from '@lucide/svelte';
-import { BookHeart, FilePlus } from '@lucide/svelte';
-import { Modal } from 'flowbite-svelte';
+// import { Modal } from 'flowbite-svelte';
import { liveQuery } from "dexie";
// *** Import Aether specific variables and functions
@@ -27,13 +51,9 @@ import Journal_view from './../ae_comp__journal_obj_id_view.svelte';
// import Element_data_store from '$lib/element_data_store_v2.svelte';
import Journal_entry_obj_li from './../ae_comp__journal_entry_obj_li.svelte';
-// import Journal_entry_obj_id_edit from './ae_journals_comp__journal_entry_obj_id_edit.svelte';
+// import Journal_entry_obj_qry from './../ae_comp__journal_entry_obj_qry.svelte';
+import Journal_obj_id_edit from '../ae_comp__journal_obj_id_edit.svelte';
-interface Props {
- data: any;
-}
-
-let { data }: Props = $props();
// let ae_promises: key_val = {};
// let ae_tmp: key_val = {};
@@ -59,9 +79,12 @@ $inspect($journals_slct.journal_entry_id, `$journals_slct.journal_entry_id = ${$
// });
// For some reason data.params.journal_id (or whatever param) is not being passed to this page when loaded by a link from another page. This seems to be a bug with Svelte or SvelteKit. Hopefully fixed in a future version 5? 2024-11-06
-$journals_slct.journal_id = ae_acct.slct.journal_id;
+// $journals_slct.journal_id = ae_acct.slct.journal_id;
// $journals_slct.journal_obj = ae_acct.slct.journal_obj;
+$journals_slct.journal_id = ae_acct.slct.journal_id;
+
+$journals_sess.entry_li = [];
$journals_slct.journal_entry_id = null;
let lq__journal_obj = $derived(liveQuery(async () => {
@@ -74,6 +97,7 @@ let lq__journal_obj = $derived(liveQuery(async () => {
if (log_lvl) {
console.log(`lq__journal_obj: results = `, results);
}
+ // tmp_journal_obj = { ...results };
// Check if results are different than the current session version stored under $journals_slct
if ($journals_slct.journal_obj && results) {
@@ -95,9 +119,10 @@ let lq__journal_obj = $derived(liveQuery(async () => {
let lq__journal_entry_obj_li = $derived(liveQuery(async () => {
log_lvl = 1;
+
if (log_lvl) {
- console.log(`$lq__journal_obj.cfg_json = `, $lq__journal_obj?.cfg_json);
- console.log(`$journals_loc.filter__category_code = `, $journals_loc.filter__category_code);
+ console.log(`LQ - $lq__journal_obj.cfg_json = `, $lq__journal_obj?.cfg_json);
+ console.log(`LQ - $journals_loc.filter__category_code = `, $journals_loc.filter__category_code);
}
if ($journals_sess.entry_li_trigger && !$journals_sess?.entry_li) {
@@ -108,6 +133,9 @@ let lq__journal_entry_obj_li = $derived(liveQuery(async () => {
let results;
if ($journals_sess?.entry_li && $journals_sess?.entry_li?.length) {
+ if (log_lvl) {
+ console.log(`LQ - Using $journals_sess.entry_li to get journal entries.`);
+ }
// $journals_sess.entry_li_trigger = false;
let journal_entry_id_random_li = []; // This is to prevent the array from constantly updating and triggering the liveQuery.
@@ -122,6 +150,9 @@ let lq__journal_entry_obj_li = $derived(liveQuery(async () => {
.bulkGet(journal_entry_id_random_li);
} else if ($lq__journal_obj?.cfg_json?.entry_group_sort === 'DESC') {
+ if (log_lvl) {
+ console.log(`LQ - Using DESC sort for Journal Entry list journal_id: ${$journals_slct?.journal_id}`);
+ }
results = await db_journals.journal_entry
// .orderBy('updated_on')
.where('journal_id')
@@ -133,8 +164,7 @@ let lq__journal_entry_obj_li = $derived(liveQuery(async () => {
} else if ($journals_loc.filter__category_code && $journals_loc.filter__category_code.length > 0) {
if (log_lvl) {
- // console.log(`$lq__journal_obj.cfg_json = `, $lq__journal_obj?.cfg_json);
- console.log(`$journals_loc.filter__category_code = `, $journals_loc.filter__category_code);
+ console.log(`LQ - Using category filter: ${$journals_loc.filter__category_code}`);
}
results = await db_journals.journal_entry
.where('journal_id')
@@ -146,7 +176,7 @@ let lq__journal_entry_obj_li = $derived(liveQuery(async () => {
} else {
if (log_lvl) {
// console.log(`$lq__journal_obj.cfg_json = `, $lq__journal_obj?.cfg_json);
- console.log(`$journals_slct?.journal_id - default query using journal_id: ${$journals_slct?.journal_id}`);
+ console.log(`LQ - Using default sort for Journal Entry list journal_id: ${$journals_slct?.journal_id}`);
}
results = await db_journals.journal_entry
.where('journal_id')
@@ -174,6 +204,8 @@ let lq__journal_entry_obj_li = $derived(liveQuery(async () => {
}));
+// Trigger doing a basic load of journal entries
+// NOTE: Categories are (currently) filtered at the CSS style level.
$effect(() => {
if ($journals_trig.journal_entry_li) {
$journals_trig.journal_entry_li = false;
@@ -211,9 +243,15 @@ if ($journals_trig.journal_entry_li) {
try_cache: true,
log_lvl: log_lvl,
});
+
+ // Should we reset the entry list???
+ // $journals_sess.entry_li = null;
}
});
+
+
+
if (browser) {
let message = {'journal_id': $journals_slct?.journal_id ?? null};
window.parent.postMessage(message, "*");
@@ -245,6 +283,11 @@ if (browser) {
"
> -->
+
+
+
+
+
-
+
+
-
- {#if $ae_loc.trusted_access}
-
-
-
- {/if}
-
-
- Edit Journal:
-
- {$lq__journal_obj?.name}
-
-
-
-
- {/snippet}
-
- NO LONGER USED
-
-
+ show={$journals_sess.show__modal_edit__journal_obj}
+ />
{:else}
diff --git a/src/routes/journals/ae_comp__journal_entry_obj_li.svelte b/src/routes/journals/ae_comp__journal_entry_obj_li.svelte
index 9ed1754f..4b8e4468 100644
--- a/src/routes/journals/ae_comp__journal_entry_obj_li.svelte
+++ b/src/routes/journals/ae_comp__journal_entry_obj_li.svelte
@@ -1,5 +1,15 @@
@@ -117,7 +75,7 @@ $effect(() => {
@@ -478,34 +436,6 @@ $effect(() => {
{/if}
-
-
-
-
-
-
+interface Props {
+ log_lvl?: number;
+ lq__journal_obj: any;
+}
+
+let {
+ log_lvl = $bindable(0),
+ lq__journal_obj,
+}: Props = $props();
+
+
+import {
+ ArrowDown01, ArrowDown10, ArrowDownUp,
+ BetweenVerticalEnd, BetweenVerticalStart,
+ BookHeart, BookImage, Bookmark, BookOpenText, BriefcaseBusiness,
+ Check, Copy,
+ Expand, Eye, EyeOff,
+ Flag, FlagOff, FilePlus, Fingerprint,
+ Globe,
+ Library,
+ MessageSquareWarning, Minus,
+ Notebook,
+ Pencil, Plus,
+ RemoveFormatting,
+ SquareLibrary,
+ Shapes, Share2, ShieldCheck, ShieldMinus, Siren, Skull,
+ Tags, Target, ToggleLeft, ToggleRight, Trash2, TypeOutline,
+ X
+ } from '@lucide/svelte';
+
+import { ae_snip, ae_loc, ae_sess, ae_api, ae_trig, slct, slct_trigger } from '$lib/ae_stores';
+import { journals_loc, journals_sess, journals_slct, journals_prom, journals_trig } from '$lib/ae_journals/ae_journals_stores';
+import { journals_func } from '$lib/ae_journals/ae_journals_functions';
+
+
+// Trigger doing a search query for journal entries
+$effect(async () => {
+if ($journals_trig.journal_entry_qry) {
+ $journals_trig.journal_entry_qry = false;
+
+ if (log_lvl) {
+ console.log(`Triggered: $journals_trig.journal_entry_qry: ${$journals_loc.qry__search_text}`);
+ }
+
+ // $journals_prom.load__journal_entry_obj_qry = journals_func.qry__journal_entry({
+ $journals_prom.load__journal_entry_obj_li = await journals_func.qry__journal_entry({
+ api_cfg: $ae_api,
+ journal_id: $lq__journal_obj?.journal_id ?? '',
+ qry_str: $journals_loc.qry__search_text,
+
+ // qry_created_on: null,
+ // qry_alert: null,
+ // qry_priority: null,
+ // qry_type: and_type,
+
+ // enabled: $journals_loc.recovery_meetings.qry__enabled,
+ // hidden: $journals_loc.recovery_meetings.qry__hidden,
+ // order_by_li: $journals_loc.recovery_meetings.qry__order_by_li,
+ // limit: $journals_loc.recovery_meetings.qry__limit,
+ // try_cache: try_cache,
+ log_lvl: log_lvl,
+ });
+ if ($journals_prom.load__journal_entry_obj_li.length) {
+ $journals_sess.entry_li = $journals_prom.load__journal_entry_obj_li;
+
+ $journals_sess = {
+ ...$journals_sess }; // ensure session is updated
+
+ // $journals_trig.journal_entry_li = true; // trigger the entry list to refresh
+ // $journals_trig.journal_entry_li = $journals_prom.load__journal_entry_obj_li;
+ } else {
+ console.log('Clear the search results: no entries found for that query.');
+ // $journals_sess.entry_li = [''];
+ $journals_sess.entry_li = null;
+ // $journals_trig.journal_entry_li = true;
+ // alert('No journal entries found for that search query.');
+ // $journals_sess = $journals_sess;
+ }
+
+ if (log_lvl) {
+ console.log(`$journals_sess.entry_li = `, $journals_sess.entry_li);
+ }
+}
+});
+
+
+
+
+
+
+
+
+
+ Search:
+
+ {
+ if (event.key === 'Enter') {
+ log_lvl = 1;
+
+ $journals_trig.journal_entry_qry = true;
+
+ // $journals_loc.qry__search_text = event.target.value;
+ // $journals_trig.journal_entry_li = true;
+ // console.log('Search query:', $journals_loc.qry__search_text);
+
+ // $journals_prom.load__journal_entry_obj_qry = await journals_func.qry__journal_entry({
+ // api_cfg: $ae_api,
+ // journal_id: $lq__journal_obj?.journal_id ?? '',
+ // qry_str: $journals_loc.qry__search_text,
+
+ // // qry_created_on: null,
+ // // qry_alert: null,
+ // // qry_priority: null,
+ // // qry_type: and_type,
+
+ // // enabled: $journals_loc.recovery_meetings.qry__enabled,
+ // // hidden: $journals_loc.recovery_meetings.qry__hidden,
+ // // order_by_li: $journals_loc.recovery_meetings.qry__order_by_li,
+ // // limit: $journals_loc.recovery_meetings.qry__limit,
+ // // try_cache: try_cache,
+ // log_lvl: log_lvl,
+ // });
+ // if ($journals_prom.load__journal_entry_obj_qry.length) {
+ // $journals_sess.entry_li = $journals_prom.load__journal_entry_obj_qry;
+
+ // $journals_sess = {
+ // ...$journals_sess }; // ensure session is updated
+
+ // // $journals_trig.journal_entry_li = true; // trigger the entry list to refresh
+ // // $journals_trig.journal_entry_li = $journals_prom.load__journal_entry_obj_qry;
+ // } else {
+ // console.log('Clear the search results: no entries found for that query.');
+ // // $journals_sess.entry_li = [''];
+ // $journals_sess.entry_li = null;
+ // // $journals_trig.journal_entry_li = true;
+ // // alert('No journal entries found for that search query.');
+ // // $journals_sess = $journals_sess;
+ // }
+ }
+ }}
+ title="Search Journal Entries"
+ class="input input-sm input-bordered w-44 text-sm md:w-52"
+ class:bg-red-200={$journals_sess.entry_li == null}
+ class:dark:bg-red-800={$journals_sess.entry_li == null}
+ />
+
+
+
+
+
+
+
+
+ Category:
+
+
+
\ No newline at end of file
diff --git a/src/routes/journals/ae_comp__journal_obj_id_edit.svelte b/src/routes/journals/ae_comp__journal_obj_id_edit.svelte
new file mode 100644
index 00000000..8a5897cc
--- /dev/null
+++ b/src/routes/journals/ae_comp__journal_obj_id_edit.svelte
@@ -0,0 +1,1197 @@
+
+
+
+
+
+
+
+
+
+{#if !tmp__journal_obj || typeof tmp__journal_obj.cfg_json !== 'object'}
+ Not found or loading?
+{:else}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ * This passcode is used to encrypt the Journal Entries.
+
+
+
+
+
+
+
+ * This passcode is combined with the regular passcode and used to encrypt the Journal Entries.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Journal Type:
+
+
+
+
+
+
+
+
+ Journal Categories:
+
+
+
+
+
+
+
+ Journal Entry List Max Height:
+
+
+
+
+
+
+
+
+
+ Journal Entry List Hover Max Height:
+
+
+
+
+
+
+
+
+
+ Journal Entry List Active (click/press) Max Height:
+
+
+
+
+
+
+
+
+ Journal Entry List Expand Contents:
+
+
+
+
+
+
+
+
+
+
+
+ Journal Entry Add Content:
+
+
+
+
+
+
+
+
+
+
+
+
+ Color Scheme:
+
+
+
+
+
+
+ Preferred Viewer:
+
+
+
+
+
+
+ Preferred Editor:
+
+
+
+
+
+
+
+
+ Journal Entry Copy Options:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Journal Entry Visibility:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Journal Entry View Buttons:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {#if $lq__journal_obj?.sort}
+ {$lq__journal_obj.sort}
+ {:else}
+
+ {/if}
+
+
+
+
+
+
{
+ let data_kv = {
+ group: tmp__journal_obj.group,
+ };
+ journals_func.update_ae_obj__journal({
+ api_cfg: $ae_api,
+ journal_id: $lq__journal_obj?.journal_id,
+ data_kv: data_kv,
+ log_lvl: log_lvl
+ }).then(() => {
+ alert('Journal group updated successfully!');
+ }).catch((error) => {
+ console.error('Error updating journal group:', error);
+ alert('Failed to update journal group.');
+ });
+ }}
+ class="input input-sm input-bordered w-24"
+ title="Set group (for sorting) of this journal"
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{/if}
+
+
+
+
+ {#snippet footer()}
+
+
+
+ {/snippet}
+
\ No newline at end of file