Working ability to create new Journals

This commit is contained in:
Scott Idem
2025-03-24 16:33:12 -04:00
parent d424ec24c1
commit b37db30368
5 changed files with 107 additions and 10 deletions

View File

@@ -208,7 +208,7 @@ if (browser) {
}
journals_func.create_ae_obj__journal_entry({
api_cfg: $ae_api,
journal_id: $lq__journal_obj?.journal_id,
journal_id: $lq__journal_obj?.journal_id ?? '',
data_kv: data_kv,
log_lvl: log_lvl
}).then((results) => {
@@ -216,8 +216,8 @@ if (browser) {
$journals_slct.journal_entry_id = results?.journal_entry_id_random;
// alert(`Journal entry created successfully! ${$journals_slct.journal_entry_id}`);
}).catch((error) => {
console.error('Error updating journal entry:', error);
alert('Failed to update journal entry.');
console.error('Error creating journal entry:', error);
alert('Failed to create journal entry.');
}).finally(() => {
goto(`/journals/${$lq__journal_obj?.journal_id}/entry/${$journals_slct.journal_entry_id}`);
});