Code clean up. Journal IDB save has been updated to properly await.
This commit is contained in:
@@ -36,10 +36,16 @@ export async function load({ fetch, parent }) {
|
||||
ae_acct.slct.journal_obj_li = load_journal_obj_li;
|
||||
}
|
||||
|
||||
// console.log(`ae_acct = `, ae_acct);
|
||||
// WARNING: This does not currently work because the person_id has not been set yet.
|
||||
let person_id = ae_acct.loc.person_id;
|
||||
// console.log(`person_id = `, person_id);
|
||||
|
||||
let load_journal_obj_li = await journals_func.load_ae_obj_li__journal({
|
||||
api_cfg: ae_acct.api,
|
||||
for_obj_type: 'account',
|
||||
for_obj_id: account_id,
|
||||
qry_person_id: person_id,
|
||||
inc_entry_li: true,
|
||||
hidden: 'all', // 'not_hidden'
|
||||
enabled: 'enabled',
|
||||
@@ -47,7 +53,7 @@ export async function load({ fetch, parent }) {
|
||||
limit: 25,
|
||||
// params: ae_params,
|
||||
try_cache: true,
|
||||
log_lvl: log_lvl
|
||||
log_lvl: 2
|
||||
});
|
||||
ae_acct.slct.journal_obj_li = load_journal_obj_li;
|
||||
|
||||
|
||||
@@ -101,25 +101,13 @@ let lq__journal_entry_obj = $derived(liveQuery(async () => {
|
||||
"
|
||||
>
|
||||
|
||||
<!-- <h1>Journals {$lq__journal_entry_obj?.name} - {$lq__journal_entry_obj_li?.length}</h1> -->
|
||||
|
||||
<!-- <a href="/journals/{$lq__journal_entry_obj?.journal_id}" class="novi_btn btn btn-secondary btn-sm
|
||||
variant-ghost-tertiary
|
||||
hover:variant-filled-tertiary
|
||||
transition
|
||||
">
|
||||
<span class="fas fa-arrow-left m-1"></span>
|
||||
Back to Journal Entries
|
||||
</a> -->
|
||||
|
||||
|
||||
{#if $lq__journal_entry_obj}
|
||||
<!-- {#if $lq__journal_entry_obj} -->
|
||||
<Journal_entry_view
|
||||
lq__journal_obj={lq__journal_obj}
|
||||
lq__journal_obj_li={lq__journal_obj_li}
|
||||
lq__journal_entry_obj={lq__journal_entry_obj}
|
||||
/>
|
||||
{/if}
|
||||
<!-- {/if} -->
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
@@ -796,7 +796,14 @@ function handle_marked(text_string: string) {
|
||||
</script>
|
||||
|
||||
|
||||
<section class="svelte_component ae_section ae_view journal_entry_obj view__journal_entry_obj bg-white flex flex-col flex-grow items-center justify-center rounded-lg w-full h-full p-2 m-2 space-y-2" bind:clientHeight={$ae_loc.iframe_height_modal_body}>
|
||||
<section
|
||||
class="
|
||||
svelte_component ae_section ae_view journal_entry_obj view__journal_entry_obj bg-white
|
||||
flex flex-col flex-grow items-center justify-start
|
||||
w-full h-full p-2 m-2 space-y-2
|
||||
"
|
||||
bind:clientHeight={$ae_loc.iframe_height_modal_body}
|
||||
>
|
||||
|
||||
|
||||
{#if $lq__journal_entry_obj}
|
||||
@@ -2027,11 +2034,14 @@ zzzz
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
{:else}
|
||||
<section class="ae_meta flex flex-row flex-wrap gap-1 items-center justify-center w-full">
|
||||
<span class="text-lg text-orange-900 dark:text-orange-100">
|
||||
The Journal Entry was not found or is not available to show.
|
||||
</span>
|
||||
</section>
|
||||
{/if}
|
||||
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user