Lots of work on the Journals
This commit is contained in:
@@ -40,11 +40,20 @@ if (log_lvl) {
|
||||
console.log(`ae_acct = `, ae_acct);
|
||||
}
|
||||
|
||||
$journals_slct.journal_id = ae_acct.slct.journal_id;
|
||||
let lq__journal_obj = $derived(liveQuery(async () => {
|
||||
let results = await db_journals.journal
|
||||
.where('id')
|
||||
.equals($journals_slct.journal_id)
|
||||
.first();
|
||||
|
||||
return results;
|
||||
}));
|
||||
|
||||
// For some reason data.params.journal_entry_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_entry_id = ae_acct.slct.journal_entry_id;
|
||||
// $journals_slct.journal_entry_obj = ae_acct.slct.journal_entry_obj;
|
||||
|
||||
|
||||
let lq__journal_entry_obj = $derived(liveQuery(async () => {
|
||||
if (log_lvl) {
|
||||
console.log(`lq__journal_entry_obj: journal_entry_id = ${$journals_slct?.journal_entry_id}`);
|
||||
@@ -192,6 +201,7 @@ if (browser) {
|
||||
|
||||
{#if $lq__journal_entry_obj}
|
||||
<Journal_entry_view
|
||||
lq__journal_obj={lq__journal_obj}
|
||||
lq__journal_entry_obj={lq__journal_entry_obj}
|
||||
/>
|
||||
{/if}
|
||||
|
||||
@@ -14,6 +14,9 @@ export async function load({ params, parent }) { // route
|
||||
let account_id = data.account_id;
|
||||
let ae_acct = data[account_id];
|
||||
|
||||
let journal_id = params.journal_id;
|
||||
ae_acct.slct.journal_id = journal_id;
|
||||
|
||||
let journal_entry_id = params.journal_entry_id;
|
||||
if (!journal_entry_id) {
|
||||
console.log(`ae_journals journals [journal_entry_id] +page.ts: The journal_entry_id was not found in the params!!!`);
|
||||
|
||||
Reference in New Issue
Block a user