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:
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { Modal } from 'flowbite-svelte';
|
||||
import { Check, X } from '@lucide/svelte';
|
||||
import { Check, X } from 'lucide-svelte';
|
||||
import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||
import { journals_func } from '$lib/ae_journals/ae_journals_functions';
|
||||
import { ae_api } from '$lib/stores/ae_stores';
|
||||
@@ -11,8 +11,8 @@
|
||||
journal_entry: key_val;
|
||||
journal_config: key_val; // The cfg_json from the journal object
|
||||
mode?: 'append' | 'prepend' | 'auto';
|
||||
onClose: () => void;
|
||||
onUpdate: () => void;
|
||||
on_close: () => void;
|
||||
on_update: () => void;
|
||||
log_lvl?: number;
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
journal_entry,
|
||||
journal_config,
|
||||
mode = 'auto',
|
||||
onClose,
|
||||
onUpdate,
|
||||
on_close,
|
||||
on_update,
|
||||
log_lvl = 0
|
||||
}: Props = $props();
|
||||
// Local State
|
||||
@@ -107,7 +107,7 @@ async function handle_save() {
|
||||
|
||||
if (update_result) {
|
||||
// Success
|
||||
onUpdate();
|
||||
on_update();
|
||||
open = false;
|
||||
} else {
|
||||
alert('Failed to update journal entry.');
|
||||
@@ -185,7 +185,7 @@ async function handle_save() {
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
onclick={onClose}
|
||||
onclick={on_close}
|
||||
class="btn preset-tonal-surface border border-surface-500 hover:preset-filled-surface-500 transition"
|
||||
>
|
||||
<X class="mr-1" />
|
||||
|
||||
Reference in New Issue
Block a user