Lots of little fixes. Can now save archives.
This commit is contained in:
@@ -49,7 +49,7 @@ $idaa_slct.archive_id = ae_acct.slct.archive_id;
|
||||
$: lq__archive_obj = liveQuery(async () => {
|
||||
console.log(`lq__archive_obj: archive_id = ${$idaa_slct?.archive_id}`);
|
||||
let results = await db_archives.archive
|
||||
.get($idaa_slct?.archive_id);
|
||||
.get($idaa_slct?.archive_id ?? ''); // null or undefined does not reset things like '' does
|
||||
|
||||
return results;
|
||||
});
|
||||
@@ -57,7 +57,7 @@ $: lq__archive_obj = liveQuery(async () => {
|
||||
$: lq__archive_content_obj_li = liveQuery(async () => {
|
||||
let results = await db_archives.content
|
||||
.where('archive_id')
|
||||
.equals($idaa_slct?.archive_id)
|
||||
.equals($idaa_slct?.archive_id ?? '') // null or undefined does not reset things like '' does
|
||||
.reverse()
|
||||
.sortBy('updated_on');
|
||||
// .sortBy('title');
|
||||
@@ -67,7 +67,7 @@ $: lq__archive_content_obj_li = liveQuery(async () => {
|
||||
|
||||
$: lq__archive_content_obj = liveQuery(async () => {
|
||||
let results = await db_archives.content
|
||||
.get($idaa_slct.archive_content_id);
|
||||
.get($idaa_slct.archive_content_id ?? ''); // null or undefined does not reset things like '' does
|
||||
|
||||
return results;
|
||||
});
|
||||
@@ -180,7 +180,7 @@ if (browser) {
|
||||
|
||||
<!-- Modal: Archive Content edit ID -->
|
||||
<Modal
|
||||
title="{$lq__archive_content_obj?.name} - {$lq__archive_content_obj?.id}"
|
||||
title="{$lq__archive_content_obj?.name ?? 'New Archive Content'} - {$lq__archive_content_obj?.id ?? 'Not Saved Yet'}"
|
||||
bind:open={$idaa_sess.archives.show__modal_edit__archive_content_id}
|
||||
autoclose={false}
|
||||
placement="top-center"
|
||||
@@ -191,30 +191,30 @@ if (browser) {
|
||||
<svelte:fragment slot="header">
|
||||
<div class="flex flex-row items-center justify-between w-full">
|
||||
<h3 class="text-lg font-semibold">
|
||||
{#if $ae_loc.trusted_access}
|
||||
<!-- <div class="ae_options"> -->
|
||||
<button
|
||||
on:click={() => {
|
||||
// const url = new URL(location);
|
||||
// url.searchParams.set('event_id', $lq__archive_content_obj?.event_id_random);
|
||||
// history.pushState({}, '', url);
|
||||
{#if $ae_loc.trusted_access}
|
||||
<!-- <div class="ae_options"> -->
|
||||
<button
|
||||
on:click={() => {
|
||||
// const url = new URL(location);
|
||||
// url.searchParams.set('event_id', $lq__archive_content_obj?.event_id_random);
|
||||
// history.pushState({}, '', url);
|
||||
|
||||
$idaa_sess.archives.show__modal_view__archive_content_id = $idaa_slct.archive_content_id;
|
||||
$idaa_sess.archives.show__modal_edit__archive_content_id = false;
|
||||
}}
|
||||
class="btn btn-sm variant-ghost-warning hover:variant-filled-warning transition"
|
||||
title={`View meeting: ${$lq__archive_content_obj?.name}`}
|
||||
>
|
||||
<span class="fas fa-eye m-1"></span> View
|
||||
</button>
|
||||
<!-- </div> -->
|
||||
{/if}
|
||||
$idaa_sess.archives.show__modal_view__archive_content_id = $idaa_slct.archive_content_id;
|
||||
$idaa_sess.archives.show__modal_edit__archive_content_id = false;
|
||||
}}
|
||||
class="btn btn-sm variant-ghost-warning hover:variant-filled-warning transition"
|
||||
title={`View meeting: ${$lq__archive_content_obj?.name}`}
|
||||
>
|
||||
<span class="fas fa-eye m-1"></span> View
|
||||
</button>
|
||||
<!-- </div> -->
|
||||
{/if}
|
||||
|
||||
<span class="text-sm text-gray-500">
|
||||
Edit Archive Content:
|
||||
</span>
|
||||
{$lq__archive_content_obj?.name}
|
||||
</h3>
|
||||
<span class="text-sm text-gray-500">
|
||||
Edit Archive Content:
|
||||
</span>
|
||||
{$lq__archive_content_obj?.name ?? 'New Archive Content'}
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
</svelte:fragment>
|
||||
@@ -248,6 +248,7 @@ if (browser) {
|
||||
title="{$lq__archive_content_obj?.name} - {$lq__archive_content_obj?.archive_content_id}"
|
||||
bind:open={$idaa_sess.archives.show__modal_view__archive_content_id}
|
||||
autoclose={false}
|
||||
outsideclose={true}
|
||||
placement="top-center"
|
||||
size="xl"
|
||||
class="top-center bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-200 rounded-lg border-gray-200 dark:border-gray-700 divide-gray-200 dark:divide-gray-700 shadow-md relative flex flex-col mx-auto w-full divide-y"
|
||||
|
||||
Reference in New Issue
Block a user