From a19d9555132a4faed45683eb8545a3d7dd79d83f Mon Sep 17 00:00:00 2001 From: VE10-Sanjeev Date: Mon, 18 Mar 2024 19:01:13 +0530 Subject: [PATCH] delegation flash msg fixes : ps --- .../Delegation/controllers/Delegation.php | 30 +++++++++++++++++-- .../Delegation/views/delegation_list.php | 12 +++++++- 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/application/modules/Delegation/controllers/Delegation.php b/application/modules/Delegation/controllers/Delegation.php index b99dbf0..9089eda 100644 --- a/application/modules/Delegation/controllers/Delegation.php +++ b/application/modules/Delegation/controllers/Delegation.php @@ -68,8 +68,19 @@ public function Assign_Delecation() $this->notification->sendNotificationForDelegation($Delecation_id, $code, $type); } - - $this->session->set_flashdata('Success', 'Delegation Assigned Successfully'); + if($Delecation_id){ + $this->session->set_flashdata('FlashMsg', ''); + }else{ + $this->session->set_flashdata('FlashMsg', ''); + } redirect('Delegation/Delegation_list'); } @@ -100,7 +111,20 @@ public function Edit_Create_Delecation() $table="delegation"; $Delecation = $this->MY_Model->edit_option($action, $id, $table); - $this->session->set_flashdata('Success', 'Delegation Updated Successfully'); + + if($Delecation){ + $this->session->set_flashdata('FlashMsg', ''); + }else{ + $this->session->set_flashdata('FlashMsg', ''); + } redirect('Delegation/Delegation_list'); } diff --git a/application/modules/Delegation/views/delegation_list.php b/application/modules/Delegation/views/delegation_list.php index 383f2f4..e691bbf 100644 --- a/application/modules/Delegation/views/delegation_list.php +++ b/application/modules/Delegation/views/delegation_list.php @@ -33,7 +33,7 @@
- + session->flashdata('FlashMsg'); ?> session->userdata('Success')): ?>
@@ -122,6 +122,16 @@ }); }); + +