diff --git a/src/routes/idaa/(idaa)/bb/+page.svelte b/src/routes/idaa/(idaa)/bb/+page.svelte index 9c576ded..f90940ea 100644 --- a/src/routes/idaa/(idaa)/bb/+page.svelte +++ b/src/routes/idaa/(idaa)/bb/+page.svelte @@ -55,6 +55,13 @@ $: lq__post_comment_obj_li = liveQuery(async () => { return results; }); +$: lq__post_comment_obj = liveQuery(async () => { + let results = await db_posts.comment + .get($idaa_slct.post_comment_id); + + return results; +}); + @@ -123,6 +130,7 @@ $: lq__post_comment_obj_li = liveQuery(async () => { - \ No newline at end of file + diff --git a/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_comment_obj_id_edit.svelte b/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_comment_obj_id_edit.svelte new file mode 100644 index 00000000..75da15c0 --- /dev/null +++ b/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_comment_obj_id_edit.svelte @@ -0,0 +1,399 @@ + + + +
+ +
+ + {#await prom_api__post_comment_obj} +
Saving...
+ {:then} + {#if prom_api__post_comment_obj} + + {:else} + + {/if} + {/await} + +
+ +
+ +

Post Comment

+ + + +
+ + + + + +
+ +
+ + +

Poster's Information

+
+ Post as Anonymous +
+ + +
+
+ + +
+
+ + + + + + {#if $ae_loc.trusted_access} + + {/if} + +
+ + + +
+ +

+ Admin Options + +

+ + + + + + + + + + + + + {#if $ae_loc.administrator_access} + + {/if} + + + {#if $ae_loc.trusted_access} + + {/if} + + + +
+ + +
+
+ + {#if $idaa_slct.post_id} + + {:else} + + {/if} + + {#if $idaa_slct.post_id} + {#if $ae_loc.administrator_access} + + {:else if $ae_loc.trusted_access} + + {:else} + + {/if} + {/if} +
+ +
+ +
+
+ +
+ +
+ + + diff --git a/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_obj_id_edit.svelte b/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_obj_id_edit.svelte index b4708186..b51b1c0a 100644 --- a/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_obj_id_edit.svelte +++ b/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_obj_id_edit.svelte @@ -339,7 +339,7 @@ async function handle_delete_post_obj({post_id, method}: key_val) { handle_delete_post_obj({post_id: $idaa_slct.post_id, method: 'delete'}); $idaa_slct.post_id = null; - $lq__post_obj = {}; + // $lq__post_obj = {}; }} class="btn btn-sm variant-soft-warning" type="button" title="Delete record permanently" @@ -353,7 +353,7 @@ async function handle_delete_post_obj({post_id, method}: key_val) { handle_delete_post_obj({post_id: $idaa_slct.post_id, method: 'disable'}); $idaa_slct.post_id = null; - $lq__post_obj = {}; + // $lq__post_obj = {}; }} class="btn btn-sm variant-soft-warning" type="button" title="Disable record to delete" @@ -367,7 +367,7 @@ async function handle_delete_post_obj({post_id, method}: key_val) { handle_delete_post_obj({post_id: $idaa_slct.post_id, method: 'hide'}); $idaa_slct.post_id = null; - $lq__post_obj = {}; + // $lq__post_obj = {}; }} class="btn btn-sm variant-soft-warning" type="button" title="Hide record to delete" @@ -394,3 +394,7 @@ async function handle_delete_post_obj({post_id, method}: key_val) { + + + diff --git a/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_obj_id_view.svelte b/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_obj_id_view.svelte index 7d0dbcf5..f91b5a23 100644 --- a/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_obj_id_view.svelte +++ b/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_obj_id_view.svelte @@ -9,9 +9,11 @@ import { ae_snip, ae_loc, ae_sess, ae_api, ae_trig, slct, slct_trigger } from '$ import { idaa_loc, idaa_sess, idaa_slct, idaa_trigger } from '$lib/ae_idaa_stores'; import Comp__post_obj_id_edit from './ae_idaa_comp__post_obj_id_edit.svelte'; +import Comp__post_comment_obj_id_edit from './ae_idaa_comp__post_comment_obj_id_edit.svelte'; export let lq__post_obj: any; export let lq__post_comment_obj_li: any; +export let lq__post_comment_obj: any; // import Edit_post_comment_obj from './10_edit__post_comment_obj.svelte'; @@ -172,48 +174,22 @@ function handle_post_comment_obj_deleted(event) { {/if} -{#if $idaa_sess.bb.show_edit__post_comment} -
- { - $idaa_slct.post_comment_id = null; - $idaa_slct.post_comment_obj = {}; - - // $idaa_sess.bb.show_post_list = true; - // $idaa_sess.bb.show_edit__post_id = false; - // $idaa_sess.bb.show_view__post_id = false; - $idaa_sess.bb.show_edit__post_comment = false; - }} - > - Comment on: {($idaa_slct.post_obj.title ? $idaa_slct.post_obj.title : '')} - - -
- -
-
-
-
-{/if} {#if $lq__post_comment_obj_li?.length}
-{#each $lq__post_comment_obj_li as idaa_post_comment_obj, index} +{#each $lq__post_comment_obj_li as post_comment_obj, index}
+ {#if $idaa_sess.bb.show__inline_edit__post_comment_id == post_comment_obj.post_comment_id} + + {:else} +
-
{@html idaa_post_comment_obj.content}
+
{@html post_comment_obj.content}
@@ -221,36 +197,34 @@ function handle_post_comment_obj_deleted(event) {
Comment by: - {#if idaa_post_comment_obj.anonymous} + {#if post_comment_obj.anonymous} Anonymous {:else} - {idaa_post_comment_obj.full_name} + {post_comment_obj.full_name} {/if} Created on: - {ae_util.iso_datetime_formatter(idaa_post_comment_obj.created_on, 'datetime_iso_no_seconds')} - {#if idaa_post_comment_obj.updated_on} + {ae_util.iso_datetime_formatter(post_comment_obj.created_on, 'datetime_iso_no_seconds')} + {#if post_comment_obj.updated_on} Updated on: - {ae_util.iso_datetime_formatter(idaa_post_comment_obj.updated_on, 'datetime_iso_no_seconds')} + {ae_util.iso_datetime_formatter(post_comment_obj.updated_on, 'datetime_iso_no_seconds')} {/if}
- {#if $ae_loc.trusted_access || idaa_post_comment_obj.external_person_id === $idaa_loc.novi_uuid} + {#if $ae_loc.trusted_access || post_comment_obj.external_person_id === $idaa_loc.novi_uuid}
@@ -258,6 +232,7 @@ function handle_post_comment_obj_deleted(event) { {/if}
+ {/if}
@@ -268,30 +243,5 @@ function handle_post_comment_obj_deleted(event) {
- diff --git a/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_obj_li.svelte b/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_obj_li.svelte index 1f0467b8..da1d41db 100644 --- a/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_obj_li.svelte +++ b/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_obj_li.svelte @@ -135,4 +135,4 @@ onMount(() => { No posts found at this time {/if} - \ No newline at end of file + diff --git a/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_id_edit.svelte b/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_id_edit.svelte index e48b37c4..462c81f7 100644 --- a/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_id_edit.svelte +++ b/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_id_edit.svelte @@ -1312,10 +1312,7 @@ async function handle_delete_event_obj({event_id, method='disable'}) { -