Working on making sure notifications are being sent to IDAA staff when a post or post comment is created or updated. It looks like it is working....

This commit is contained in:
Scott Idem
2025-10-01 13:03:16 -04:00
parent f96a14107a
commit 4aeded3a12
2 changed files with 12 additions and 6 deletions

View File

@@ -159,12 +159,14 @@ async function handle_submit_form(event: any) {
$idaa_sess.bb.show__inline_edit__post_comment_id = false;
// Send notification to staff
if (!$ae_loc.administrator_access && $ae_loc.site_cfg_json?.bb_send_staff_new_email) {
// if (!$ae_loc.administrator_access && $ae_loc.site_cfg_json?.bb_send_staff_new_email) {
if ($ae_loc.site_cfg_json?.bb_send_staff_new_email) {
send_staff_notification_email();
}
// Send notification to the original poster
if (!$ae_loc.administrator_access && $ae_loc.site_cfg_json?.bb_send_poster_email && $idaa_slct.post_obj.notify) {
// if ($ae_loc.site_cfg_json?.bb_send_poster_email && $idaa_slct.post_obj.notify) {
send_poster_notification_email();
}
@@ -217,7 +219,8 @@ async function handle_submit_form(event: any) {
disable_submit_btn = false;
$idaa_sess.bb.show__inline_edit__post_comment_id = false;
if (!$ae_loc.administrator_access && $ae_loc.site_cfg_json?.bb_send_staff_update_email) {
// if (!$ae_loc.administrator_access && $ae_loc.site_cfg_json?.bb_send_staff_update_email) {
if ($ae_loc.site_cfg_json?.bb_send_staff_update_email) {
send_staff_notification_email();
}

View File

@@ -154,9 +154,10 @@ async function handle_submit_form(event: any) {
// post_do['notes'] = event_meeting_fd.notes;
}
console.log(post_do);
log_lvl = 1;
if (log_lvl) {
console.log(post_do);
}
if (!$idaa_slct.post_id) {
prom_api__post_obj = posts_func.create_ae_obj__post({
@@ -188,7 +189,8 @@ async function handle_submit_form(event: any) {
disable_submit_btn = false;
$idaa_sess.bb.edit__post_obj = false;
if (!$ae_loc.administrator_access && $ae_loc.site_cfg_json?.bb_send_staff_new_email) {
// if (!$ae_loc.administrator_access && $ae_loc.site_cfg_json?.bb_send_staff_new_email) {
if ($ae_loc.site_cfg_json?.bb_send_staff_new_email) {
send_staff_notification_email();
}
});
@@ -224,7 +226,8 @@ async function handle_submit_form(event: any) {
disable_submit_btn = false;
$idaa_sess.bb.edit__post_obj = false;
if (!$ae_loc.administrator_access && $ae_loc.site_cfg_json?.bb_send_staff_update_email) {
// if (!$ae_loc.administrator_access && $ae_loc.site_cfg_json?.bb_send_staff_update_email) {
if ($ae_loc.site_cfg_json?.bb_send_staff_update_email) {
send_staff_notification_email();
}
});