fix(journals): standardize component naming, props, and libraries
- Renamed all Journal components to follow the ae_comp__* snake_case convention. - Normalized all custom event handler props from PascalCase (onSave) to snake_case (on_save) across the module. - Migrated all icon imports from @lucide/svelte to lucide-svelte for consistency. - Resolved ReferenceErrors and file corruption issues in Journals config and entry views. - Updated qry__journal_entry logic to support category filtering. - Verified module integrity and component interop.
This commit is contained in:
@@ -77,7 +77,7 @@
|
||||
|
||||
if (log_lvl) {
|
||||
console.log(
|
||||
`Triggered: $journals_trig.journal_entry_qry: ${$journals_loc.entry.qry__search_text}`
|
||||
`Triggered: $journals_trig.journal_entry_qry: text="${$journals_loc.entry.qry__search_text}" cat="${$journals_loc.entry.qry__category_code}"`
|
||||
);
|
||||
}
|
||||
|
||||
@@ -86,6 +86,7 @@
|
||||
api_cfg: $ae_api,
|
||||
journal_id: $lq__journal_obj?.journal_id ?? '',
|
||||
qry_str: $journals_loc.entry.qry__search_text,
|
||||
qry_category_code: $journals_loc.entry.qry__category_code,
|
||||
|
||||
// qry_created_on: null,
|
||||
// qry_alert: null,
|
||||
@@ -100,8 +101,8 @@
|
||||
log_lvl: log_lvl
|
||||
});
|
||||
|
||||
if (!$journals_loc.entry.qry__search_text) {
|
||||
// If search text was cleared or empty, reset to default view (null)
|
||||
if (!$journals_loc.entry.qry__search_text && !$journals_loc.entry.qry__category_code) {
|
||||
// If search text and category were cleared or empty, reset to default view (null)
|
||||
$journals_sess.entry_li = null;
|
||||
} else if ($journals_prom.load__journal_entry_obj_li && $journals_prom.load__journal_entry_obj_li.length > 0) {
|
||||
$journals_sess.entry_li = $journals_prom.load__journal_entry_obj_li;
|
||||
@@ -146,10 +147,11 @@
|
||||
<!-- Clear search text button -->
|
||||
<button
|
||||
type="button"
|
||||
class:hidden={!$journals_loc.entry.qry__search_text}
|
||||
class:hidden={!$journals_loc.entry.qry__search_text && !$journals_loc.entry.qry__category_code}
|
||||
onclick={() => {
|
||||
console.log(`TESTING - 1 - Cleared search query: ${$journals_loc.entry.qry__search_text}`);
|
||||
$journals_loc.entry.qry__search_text = '';
|
||||
$journals_loc.entry.qry__category_code = '';
|
||||
console.log(`TESTING - 2 - Cleared search query: ${$journals_loc.entry.qry__search_text}`);
|
||||
$journals_trig.journal_entry_qry = true;
|
||||
}}
|
||||
@@ -208,8 +210,8 @@
|
||||
onchange={(event) => {
|
||||
// WARNING: This will cause pages to reset if the journal entry list is being filtered by category. This is a bug that should be fixed.
|
||||
$journals_loc.entry.qry__category_code = (event.target as HTMLInputElement).value;
|
||||
// $journals_loc.entry.qry__category_code = (event.target as HTMLInputElement).value;
|
||||
$journals_trig.journal_entry_li = true;
|
||||
// Trigger the query search instead of the full list load
|
||||
$journals_trig.journal_entry_qry = true;
|
||||
console.log('Selected category:', $journals_loc.entry.qry__category_code);
|
||||
}}
|
||||
title="Select a category for the new journal entry"
|
||||
|
||||
Reference in New Issue
Block a user