Fix: Stabilize Journal Entries query logic and UI search behavior

- Consolidated LiveQuery logic into [journal_id]/+page.svelte and removed redundancy from layout.
- Added automatic load trigger on journal_id change to ensure data freshness.
- Hardened Enabled/Hidden filters to correctly include NULL/undefined values in default views.
- Refined search behavior to distinguish between "default view" (null) and "no results found" ([]).
- Updated modal_journals_config.svelte with standardized module-level settings.
- Robust ID handling in bulk retrieval to handle varying property names (id, random_id).
This commit is contained in:
Scott Idem
2026-01-23 11:08:59 -05:00
parent 6925229d56
commit b026a00af5
9 changed files with 229 additions and 219 deletions

View File

@@ -18,7 +18,7 @@
// Derived / Local target
// We prefer the persisted 'qry__journal_id' if we are on the main landing page
let selected_journal_id = $state($journals_loc.qry__journal_id);
let selected_journal_id = $state($journals_loc.entry.qry__journal_id);
// If a journal is explicitly selected via slct (e.g. we are in a journal view), use that
let target_journal_id = $derived($journals_slct.journal_id || selected_journal_id);
@@ -80,7 +80,7 @@
function handle_journal_change(e: Event) {
const val = (e.target as HTMLSelectElement).value;
selected_journal_id = val;
$journals_loc.qry__journal_id = val; // Persist choice
$journals_loc.entry.qry__journal_id = val; // Persist choice
}
</script>