More IDAA related updates

This commit is contained in:
Scott Idem
2025-06-23 14:15:50 -04:00
parent b59dcf20d5
commit e93c70e0e4
4 changed files with 82 additions and 61 deletions

View File

@@ -43,27 +43,24 @@ if (log_lvl) {
> >
{#snippet header()} {#snippet header()}
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-base font-semibold">
<!-- <span class="text-sm text-gray-500">
Viewing:
</span> -->
{$idaa_slct.archive_content_obj?.name} - {$lq__archive_content_obj?.archive_content_id}</h3>
</div>
<div class="flex flex-row items-center justify-between w-full"> <button
<h3 class="text-base font-semibold"> type="button"
<!-- <span class="text-sm text-gray-500"> class="btn btn-sm btn-secondary absolute top-2 right-2"
Viewing: onclick={() => {
</span> --> $idaa_sess.archives.show__modal_view__archive_content_id = false;
{$idaa_slct.archive_content_obj?.name} - {$lq__archive_content_obj?.archive_content_id}</h3> }}
</div> >
<span class="fas fa-times"></span>
<button Close
type="button" </button>
class="btn btn-sm btn-secondary absolute top-2 right-2"
onclick={() => {
$idaa_sess.archives.show__modal_view__archive_content_id = false;
}}
>
<span class="fas fa-times"></span>
Close
</button>
{/snippet} {/snippet}
<Media_player <Media_player

View File

@@ -280,59 +280,69 @@ function add_activity_log(
<!-- Modal: Post (Bulletin Board) view ID --> <!-- Modal: Post (Bulletin Board) view ID -->
<!-- title="{$lq__post_obj?.title ?? 'New Post'} - {$lq__post_obj?.id ?? 'Not Saved Yet'}" -->
<Modal <Modal
title="{$lq__post_obj?.title ?? 'New Post'} - {$lq__post_obj?.id ?? 'Not Saved Yet'}"
bind:open={$idaa_sess.bb.show__modal_view__post_id} bind:open={$idaa_sess.bb.show__modal_view__post_id}
autoclose={false} autoclose={false}
outsideclose={true} outsideclose={true}
placement="top-center" placement="top-center"
size="lg" size="lg"
class="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" 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"
on:close={() => { onclose={() => {
// We want to cancel the inline edit if the modal is closed // We want to cancel the inline edit if the modal is closed
$idaa_sess.bb.show__inline_edit__post_obj = false; $idaa_sess.bb.show__inline_edit__post_obj = false;
}} }}
> >
{#snippet header()} {#snippet header()}
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-lg font-semibold">
{#if $ae_loc.trusted_access || $lq__post_obj?.external_person_id === $idaa_loc.novi_uuid}
<button
onclick={() => {
// const url = new URL(location);
// url.searchParams.set('post_id', $lq__post_obj?.post_id_random);
// history.pushState({}, '', url);
// $idaa_sess.bb.show__modal_view = false;
if ($idaa_sess.bb.show__inline_edit__post_obj) {
$idaa_sess.bb.show__inline_edit__post_obj = false;
} else {
$idaa_sess.bb.show__inline_edit__post_obj = true;
}
}}
class="novi_btn btn btn-sm preset-tonal-warning border border-warning-500 hover:preset-filled-warning-500 transition"
title={`Edit meeting: ${$lq__post_obj?.title}`}
>
{#if $idaa_sess.bb.show__inline_edit__post_obj}
<span class="fas fa-times m-1"></span> Cancel Edit
{:else}
<span class="fas fa-edit m-1"></span> Edit
{/if}
</button>
{/if}
<!-- {$lq__post_obj?.title ?? 'New Post'} -->
<span class="">
<span class="fas fa-comment-alt m-1"></span>
{@html $lq__post_obj?.title ?? 'New Post'}
<!-- - {$lq__post_obj?.id ?? 'Not Yet Saved'} -->
</span>
{#if $lq__post_obj?.topic_id}<span class="badge badge-info preset-tonal-secondary"><span class="fas fa-user-md m-1"></span> {$lq__post_obj?.topic_name}</span>{/if}
</h3>
</div>
<div class="flex flex-row items-center justify-between w-full"> <button
<h3 class="text-lg font-semibold"> type="button"
{#if $ae_loc.trusted_access || $lq__post_obj?.external_person_id === $idaa_loc.novi_uuid} class="btn btn-sm btn-secondary absolute top-2 right-2"
<button onclick={() => {
onclick={() => { $idaa_sess.bb.show__modal_view__post_id = false;
// const url = new URL(location); $idaa_sess.bb.show__inline_edit__post_obj = false;
// url.searchParams.set('post_id', $lq__post_obj?.post_id_random); }}
// history.pushState({}, '', url); >
<span class="fas fa-times"></span>
// $idaa_sess.bb.show__modal_view = false; Close
if ($idaa_sess.bb.show__inline_edit__post_obj) { </button>
$idaa_sess.bb.show__inline_edit__post_obj = false;
} else {
$idaa_sess.bb.show__inline_edit__post_obj = true;
}
}}
class="novi_btn btn btn-sm preset-tonal-warning border border-warning-500 hover:preset-filled-warning-500 transition"
title={`Edit meeting: ${$lq__post_obj?.title}`}
>
{#if $idaa_sess.bb.show__inline_edit__post_obj}
<span class="fas fa-times m-1"></span> Cancel Edit
{:else}
<span class="fas fa-edit m-1"></span> Edit
{/if}
</button>
{/if}
<!-- {$lq__post_obj?.title ?? 'New Post'} -->
<span class="">
<span class="fas fa-comment-alt m-1"></span>
{@html $lq__post_obj?.title ?? 'New Post'}
<!-- - {$lq__post_obj?.id ?? 'Not Yet Saved'} -->
</span>
{#if $lq__post_obj?.topic_id}<span class="badge badge-info preset-tonal-secondary"><span class="fas fa-user-md m-1"></span> {$lq__post_obj?.topic_name}</span>{/if}
</h3>
</div>
{/snippet} {/snippet}
<Comp__post_obj_id_view <Comp__post_obj_id_view
@@ -341,4 +351,18 @@ function add_activity_log(
lq__post_comment_obj={lq__post_comment_obj} lq__post_comment_obj={lq__post_comment_obj}
/> />
{#snippet footer()}
<button
type="button"
class="btn btn-sm btn-secondary"
onclick={() => {
$idaa_sess.bb.show__modal_view__post_id = false;
$idaa_sess.bb.show__inline_edit__post_obj = false;
}}
>
<span class="fas fa-times"></span>
Close
</button>
{/snippet}
</Modal> </Modal>

View File

@@ -899,7 +899,7 @@ function send_staff_notification_email() {
{#await prom_api__post_obj} {#await prom_api__post_obj}
<span class="fas fa-spinner fa-spin m-1"></span> Saving <span class="fas fa-spinner fa-spin m-1"></span> Saving
{:then} {:then}
<span class="fas fa-plus m-1"></span> Save New Event <span class="fas fa-plus m-1"></span> Save New Post
{/await} {/await}
</button> </button>
{/if} {/if}

View File

@@ -30,7 +30,7 @@ onMount(() => {
> >
<header class="ae_header"> <header class="ae_header">
<h3 class="post__title flex flex-row gap-2 items-center h3 border-b border border-gray-200 w-full"> <h3 class="post__title flex flex-row gap-2 items-center h3 border-b border-gray-200 w-full">
<span class="post__title"> <span class="post__title">
<span class="fas fa-comment-alt m-1"></span> <span class="fas fa-comment-alt m-1"></span>
{@html idaa_post_obj.title} {@html idaa_post_obj.title}