Last minute changes to prep the new BB to go live soon.

This commit is contained in:
Scott Idem
2024-12-11 12:09:39 -05:00
parent 0f29682874
commit c63ef94b77
2 changed files with 21 additions and 20 deletions

View File

@@ -161,9 +161,10 @@ async function handle_submit_form(event: any) {
send_staff_notification_email(); send_staff_notification_email();
} }
if (!$ae_loc.administrator_access && $ae_loc.site_cfg_json?.bb_send_poster_email && $idaa_slct.post_obj.notify) { // For now we are not going to send a notification to the poster when a post comment has been updated.
send_poster_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();
// }
}); });
return prom_api__post_comment_obj; 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}`); 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 = ` let body_html = `
<div>${$idaa_slct.post_obj.full_name}, <div>${$idaa_slct.post_obj.full_name},
<p>A BB post comment has been created or updated.</p> <p>A BB post comment has been created or updated on the post named "${$idaa_slct.post_obj.title ?? '-- not set --'}".</p>
</div> </div>
<div> <div>
Commenter's Novi ID: ${$idaa_slct.post_comment_obj.external_person_id}<br> Commenter's Novi ID: ${$idaa_slct.post_comment_obj.external_person_id ?? '-- not set --'}<br>
Commenter's Name: ${$idaa_slct.post_comment_obj.full_name}<br> Commenter's Name: ${$idaa_slct.post_comment_obj.full_name ?? '-- not set --'}<br>
Commenter's Email: ${$idaa_slct.post_comment_obj.email} Commenter's Email: ${$idaa_slct.post_comment_obj.email ?? '-- not set --'}
</div> </div>
<br> <br>
@@ -249,17 +250,17 @@ function send_poster_notification_email() {
console.log(`*** send_poster_notification_email() *** Post ID: ${$idaa_slct.post_id}`); 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 = ` let body_html = `
<div>${$idaa_slct.post_obj.full_name}, <div>${$idaa_slct.post_obj.full_name ?? '-- not set --'},
<p>Your BB post has been commented on.</p> <p>Your BB post named "${$idaa_slct.post_obj.title ?? '-- not set --'}" has been commented on.</p>
</div> </div>
<div> <div>
Poster's Novi ID: ${$idaa_slct.post_obj.external_person_id}<br> Poster's Novi ID: ${$idaa_slct.post_obj.external_person_id ?? '-- not set --'}<br>
Poster's Name: ${$idaa_slct.post_obj.full_name}<br> Poster's Name: ${$idaa_slct.post_obj.full_name ?? '-- not set --'}<br>
Poster's Email: ${$idaa_slct.post_obj.email} Poster's Email: ${$idaa_slct.post_obj.email ?? '-- not set --'}
</div> </div>
<br> <br>

View File

@@ -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 subject = `IDAA BB Post: ${$idaa_slct.post_obj.title} (ID: ${$idaa_slct.post_id})`;
let body_html = ` let body_html = `
<div>${$idaa_slct.post_obj.full_name}, <div>${$idaa_slct.post_obj.full_name ?? '-- not set --'},
<p>A BB post has been created or updated.</p> <p>A BB post has been created or updated named "${$idaa_slct.post_obj.title}".</p>
</div> </div>
<div> <div>
Poster's Novi ID: ${$idaa_slct.post_obj.external_person_id}<br> Poster's Novi ID: ${$idaa_slct.post_obj.external_person_id ?? '-- not set --'}<br>
Poster's Name: ${$idaa_slct.post_obj.full_name}<br> Poster's Name: ${$idaa_slct.post_obj.full_name ?? '-- not set --'}<br>
Poster's Email: ${$idaa_slct.post_obj.email} Poster's Email: ${$idaa_slct.post_obj.email ?? '-- not set --'}
</div> </div>
<br> <br>
@@ -295,7 +295,7 @@ function send_staff_notification_email() {
api_cfg: $ae_api, api_cfg: $ae_api,
from_email: $ae_loc.site_cfg_json?.noreply_email ?? 'noreply+idaabb@oneskyit.com', 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', 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', to_name: $ae_loc.site_cfg_json?.admin_name ?? 'IDAA BB Admin',
subject: subject, subject: subject,
body_html: body_html, body_html: body_html,