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 100d02db..1db6ada8 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 @@ -161,9 +161,10 @@ async function handle_submit_form(event: any) { send_staff_notification_email(); } - if (!$ae_loc.administrator_access && $ae_loc.site_cfg_json?.bb_send_poster_email && $idaa_slct.post_obj.notify) { - send_poster_notification_email(); - } + // For now we are not going to send a notification to the poster when a post comment has been updated. + // if (!$ae_loc.administrator_access && $ae_loc.site_cfg_json?.bb_send_poster_email && $idaa_slct.post_obj.notify) { + // send_poster_notification_email(); + // } }); return prom_api__post_comment_obj; @@ -212,17 +213,17 @@ function send_staff_notification_email() { console.log(`*** send_staff_notification_email() *** Post ID: ${$idaa_slct.post_id}`); } - let subject = `IDAA BB Post Comment on: ${$idaa_slct.post_obj.title} (ID: ${$idaa_slct.post_id})`; + let subject = `IDAA BB Post Comment on: ${$idaa_slct.post_obj.title ?? '-- not set --'} (ID: ${$idaa_slct.post_id})`; let body_html = `
${$idaa_slct.post_obj.full_name}, -

A BB post comment has been created or updated.

+

A BB post comment has been created or updated on the post named "${$idaa_slct.post_obj.title ?? '-- not set --'}".

- Commenter's Novi ID: ${$idaa_slct.post_comment_obj.external_person_id}
- Commenter's Name: ${$idaa_slct.post_comment_obj.full_name}
- Commenter's Email: ${$idaa_slct.post_comment_obj.email} + Commenter's Novi ID: ${$idaa_slct.post_comment_obj.external_person_id ?? '-- not set --'}
+ Commenter's Name: ${$idaa_slct.post_comment_obj.full_name ?? '-- not set --'}
+ Commenter's Email: ${$idaa_slct.post_comment_obj.email ?? '-- not set --'}

@@ -249,17 +250,17 @@ function send_poster_notification_email() { console.log(`*** send_poster_notification_email() *** Post ID: ${$idaa_slct.post_id}`); } - let subject = `IDAA BB Post Comment on: ${$idaa_slct.post_obj.title} (ID: ${$idaa_slct.post_id})`; + let subject = `IDAA BB Post Comment on: ${$idaa_slct.post_obj.title ?? '-- not set --'} (ID: ${$idaa_slct.post_id})`; let body_html = ` -
${$idaa_slct.post_obj.full_name}, -

Your BB post has been commented on.

+
${$idaa_slct.post_obj.full_name ?? '-- not set --'}, +

Your BB post named "${$idaa_slct.post_obj.title ?? '-- not set --'}" has been commented on.

- Poster's Novi ID: ${$idaa_slct.post_obj.external_person_id}
- Poster's Name: ${$idaa_slct.post_obj.full_name}
- Poster's Email: ${$idaa_slct.post_obj.email} + Poster's Novi ID: ${$idaa_slct.post_obj.external_person_id ?? '-- not set --'}
+ Poster's Name: ${$idaa_slct.post_obj.full_name ?? '-- not set --'}
+ Poster's Email: ${$idaa_slct.post_obj.email ?? '-- not set --'}

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 ab6b6114..5af4d208 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 @@ -273,14 +273,14 @@ function send_staff_notification_email() { let subject = `IDAA BB Post: ${$idaa_slct.post_obj.title} (ID: ${$idaa_slct.post_id})`; let body_html = ` -
${$idaa_slct.post_obj.full_name}, -

A BB post has been created or updated.

+
${$idaa_slct.post_obj.full_name ?? '-- not set --'}, +

A BB post has been created or updated named "${$idaa_slct.post_obj.title}".

- Poster's Novi ID: ${$idaa_slct.post_obj.external_person_id}
- Poster's Name: ${$idaa_slct.post_obj.full_name}
- Poster's Email: ${$idaa_slct.post_obj.email} + Poster's Novi ID: ${$idaa_slct.post_obj.external_person_id ?? '-- not set --'}
+ Poster's Name: ${$idaa_slct.post_obj.full_name ?? '-- not set --'}
+ Poster's Email: ${$idaa_slct.post_obj.email ?? '-- not set --'}

@@ -295,7 +295,7 @@ function send_staff_notification_email() { api_cfg: $ae_api, from_email: $ae_loc.site_cfg_json?.noreply_email ?? 'noreply+idaabb@oneskyit.com', from_name: $ae_loc.site_cfg_json?.noreply_name ?? 'IDAA BB NoReply', - to_email: $ae_loc.site_cfg_json?.admin_email ?? 'admin+bbpost@oneskyit.com', // 'scott+idaabb@oneskyit.com', // $idaa_slct.post_obj.email, + to_email: $ae_loc.site_cfg_json?.admin_email ?? 'admin+bbpost@oneskyit.com', // 'scott+idaabb@oneskyit.com' to_name: $ae_loc.site_cfg_json?.admin_name ?? 'IDAA BB Admin', subject: subject, body_html: body_html,