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 index 1db6ada8..a706d8a0 100644 --- 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 @@ -27,12 +27,12 @@ async function handle_submit_form(event: any) { disable_submit_btn = true; let form_data = new FormData(event.target); - if (log_lvl) { + if (log_lvl > 1) { console.log(form_data); } // Form Post object data incoming - let post_comment_di = ae_util.extract_prefixed_form_data({prefix: null, form_data: form_data, trim_values: true, bool_tf_str: true, log_lvl: 2}); + let post_comment_di = ae_util.extract_prefixed_form_data({prefix: null, form_data: form_data, trim_values: true, bool_tf_str: true, log_lvl: log_lvl}); // console.log(post_comment_di); // Form Post object data outgoing @@ -90,14 +90,18 @@ async function handle_submit_form(event: any) { // // post_comment_do['notes'] = event_meeting_fd.notes; // } - console.log(post_comment_do); + log_lvl = 1; + if (log_lvl) { + console.log(post_comment_do); + } if (!$idaa_slct.post_comment_id) { + prom_api__post_comment_obj = posts_func.create_ae_obj__post_comment({ api_cfg: $ae_api, post_id: $idaa_slct.post_id, data_kv: post_comment_do, - log_lvl: 2 + log_lvl: log_lvl }) .then(function (post_comment_obj_create_result) { if (!post_comment_obj_create_result) { @@ -129,12 +133,14 @@ async function handle_submit_form(event: any) { }); return prom_api__post_comment_obj; + } else { + prom_api__post_comment_obj = posts_func.update_ae_obj__post_comment({ api_cfg: $ae_api, post_comment_id: $idaa_slct.post_comment_id, data_kv: post_comment_do, - log_lvl: 1 + log_lvl: log_lvl }) .then(function (post_comment_obj_update_result) { if (!post_comment_obj_update_result) { @@ -153,7 +159,7 @@ async function handle_submit_form(event: any) { }) .finally(() => { // We need to do this since the comment has changed and the idaa_slct object does automatically update (yet...???). - $idaa_slct.post_comment_obj = $lq__post_comment_obj; + // $idaa_slct.post_comment_obj = $lq__post_comment_obj; disable_submit_btn = false; $idaa_sess.bb.show__inline_edit__post_comment_id = false; @@ -168,6 +174,7 @@ async function handle_submit_form(event: any) { }); return prom_api__post_comment_obj; + } } @@ -326,7 +333,8 @@ function send_poster_notification_email() { --> - Content (comment body): + + Content (comment body): + Poster's Information @@ -427,6 +436,8 @@ function send_poster_notification_email() { Secondary link using the Novi email address + {:else} + {/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 5af4d208..4119a7f4 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 @@ -172,7 +172,7 @@ async function handle_submit_form(event: any) { }) .finally(() => { // We need to do this since the post has changed and the idaa_slct object does automatically update (yet...???). - $idaa_slct.post_obj = $lq__post_obj; + // $idaa_slct.post_obj = $lq__post_obj; disable_submit_btn = false; $idaa_sess.bb.show__inline_edit__post_obj = false; @@ -342,14 +342,17 @@ function send_staff_notification_email() { - + + Title of BB post: + - + + Content (post body): @@ -386,6 +389,7 @@ function send_staff_notification_email() { {/if} + + {:else} + {/if} diff --git a/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_options.svelte b/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_options.svelte index ea38b110..d8cec430 100644 --- a/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_options.svelte +++ b/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_options.svelte @@ -104,7 +104,7 @@ if (log_lvl) console.log('** Component Loaded: ** Post Options'); {#if ($ae_loc.trusted_access && $ae_loc.edit_mode) || $idaa_loc.novi_uuid} { if (!confirm('Create new post?')) { return false;