{idaa_archive_content_obj.original_location}
{/if}
-
{#if idaa_archive_content_obj.description}{@html idaa_archive_content_obj.description}{/if}
@@ -232,13 +231,13 @@ let ae_promises: key_val = {};
- Created on: {ae_util.iso_datetime_formatter(idaa_archive_content_obj.created_on, 'datetime_12_short')}
+ Created on: {ae_util.iso_datetime_formatter(idaa_archive_content_obj.created_on, 'datetime_12_long')}
- Updated on: {ae_util.iso_datetime_formatter(idaa_archive_content_obj.updated_on, 'datetime_12_short')}
+ Updated on: {ae_util.iso_datetime_formatter(idaa_archive_content_obj.updated_on, 'datetime_12_long')}
diff --git a/src/routes/idaa/(idaa)/archives/[archive_id]/ae_idaa_comp__archive_obj_id_edit.svelte b/src/routes/idaa/(idaa)/archives/[archive_id]/ae_idaa_comp__archive_obj_id_edit.svelte
index e0655e4f..dac6181a 100644
--- a/src/routes/idaa/(idaa)/archives/[archive_id]/ae_idaa_comp__archive_obj_id_edit.svelte
+++ b/src/routes/idaa/(idaa)/archives/[archive_id]/ae_idaa_comp__archive_obj_id_edit.svelte
@@ -224,6 +224,47 @@ async function handle_submit_form(event) {
}
}
+
+// Updated 2024-11-15
+async function handle_delete_archive_obj(
+ {
+ archive_id,
+ method = 'disable'
+ }: {
+ archive_id: string,
+ method?: string
+ }
+ ) {
+ if (log_lvl) {
+ console.log('*** handle_delete_archive_obj() ***');
+ }
+
+ prom_api__archive_obj = archives_func.delete_ae_obj_id__archive({
+ api_cfg: $ae_api,
+ archive_id: archive_id,
+ method: method,
+ log_lvl: log_lvl
+ })
+ .then(function (archive_obj_delete_result) {
+ $idaa_sess.archives.show__modal_edit__archive_id = false;
+ $idaa_sess.archives.show__modal_view__archive_id = false;
+ $idaa_sess.archives.show__modal_edit__archive_content_id = false;
+ $idaa_sess.archives.show__modal_view__archive_content_id = false;
+ })
+ .catch(function (error) {
+ console.log('The result was null or false when trying to delete.', error);
+ })
+ .finally(() => {
+ // $idaa_sess.recovery_meetings.show__modal_edit = false;
+ $idaa_slct.archive_id = null;
+ $idaa_slct.archive_obj = null;
+ $idaa_slct.archive_content_id = null;
+ $idaa_slct.archive_content_obj = null;
+ });
+
+ return prom_api__archive_obj;
+}
+
@@ -547,9 +588,6 @@ async function handle_submit_form(event) {
on:click={() => {
if (!confirm('Are you sure you want to delete this archive?')) {return false;}
handle_delete_archive_obj({archive_id: $idaa_slct.archive_id});
-
- $idaa_slct.archive_id = null;
- $idaa_slct.archive_obj = {};
}}
class="btn btn-sm variant-soft-warning"
>
diff --git a/src/routes/idaa/(idaa)/archives/ae_idaa_comp__archive_obj_li.svelte b/src/routes/idaa/(idaa)/archives/ae_idaa_comp__archive_obj_li.svelte
index b5b2cabb..7e65f8f9 100644
--- a/src/routes/idaa/(idaa)/archives/ae_idaa_comp__archive_obj_li.svelte
+++ b/src/routes/idaa/(idaa)/archives/ae_idaa_comp__archive_obj_li.svelte
@@ -17,12 +17,12 @@ onMount(() => {
-