Starting real work on the IDAA BB (posts). Can at least view them and their comments now.

This commit is contained in:
Scott Idem
2024-11-05 12:37:46 -05:00
parent 4d2a78f80f
commit ac7016bb3e
19 changed files with 679 additions and 655 deletions

View File

@@ -23,13 +23,13 @@ if ($slct.post_id) {
if ($slct.post_obj) {
// if (!$slct.post_obj.external_person_id) {
// $slct.post_obj['external_person_id'] = $ae_app.novi_uuid;
// $slct.post_obj['external_person_id'] = $idaa_loc.novi_uuid;
// }
// if (!$slct.post_obj.full_name) {
// $slct.post_obj['full_name'] = $ae_app.novi_full_name;
// $slct.post_obj['full_name'] = $idaa_loc.novi_full_name;
// }
// if (!$slct.post_obj.email) {
// $slct.post_obj['email'] = $ae_app.novi_email;
// $slct.post_obj['email'] = $idaa_loc.novi_email;
// }
}
} else {
@@ -39,9 +39,9 @@ if ($slct.post_id) {
content: '',
topic_id: null,
anonymous: false,
external_person_id: $ae_app.novi_uuid,
full_name: $ae_app.novi_full_name,
email: $ae_app.novi_email,
external_person_id: $idaa_loc.novi_uuid,
full_name: $idaa_loc.novi_full_name,
email: $idaa_loc.novi_email,
sort: null,
notes: null,
@@ -367,7 +367,7 @@ async function handle_delete_post_obj({post_id, method='disable'}) {
<option value={18}>Contacts/ sponsorship in my area</option>
<option value={19}>Professional positions</option>
<option value={21}
disabled={!$ae_app.trusted_access}
disabled={!$ae_loc.trusted_access}
>
Announcement
</option>
@@ -402,13 +402,13 @@ async function handle_delete_post_obj({post_id, method='disable'}) {
</fieldset>
<label for="external_person_id"><span class="fas fa-link"></span> Linked with Novi ID
{#if !$ae_app.trusted_access}
{#if !$ae_loc.trusted_access}
<span class="fas fa-lock" title="Field is locked"></span>
<input
type="text"
id="external_person_id"
name="external_person_id"
value={($slct.post_obj.external_person_id ? $slct.post_obj.external_person_id : $ae_app.novi_uuid)}
value={($slct.post_obj.external_person_id ? $slct.post_obj.external_person_id : $idaa_loc.novi_uuid)}
readonly={true}
class="ae_width_lg"
>
@@ -427,7 +427,7 @@ async function handle_delete_post_obj({post_id, method='disable'}) {
</label>
<label for="full_name">Name
{#if !$ae_app.trusted_access}
{#if !$ae_loc.trusted_access}
<span class="fas fa-lock" title="Field is locked"></span>
{:else}
<span class="fas fa-unlock" title="Field is unlocked"></span>
@@ -436,14 +436,14 @@ async function handle_delete_post_obj({post_id, method='disable'}) {
type="text"
id="full_name"
name="full_name"
value={($slct.post_obj.full_name ? $slct.post_obj.full_name : $ae_app.novi_full_name)}
readonly={!$ae_app.trusted_access}
value={($slct.post_obj.full_name ? $slct.post_obj.full_name : $idaa_loc.novi_full_name)}
readonly={!$ae_loc.trusted_access}
>
</label>
{#if $ae_app.trusted_access}
{#if $ae_loc.trusted_access}
<label for="email">Email
{#if !$ae_app.trusted_access}
{#if !$ae_loc.trusted_access}
<span class="fas fa-lock" title="Field is locked"></span>
{:else}
<span class="fas fa-unlock" title="Field is unlocked"></span>
@@ -451,8 +451,8 @@ async function handle_delete_post_obj({post_id, method='disable'}) {
<input
type="text"
name="email"
value={($slct.post_obj.email ? $slct.post_obj.email : $ae_app.novi_email)}
readonly={!$ae_app.trusted_access}
value={($slct.post_obj.email ? $slct.post_obj.email : $idaa_loc.novi_email)}
readonly={!$ae_loc.trusted_access}
>
<span class="ae_highlight">Secondary link using the Novi email address</span>
</label>
@@ -485,7 +485,7 @@ async function handle_delete_post_obj({post_id, method='disable'}) {
</fieldset> -->
{#if $ae_app.trusted_access}
{#if $ae_loc.trusted_access}
<section class="ae_section post__admin_options"> <!-- BEGIN: section post__admin_options -->
<h3>
@@ -516,7 +516,7 @@ async function handle_delete_post_obj({post_id, method='disable'}) {
<label>Group <input type="text" name="group" value={$slct.post_obj.group ? $slct.post_obj.group : ''} max="100" /></label>
{#if $ae_app.administrator_access}
{#if $ae_loc.administrator_access}
<label>Enable
<input
type="checkbox"
@@ -527,7 +527,7 @@ async function handle_delete_post_obj({post_id, method='disable'}) {
</label>
{/if}
{#if $ae_app.trusted_access}
{#if $ae_loc.trusted_access}
<label>Internal Staff Notes
<textarea id="notes" name="notes" class="ae_value post__notes" rows="2" cols="70" value={$slct.post_obj.notes}></textarea>
</label>
@@ -543,7 +543,7 @@ async function handle_delete_post_obj({post_id, method='disable'}) {
<button type="submit" class="ae_btn btn btn-primary"><span class="fas fa-check"></span> Save Post</button>
{#if $slct.post_id}
{#if $ae_app.administrator_access}
{#if $ae_loc.administrator_access}
<button
on:click={() => {
if (!confirm('Are you sure you want to delete this post?')) {return false;}
@@ -557,7 +557,7 @@ async function handle_delete_post_obj({post_id, method='disable'}) {
>
<span class="fas fa-minus"></span> Delete
</button>
{:else if $ae_app.trusted_access}
{:else if $ae_loc.trusted_access}
<button
on:click={() => {
if (!confirm('Are you sure you want to disable this post?')) {return false;}