diff --git a/api/application/helpers/custom_pdalerts_helper.php b/api/application/helpers/custom_pdalerts_helper.php new file mode 100644 index 00000000..fb7d6737 --- /dev/null +++ b/api/application/helpers/custom_pdalerts_helper.php @@ -0,0 +1,57 @@ +db->SELECT("*"); + $CI->db->FROM(PDNOTIFICATIONMSG." as PDNOTIFICATIONMSG"); + $CI->db->WHERE("PDNOTIFICATIONMSG.pd_status",$core_details[0]['pd_status']); + $CI->db->WHERE("PDNOTIFICATIONMSG.isactive",1); + $pd_notification_msg = $CI->db->GET()->result_array(); + + $msg = $pd_notification_msg[0]['pdincharge']; + $msg = PDALERTS::stringReplace($msg,$core_details); + $additional_data_for_logs['to_whom'] = 'LEDNER'; + + if(ENVIRONMENT == 'production') + { + PDALERTS::sendMail($CI,'sinepd@sinemanagement.com',$msg,$core_details); + } + else if(ENVIRONMENT == 'testing') + { + //echo 'TESTING'; + PDALERTS::sendMail($CI,'ssa@venbainfotech.com',$msg,$core_details); + //PDALERTS::sendMail($CI,'vitvelz@gmail.com',$msg,$core_details); + } + } + + /********************************************************/ + } + + + +} + + +?> \ No newline at end of file diff --git a/api/application/helpers/pdalerts_helper.php b/api/application/helpers/pdalerts_helper.php index 953441ca..5f96adb7 100644 --- a/api/application/helpers/pdalerts_helper.php +++ b/api/application/helpers/pdalerts_helper.php @@ -25,6 +25,7 @@ class PDALERTS $CI =&get_instance(); //$CI->load->library('AWS_SNS'); $CI->load->helper('push_notification'); + $CI->load->helper('custom_pdalerts'); $pd_notification_configs = array(); //die(); $additional_data_for_logs = array('pd_id' =>$pdid); @@ -56,6 +57,12 @@ class PDALERTS // die(); if(count($core_details)) { + + //Trigger Custom Notification apart from entity and PD level notification config + CUSTOM_PDALERTS::custom_pdnotification($CI,$core_details);//die(); + //END Trigger Custom Notification apart from entity and PD level notification config + + $is_pd_notify_enabled = $core_details[0]['is_notify_enabled']; $is_sms_enabled = $core_details[0]['is_sms_enabled']; $is_mail_enabled = $core_details[0]['is_mail_enabled']; @@ -203,20 +210,7 @@ class PDALERTS } - /********************CUSTOM MAIL NOTIFICATION***********************/ - // if(($core_details[0]['pd_status'] == 'TRIGGERED') && ($core_details[0]['short_name'] == 'IIB' || $core_details[0]['short_name'] == 'UDAAN' || $core_details[0]['short_name'] == 'IMGC')) - // { - // if(ENVIRONMENT == 'production') - // { - // self::sendMail($CI,'sinepd@sinemanagement.com',$msg,$core_details); - // } - // else if(ENVIRONMENT == 'testing') - // { - // self::sendMail($CI,'ssa@venbainfotech.com',$msg,$core_details); - // } - // } - - /********************************************************/ + /*********************************************/