diff --git a/app/Config/Routes.php b/app/Config/Routes.php index e13f4e23..f166e78d 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -149,8 +149,9 @@ $routes->get('campaign_creation_form/(:any)', 'Notifications::campaign_creation_ $routes->get('campaign_creation_delete/(:any)', 'Notifications::campaign_creation_delete/$1'); $routes->post("campaign_creation_insert", "Notifications::campaign_creation_insert"); - $routes->get('process_scheduled_notifications/', 'Notifications::processScheduledNotifications'); +$routes->get('acknowlegdement', 'Notifications::noifications_acknowlegdement'); + # Api integration Routes $routes->post('api/(:any)', 'ApiIntegration::api_integration/$1'); diff --git a/app/Controllers/Notifications.php b/app/Controllers/Notifications.php index 8f721800..3dac5bfa 100755 --- a/app/Controllers/Notifications.php +++ b/app/Controllers/Notifications.php @@ -780,4 +780,17 @@ class Notifications extends BaseController } ############## Auto Scheduled Notification Ends ################ + ################################################################ + # Notification Acknowlegdement + ################################################################ + ## notification acknowlegdement + public function noifications_acknowlegdement(){ + $model = new NotificationModel(); + $data['noifications_acknowlegdement'] = $model->get_noifications_acknowlegdement_data(); + $data['page_name'] = 'Notifications Acknowlegdement'; + $this->render_page('noifications_acknowlegdement', $data); + } + ############## Notification Acknowlegdement Ends ################ + + } diff --git a/app/Models/NotificationModel.php b/app/Models/NotificationModel.php index a6b2f793..308ac1ee 100644 --- a/app/Models/NotificationModel.php +++ b/app/Models/NotificationModel.php @@ -265,6 +265,34 @@ public function customerGroupQueryExecution($queries){ return $statement; } + + public function get_noifications_acknowlegdement_data() + { + $query = $this->db->table("notification_history_children"); + $query->select(' + notification_history_children.id AS child_id, + notification_history_children.fkid AS parent_id, + notification_history_children.customer_id, + CONCAT(customers.first_name, " ", customers.last_name) AS customers_name, + notification_history_children.receiving_entity, + notification_history_children.receiving_status, + notification_history_children.result, + notification_history_children.sent_time, + DATE_FORMAT(notification_history_children.sent_time, "%d/%m/%Y %H:%i:%s") AS formatted_sent_time, + notification_history_parents.campaign_id, + notification_campaign.campaign_name, + notification_history_parents.status AS parents_status, + notification_history_parents.start_date_time, + DATE_FORMAT(notification_history_parents.start_date_time, "%d/%m/%Y %H:%i:%s") AS formatted_start_date_time + '); + + $query->join('notification_history_parents', 'notification_history_parents.id = notification_history_children.fkid', 'left'); + $query->join('customers', 'customers.customer_id = notification_history_children.customer_id', 'left'); + $query->join('notification_campaign', 'notification_campaign.campaign_id = notification_history_parents.campaign_id', 'left'); + $query->groupBy('notification_history_children.id'); + + return $query->get()->getResultArray(); + } } diff --git a/app/Views/noifications_acknowlegdement.php b/app/Views/noifications_acknowlegdement.php new file mode 100644 index 00000000..6680d5a8 --- /dev/null +++ b/app/Views/noifications_acknowlegdement.php @@ -0,0 +1,55 @@ +
+
+
+
+
+

+
+ + + + + + + + + + + + + + '; $result = "";} + else { $class = 'text-danger'; $icon = ''; $result = "";} + ?> + + + + + + + + + + + + + +
NameModeSchedule AtSent AtCampaign NameStatus
+
+
+
+
+
+ + + \ No newline at end of file diff --git a/app/Views/template/header.php b/app/Views/template/header.php index a1609fc3..594a0a60 100644 --- a/app/Views/template/header.php +++ b/app/Views/template/header.php @@ -250,6 +250,9 @@
  • ">Notification Campaign
  • +
  • + ">Notification Acknowlegdement +
  • ">Custom Notifications