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 { Upload, FileText, AlertCircle, Check, X, RefreshCw } from '@lucide/svelte';
|
||||
import { Upload, FileText, AlertCircle, Check, X, RefreshCw } from 'lucide-svelte';
|
||||
import { PARSERS, type AeJournalEntryInput } from '$lib/ae_journals/ae_journals_parsers';
|
||||
import { journals_func } from '$lib/ae_journals/ae_journals_functions';
|
||||
import { ae_api } from '$lib/stores/ae_stores';
|
||||
@@ -8,11 +8,11 @@
|
||||
|
||||
interface Props {
|
||||
open: boolean;
|
||||
onClose: () => void;
|
||||
onImportComplete: () => void;
|
||||
on_close: () => void;
|
||||
on_import_complete: () => void;
|
||||
}
|
||||
|
||||
let { open = $bindable(false), onClose, onImportComplete }: Props = $props();
|
||||
let { open = $bindable(false), on_close, on_import_complete }: Props = $props();
|
||||
|
||||
let files: FileList | null = $state(null);
|
||||
let selected_parser: keyof typeof PARSERS = $state('standard');
|
||||
@@ -123,7 +123,7 @@
|
||||
|
||||
is_importing = false;
|
||||
alert(`Import complete! ${success_count}/${parsed_entries.length} imported.`);
|
||||
onImportComplete();
|
||||
on_import_complete();
|
||||
open = false;
|
||||
}
|
||||
</script>
|
||||
@@ -232,7 +232,7 @@
|
||||
{/if}
|
||||
|
||||
<div class="modal-action">
|
||||
<button class="btn preset-tonal-secondary" onclick={onClose}>Cancel</button>
|
||||
<button class="btn preset-tonal-secondary" onclick={on_close}>Cancel</button>
|
||||
<button
|
||||
class="btn preset-filled-primary"
|
||||
disabled={parsed_entries.length === 0 || is_importing}
|
||||
|
||||
Reference in New Issue
Block a user