From b933a02561b2898234c9ebc68cf550f810b62dc7 Mon Sep 17 00:00:00 2001 From: vadivelJ96 Date: Sat, 16 Aug 2025 12:47:49 +0530 Subject: [PATCH 01/41] CHANGE DASHBOARD THEME NEW - VADIVEL J 2025-08-16 --- app/Config/Routes.php | 5 +- app/Controllers/ThzController.php | 75 +- app/Models/ThzMasterNotesModel.php | 4 +- app/Views/DashBoard.php | 157 ++- app/Views/bds_dash.php | 132 ++- app/Views/claims_dash.php | 157 ++- app/Views/endorsement_dash.php | 290 +++-- app/Views/layout/footer.php | 84 +- app/Views/layout/footer_old.php | 936 +++++++++++++++ app/Views/layout/header.php | 1023 ++++++++--------- app/Views/layout/header_old.php | 899 +++++++++++++++ app/Views/leads_dash.php | 255 ++-- app/Views/ticket_search.php | 3 +- public/assets/images/active_bds.png | Bin 0 -> 537 bytes public/assets/images/active_claims.png | Bin 0 -> 1361 bytes .../images/active_leads_and_bds_renewal.png | Bin 0 -> 1196 bytes .../assets/images/active_pending_actions.png | Bin 0 -> 826 bytes public/assets/images/inactive_bds.png | Bin 0 -> 664 bytes public/assets/images/inactive_claims.png | Bin 0 -> 1426 bytes .../images/inactive_leads_and_bds_renewal.png | Bin 0 -> 1869 bytes .../images/inactive_pending_actions.png | Bin 0 -> 775 bytes 21 files changed, 3129 insertions(+), 891 deletions(-) create mode 100644 app/Views/layout/footer_old.php create mode 100644 app/Views/layout/header_old.php create mode 100644 public/assets/images/active_bds.png create mode 100644 public/assets/images/active_claims.png create mode 100644 public/assets/images/active_leads_and_bds_renewal.png create mode 100644 public/assets/images/active_pending_actions.png create mode 100644 public/assets/images/inactive_bds.png create mode 100644 public/assets/images/inactive_claims.png create mode 100644 public/assets/images/inactive_leads_and_bds_renewal.png create mode 100644 public/assets/images/inactive_pending_actions.png diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 2377fc38..1cb35d79 100755 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -634,4 +634,7 @@ $routes->post('newClaim','VidalApiController::newClaim'); $routes->post('enrollment','VidalApiController::enrollment'); -$routes->post("ticketCreation", "ThzController::ticketCreation"); \ No newline at end of file +$routes->post("ticketCreation", "ThzController::ticketCreation"); +$routes->post("ticketList", "ThzController::ticketList"); +$routes->post("ticketConversationSave", "ThzController::ticketConversationSave"); +$routes->post("conversationListPerTicket", "ThzController::conversationListPerTicket"); \ No newline at end of file diff --git a/app/Controllers/ThzController.php b/app/Controllers/ThzController.php index 590e8f78..6613cb6b 100644 --- a/app/Controllers/ThzController.php +++ b/app/Controllers/ThzController.php @@ -33,13 +33,7 @@ class ThzController extends BaseController $data = $this->request->getJSON(true); - $cleanedData = $this->thzControllerCleaner->ticketCreation($data); - - if ($cleanedData === false) { - return $this->response->setJSON((['status' => 'error', 'message' => 'Invalid data given'])); - } - - $result = $this->thzMasterModel->insert($cleanedData); + $result = $this->thzMasterModel->insert($data); return $this->response->setJSON((['status' => 'success', 'message' => 'Ticket created successfully'])); @@ -49,20 +43,17 @@ class ThzController extends BaseController $data = $this->request->getJson(true); - $cleanedData = $this->thzControllerCleaner->ticketList($data); + $id = $data['id'] ?? null; - if( $cleanedData === false ) { - return $this->response->setJSON((['status' => 'error', 'message' => 'Invalid data given'])); + if ( isset($id) && !empty($id) ) { + //Find Specific Ticket per id + $mobile = $data['mobile'] ?? null; + $result = $this->thzMasterModel->where('mobile',$mobile)->findAll(); + }else{ + // Find all the Ticket For the Manager who can see all the Tickets + $result = $this->thzMasterModel->findAll(); } - $id = $cleanedData['id'] ?? null; - - if (empty($id)) { - $result = $this->thzMasterModel->findAll(); - } - - $result = $this->thzMasterModel->where('id',$id)->findAll(); - if(empty($result)){ return $this->response->setJSON((['status' => 'error', 'message' => 'No tickets found'])); } @@ -71,16 +62,11 @@ class ThzController extends BaseController } + public function ticketConversationSave(){ $data = $this->request->getJson(true); - $cleanedData = $this->thzControllerCleaner->ticketList($data); - - if( $cleanedData === false ) { - return $this->response->setJSON((['status' => 'error', 'message' => 'Invalid data given'])); - } - $result = $this->thzMasterNotesModel->insert($data); if(empty($result)){ @@ -92,17 +78,13 @@ class ThzController extends BaseController } - public function ticketListForUser(){ + public function conversationListPerTicket(){ $data = $this->request->getJson(true); - $cleanedData = $this->thzControllerCleaner->ticketList($data); + $thz_id = $data['thz_id'] ?? null; - if( $cleanedData === false ) { - return $this->response->setJSON((['status' => 'error', 'message' => 'Invalid data given'])); - } - - $result = $this->thzMasterNotesModel->insert($data); + $result = $this->thzMasterNotesModel->conversationListPerTicket($thz_id); if(empty($result)){ return $this->response->setJSON((['status' => 'error', 'message' => 'No tickets found'])); @@ -112,37 +94,6 @@ class ThzController extends BaseController } - public function conversationListForUserPerTicket(){ - - $data = $this->request->getJson(true); - - $cleanedData = $this->thzControllerCleaner->ticketList($data); - - if( $cleanedData === false ) { - return $this->response->setJSON((['status' => 'error', 'message' => 'Invalid data given'])); - } - - $thz_id = $cleanedData['thz_id'] ?? null; - - $result = $this->thzMasterNotesModel->conversationListForUserPerTicket($thz_id); - - if(empty($result)){ - return $this->response->setJSON((['status' => 'error', 'message' => 'No tickets found'])); - } - - return $this->response->setJSON((['status' => 'success', 'data' => $result])); - - } - - public function ticketListForAssignedStaff(){ - - } - - public function conversationListForAssignedStaffPerTicket(){ - - } - - diff --git a/app/Models/ThzMasterNotesModel.php b/app/Models/ThzMasterNotesModel.php index 2072c094..cd02a52c 100644 --- a/app/Models/ThzMasterNotesModel.php +++ b/app/Models/ThzMasterNotesModel.php @@ -40,7 +40,7 @@ class ThzMasterNotesModel extends Model protected $beforeDelete = []; protected $afterDelete = []; - public function conversationListForUserPerTicket($thz_id){ + public function conversationListPerTicket($thz_id){ if(empty($thz_id)){ @@ -50,6 +50,7 @@ class ThzMasterNotesModel extends Model $sql = "SELECT + thz_master.*, thz_master_notes.id, thz_master_notes.thz_id, thz_master_notes.notes, @@ -60,6 +61,7 @@ class ThzMasterNotesModel extends Model thz_master_notes Join thz_master ON thz_master.thz_id = :thz_id: + WHERE thz_master_notes.thz_id = :thz_id: ORDER BY diff --git a/app/Views/DashBoard.php b/app/Views/DashBoard.php index 08e08855..b0cefc4e 100755 --- a/app/Views/DashBoard.php +++ b/app/Views/DashBoard.php @@ -171,79 +171,109 @@ margin: 0 5px 10px!important; } + .nav-link{ + color:black !important; + background-color: #D4F5F6 !important; + font-size: small; + padding:8px; + border-radius: 10px !important; + } + .nav-link.active-tab { + color: white !important; + background-color: #00999E !important; + font-size: small; + padding:8px; + border-radius: 10px !important; + + } + .tab-content-styles{ + background-color:#F4F4F4; + margin-right:20px; + border-radius:25px!important; + min-height: 70vh !important; + } + + +

Dashboard

+
-
-
-
-
-
-
- -
+
-
+
+
+ @@ -257,7 +287,6 @@ - + +
+ + + + + +
+
+
+
+ © NHANCE +
+ +
+
+
+ + +
+ + + + + + +
+ + + +
+
+ +
+ + Notification +
+
+
    + +
+
+ + +
+ + TO DOs +
+
+
    + +
+
+
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Views/layout/header.php b/app/Views/layout/header.php index 6ac2e4ee..0b311aee 100755 --- a/app/Views/layout/header.php +++ b/app/Views/layout/header.php @@ -327,6 +327,136 @@ } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ /assets/images/nhance-loader-fast.gif" height="40" width="40" alt="Loading..."> +
+
+ + + +
+ + + + + + +
+ + + + +
+ + + +
+ + +
+ + + + + + +
+
+ + +
\ No newline at end of file diff --git a/app/Views/leads_dash.php b/app/Views/leads_dash.php index 6effa135..b6b24fc4 100644 --- a/app/Views/leads_dash.php +++ b/app/Views/leads_dash.php @@ -1,8 +1,4 @@
-
-
-
-
Leads
-

-

-

 

-

 

+
+
+
+
+

Leads

+

+

+
Lead Tracker
+
-
-
-
-
-
BDS Renewals
-

-

-

 

-

 

+
+
+
+

BDS Renewals

+

+ +

+
Renewal Tracker
+
+
-
+
@@ -164,88 +196,102 @@ $isActive = get_role_id() == STAFF_ROLE_ID && in_array(ENROLLMENT_TEAM_ID, user_
- + $value) : ?> + + $value) : ?> - - + 20 ? substr($formattedStatus, 0, 15) . '...' : $formattedStatus; + $showTooltip = strlen($formattedStatus) > 20; + ?> + +
- - $value) : ?> +
- - 20 ? substr($formattedStatus, 0, 15) . '...' : $formattedStatus; - $showTooltip = strlen($formattedStatus) > 20; - ?> - + + // Get the background color for the current tile + $bgColor = $colorShades[$colorSetIndex][$shadeIndex]; + ?> + 20 ? substr($formattedStatus, 0, 15) . '...' : $formattedStatus; + $showTooltip = strlen($formattedStatus) > 20; + ?> + + + +
+ + diff --git a/app/Views/layout/header.php b/app/Views/layout/header.php index 0b311aee..59150e0f 100755 --- a/app/Views/layout/header.php +++ b/app/Views/layout/header.php @@ -64,6 +64,9 @@ + + + + + + + @@ -504,8 +531,8 @@
  • - - + + Dashboard
  • @@ -513,8 +540,8 @@
  • - - + /assets/images/clients_sb.png" alt="Logo" height="24"> Clients @@ -524,8 +551,8 @@
  • - - + /assets/images/action_on_policies_sb.png" alt="Logo" height="20"> Action on Policies @@ -556,7 +583,7 @@
  • - + /assets/images/masters_sb.png" alt="Logo" height="20"> Masters @@ -608,7 +635,7 @@
  • - + /assets/images/claims_sb.png" alt="Logo" height="20"> Claims @@ -638,7 +665,7 @@
  • - + /assets/images/leads_sb.png" alt="Logo" height="20"> Leads @@ -649,7 +676,7 @@
  • - + /assets/images/policy_transactions_sb.png" alt="Logo" height="20"> Policy Transactions @@ -798,7 +825,7 @@
  • - + /assets/images/app_content_mng_sb.png" alt="Logo" height="20"> App Content Mgmt @@ -816,7 +843,7 @@
  • - " class="waves-effect" target="_blank" rel="noopener noreferrer"> + " class="waves-effect img-inactive-not-working" target="_blank" rel="noopener noreferrer"> /assets/images/user_manual_sb.png" alt="Logo" height="20"> User Manual @@ -883,6 +910,7 @@
  • +
    diff --git a/app/Views/lead_filter.php b/app/Views/lead_filter.php index 441b363b..86938097 100644 --- a/app/Views/lead_filter.php +++ b/app/Views/lead_filter.php @@ -11,7 +11,7 @@
    -

    Lead Filter

    +

    Lead Filter

    Date: Sat, 16 Aug 2025 18:55:49 +0530 Subject: [PATCH 06/41] CHANGE DASHBOARD THEME NEW - VADIVEL J 2025-08-16 --- app/Config/Routes.php | 4 +- app/Controllers/ThzController.php | 102 +++++++++++++++++++++-------- app/Models/ThzMasterNotesModel.php | 2 +- 3 files changed, 79 insertions(+), 29 deletions(-) diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 1cb35d79..dee21c88 100755 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -634,7 +634,7 @@ $routes->post('newClaim','VidalApiController::newClaim'); $routes->post('enrollment','VidalApiController::enrollment'); -$routes->post("ticketCreation", "ThzController::ticketCreation"); +$routes->post("ticketSave", "ThzController::ticketSave"); $routes->post("ticketList", "ThzController::ticketList"); $routes->post("ticketConversationSave", "ThzController::ticketConversationSave"); -$routes->post("conversationListPerTicket", "ThzController::conversationListPerTicket"); \ No newline at end of file +$routes->post("ticketConversationList", "ThzController::ticketConversationList"); \ No newline at end of file diff --git a/app/Controllers/ThzController.php b/app/Controllers/ThzController.php index 6613cb6b..be2d0f5f 100644 --- a/app/Controllers/ThzController.php +++ b/app/Controllers/ThzController.php @@ -29,43 +29,67 @@ class ThzController extends BaseController // } - public function ticketCreation(){ + public function ticketSave(){ $data = $this->request->getJSON(true); - $result = $this->thzMasterModel->insert($data); + if (!empty($data['thz_id'])) { + $data['updated_by'] = get_session_userid(); + $ticket_id = $data['thz_id']; + $text = "update"; + + $result = $this->thzMasterModel->where('thz_id', $ticket_id)->set($data)->update(); + } else { + $data['created_by'] = get_session_userid(); + $text = "create"; + + $result = $this->thzMasterModel->insert($data); + } + + return $this->response->setJSON(([ 'status' => $result ? 'success' : 'error' , + 'message' => $result ? "Ticket {$text}d successfully" : "Unable to {$text} ticket. Please try again." ])); + + - return $this->response->setJSON((['status' => 'success', 'message' => 'Ticket created successfully'])); } + - public function ticketList(){ + public function ticketList() + { - $data = $this->request->getJson(true); - - $id = $data['id'] ?? null; - - if ( isset($id) && !empty($id) ) { - //Find Specific Ticket per id - $mobile = $data['mobile'] ?? null; - $result = $this->thzMasterModel->where('mobile',$mobile)->findAll(); - }else{ - // Find all the Ticket For the Manager who can see all the Tickets - $result = $this->thzMasterModel->findAll(); - } - - if(empty($result)){ - return $this->response->setJSON((['status' => 'error', 'message' => 'No tickets found'])); - } - - return $this->response->setJSON((['status' => 'success', 'data' => $result])); + $returnType = strtolower($this->request->getGet('return_type') ?? 'api'); + $data = $this->request->getJSON(true); + + $tickets = $this->fetchTicketsBasedOnrole($data); + + + + if ($returnType === 'api') { + if (empty($tickets)) { + return $this->response->setJSON([ 'status' => 'error','message' => 'No tickets found',])->setStatusCode(404); + } + }else{ + + $data['page_name'] = "Ticket List"; + $data['ticket_data'] = $tickets; + $data['assigner'] = $this->userModel->where('is_active', 1)->findAll(); + return $this->loadLayout('ticket_list_web', $data); + } + + + + return $this->response->setJSON([ + 'status' => 'success', + 'data' => $tickets, + ]); } public function ticketConversationSave(){ - $data = $this->request->getJson(true); + $data = $this->request->getJSON(true); $result = $this->thzMasterNotesModel->insert($data); @@ -78,13 +102,13 @@ class ThzController extends BaseController } - public function conversationListPerTicket(){ + public function ticketConversationList(){ - $data = $this->request->getJson(true); + $data = $this->request->getJSON(true); $thz_id = $data['thz_id'] ?? null; - $result = $this->thzMasterNotesModel->conversationListPerTicket($thz_id); + $result = $this->thzMasterNotesModel->ticketConversationList($thz_id); if(empty($result)){ return $this->response->setJSON((['status' => 'error', 'message' => 'No tickets found'])); @@ -114,6 +138,32 @@ class ThzController extends BaseController } + private function fetchTicketsBasedOnrole(array $data): array + { + $id = $data['thz_id'] ?? null; + $assign_to = $data['assign_to'] ?? null; + $mobile = $data['mobile'] ?? null; + + if (!empty($assign_to)) { + // Tickets assigned to a staff + return $this->thzMasterModel + ->where('assign_to', $assign_to) + ->findAll(); + } + + if (!empty($id) && !empty($mobile)) { + // Specific ticket by ID and mobile + return $this->thzMasterModel + ->where('thz_id', $id) + ->where('mobile', $mobile) + ->findAll(); + } + + // All tickets (e.g., for managers) + return $this->thzMasterModel->findAll(); + } + } + diff --git a/app/Models/ThzMasterNotesModel.php b/app/Models/ThzMasterNotesModel.php index cd02a52c..769b505d 100644 --- a/app/Models/ThzMasterNotesModel.php +++ b/app/Models/ThzMasterNotesModel.php @@ -40,7 +40,7 @@ class ThzMasterNotesModel extends Model protected $beforeDelete = []; protected $afterDelete = []; - public function conversationListPerTicket($thz_id){ + public function ticketConversationList($thz_id){ if(empty($thz_id)){ From 5b2299210dea4937a561c2bb085b677c16ab32a2 Mon Sep 17 00:00:00 2001 From: velz Date: Sat, 16 Aug 2025 18:57:52 +0530 Subject: [PATCH 07/41] FIX_CHATBOT_BG_IMG_HEIGHT --- app/Views/chatbot.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/Views/chatbot.php b/app/Views/chatbot.php index 89812c6a..4b374423 100644 --- a/app/Views/chatbot.php +++ b/app/Views/chatbot.php @@ -262,9 +262,9 @@ function setupMessageObserver() { const chatElements = doc.querySelectorAll("#messageArea .chat, #messageArea ol.chat, ol.chat"); chatElements.forEach(element => { if (element) { - element.style.setProperty("height", 95 + "vh", "important"); - element.style.setProperty("max-height", 95 + "vh", "important"); - element.style.setProperty("min-height", 95 + "vh", "important"); + element.style.setProperty("height", 85 + "vh", "important"); + element.style.setProperty("max-height", 85 + "vh", "important"); + element.style.setProperty("min-height", 85 + "vh", "important"); element.style.setProperty("transition", "height 0.3s ease", "important"); console.log('Direct style applied to:', element); } @@ -417,9 +417,9 @@ function setupMessageObserver() { const chatElements = doc.querySelectorAll("#messageArea .chat, #messageArea ol.chat, ol.chat"); chatElements.forEach(element => { if (element) { - element.style.setProperty("height", 95 + "vh", "important"); - element.style.setProperty("max-height", 95 + "vh", "important"); - element.style.setProperty("min-height", 95 + "vh", "important"); + element.style.setProperty("height", 85 + "vh", "important"); + element.style.setProperty("max-height", 85 + "vh", "important"); + element.style.setProperty("min-height", 85 + "vh", "important"); } }); From d607afe5edb79a5716e4fe2b04fd0370578fd6c5 Mon Sep 17 00:00:00 2001 From: vadivelJ96 Date: Sun, 17 Aug 2025 21:39:57 +0530 Subject: [PATCH 08/41] CHANGE TICKETING SYSTEM - VADIVEL J 2025-08-17 --- app/Config/Routes.php | 4 +- app/Controllers/ThzController.php | 82 +++++++++++++++---------------- 2 files changed, 42 insertions(+), 44 deletions(-) diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 3aaaaabd..b6233e82 100755 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -636,6 +636,6 @@ $routes->post('enrollment','VidalApiController::enrollment'); $routes->post("ticketSave", "ThzController::ticketSave"); -$routes->post("ticketList", "ThzController::ticketList"); +$routes->get("ticketList", "ThzController::ticketList"); $routes->post("ticketConversationSave", "ThzController::ticketConversationSave"); -$routes->post("ticketConversationList", "ThzController::ticketConversationList"); \ No newline at end of file +$routes->get("ticketConversationList", "ThzController::ticketConversationList"); \ No newline at end of file diff --git a/app/Controllers/ThzController.php b/app/Controllers/ThzController.php index be2d0f5f..c5fd2d17 100644 --- a/app/Controllers/ThzController.php +++ b/app/Controllers/ThzController.php @@ -8,6 +8,7 @@ use CodeIgniter\HTTP\ResponseInterface; use App\Models\ThzMasterModel; use App\Models\ThzMasterNotesModel; use App\ControllerCleaners\ThzControllerCleaner; +use app\Models\UserModel; class ThzController extends BaseController { @@ -17,11 +18,14 @@ class ThzController extends BaseController protected $thzControllerCleaner; + protected $userModel; + public function __construct() { $this->thzMasterModel = new ThzMasterModel(); $this->thzMasterNotesModel = new ThzMasterNotesModel(); $this->thzControllerCleaner = new ThzControllerCleaner(); + $this->userModel = new UserModel(); } public function index() @@ -33,34 +37,26 @@ class ThzController extends BaseController $data = $this->request->getJSON(true); - if (!empty($data['thz_id'])) { - $data['updated_by'] = get_session_userid(); - $ticket_id = $data['thz_id']; - $text = "update"; - - $result = $this->thzMasterModel->where('thz_id', $ticket_id)->set($data)->update(); + if (!empty($data['thz_id'])) { + $text = "update"; + $result = $this->updateTicket($data); } else { - $data['created_by'] = get_session_userid(); - $text = "create"; - - $result = $this->thzMasterModel->insert($data); + $text = "create"; + $result = $this->insertTicket($data); } - return $this->response->setJSON(([ 'status' => $result ? 'success' : 'error' , - 'message' => $result ? "Ticket {$text}d successfully" : "Unable to {$text} ticket. Please try again." ])); - - - - + return $this->response->setJSON([ + 'status' => $result ? 'success' : 'error', + 'message' => $result ? "Ticket {$text}d successfully" : "Unable to {$text} ticket. Please try again." + ]); } - public function ticketList() { $returnType = strtolower($this->request->getGet('return_type') ?? 'api'); - $data = $this->request->getJSON(true); + $data = $this->request->getGet(); $tickets = $this->fetchTicketsBasedOnrole($data); @@ -86,16 +82,15 @@ class ThzController extends BaseController ]); } - public function ticketConversationSave(){ $data = $this->request->getJSON(true); $result = $this->thzMasterNotesModel->insert($data); - if(empty($result)){ - return $this->response->setJSON((['status' => 'error', 'message' => 'No tickets found'])); - } + if(empty($result)){ + return $this->response->setJSON((['status' => 'error', 'message' => 'No tickets found'])); + } return $this->response->setJSON((['status' => 'success', 'data' => $result])); @@ -104,40 +99,24 @@ class ThzController extends BaseController public function ticketConversationList(){ - $data = $this->request->getJSON(true); + $data = $this->request->getGet(); $thz_id = $data['thz_id'] ?? null; $result = $this->thzMasterNotesModel->ticketConversationList($thz_id); - if(empty($result)){ - return $this->response->setJSON((['status' => 'error', 'message' => 'No tickets found'])); - } + if(empty($result)){ + return $this->response->setJSON((['status' => 'error', 'message' => 'No tickets found'])); + } return $this->response->setJSON((['status' => 'success', 'data' => $result])); } - - /************************************************** PRIVATE FUNCTIONS ********************************************************/ - private function checkGeneralUserOrEmployee($data){ - - if($data['empcode']){ - return $data['empcode']; - } elseif ($data['mobile']) { - return $data['mobile']; - } elseif ($data['email']) { - return $data['email']; - } else { - return null; - } - - } - private function fetchTicketsBasedOnrole(array $data): array { $id = $data['thz_id'] ?? null; @@ -163,6 +142,25 @@ class ThzController extends BaseController return $this->thzMasterModel->findAll(); } + private function updateTicket($data){ + + $data['updated_by'] = get_session_userid(); + $ticket_id = $data['thz_id']; + $result = $this->thzMasterModel->where('thz_id', $ticket_id)->set($data)->update(); + + return $result; + + } + + private function insertTicket($data){ + + $data['created_by'] = get_session_userid(); + $result = $this->thzMasterModel->insert($data); + + return $result; + + } + } From 2918ee067658418ae1d3b72c66741f6b91ca760d Mon Sep 17 00:00:00 2001 From: vadivelJ96 Date: Mon, 18 Aug 2025 11:00:43 +0530 Subject: [PATCH 09/41] CHANGE UI CHANGE FINAL - VADIVEL J 2025-08-17 --- app/Config/Routes.php | 3 +- app/Controllers/ThzController.php | 79 ++++++++++++++++--- app/Views/bds_dash.php | 2 +- app/Views/business_team_list.php | 4 +- app/Views/claims_dash.php | 2 +- app/Views/client_deposit_list.php | 2 +- app/Views/client_onboarding.php | 2 +- app/Views/finance_team_list.php | 4 +- app/Views/hr_activity_history.php | 4 +- app/Views/insurer_onboarding.php | 2 +- app/Views/irba_report.php | 4 +- app/Views/kyc_onboarding.php | 2 +- app/Views/layout/header.php | 3 + app/Views/leads_dash.php | 2 +- app/Views/outstanding_report_list.php | 4 +- .../policy_transaction_endorsement_list.php | 4 +- .../policy_transaction_inception_list.php | 4 +- app/Views/policy_type_onboarding.php | 2 +- app/Views/renewal_search.php | 4 +- app/Views/report_bds_filter.php | 4 +- app/Views/ticket_conversation.php | 4 +- app/Views/ticket_edit_onbording.php | 2 +- app/Views/ticket_form_gmc.php | 4 +- app/Views/ticket_form_gpa.php | 4 +- app/Views/ticket_reports.php | 4 +- app/Views/tpa_onboarding.php | 2 +- app/Views/variance_report_list.php | 4 +- app/Views/view_deposit.php | 2 +- .../libs/bootstrap-daterangepicker/index.html | 6 +- .../website/index.html | 6 +- 30 files changed, 118 insertions(+), 57 deletions(-) diff --git a/app/Config/Routes.php b/app/Config/Routes.php index b6233e82..bafc5373 100755 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -638,4 +638,5 @@ $routes->post('enrollment','VidalApiController::enrollment'); $routes->post("ticketSave", "ThzController::ticketSave"); $routes->get("ticketList", "ThzController::ticketList"); $routes->post("ticketConversationSave", "ThzController::ticketConversationSave"); -$routes->get("ticketConversationList", "ThzController::ticketConversationList"); \ No newline at end of file +$routes->get("ticketConversationList", "ThzController::ticketConversationList"); +$routes->get('ticketAssigning',"ThzController::ticketAssigning"); \ No newline at end of file diff --git a/app/Controllers/ThzController.php b/app/Controllers/ThzController.php index c5fd2d17..2b9dafcc 100644 --- a/app/Controllers/ThzController.php +++ b/app/Controllers/ThzController.php @@ -37,18 +37,18 @@ class ThzController extends BaseController $data = $this->request->getJSON(true); - if (!empty($data['thz_id'])) { - $text = "update"; - $result = $this->updateTicket($data); - } else { - $text = "create"; - $result = $this->insertTicket($data); - } + if (!empty($data['thz_id'])) { + $text = "update"; + $result = $this->updateTicket($data); + } else { + $text = "create"; + $result = $this->insertTicket($data); + } - return $this->response->setJSON([ - 'status' => $result ? 'success' : 'error', - 'message' => $result ? "Ticket {$text}d successfully" : "Unable to {$text} ticket. Please try again." - ]); + return $this->response->setJSON([ + 'status' => $result ? 'success' : 'error', + 'message' => $result ? "Ticket {$text}d successfully" : "Unable to {$text} ticket. Please try again." + ]); } public function ticketList() @@ -111,6 +111,46 @@ class ThzController extends BaseController return $this->response->setJSON((['status' => 'success', 'data' => $result])); + } + + public function ticketSaveNotification($data){ + + } + + public function ticketConversationSaveNotification($data){ + + } + + public function ticketAssigning(){ + + $returnType = strtolower($this->request->getGet('return_type') ?? 'api'); + + $data = $this->request->getVar(); + + $assignee_id = $data['assignee_id']; + + $thz_id = $data['thz_id']; + + $result = $this->thzMasterModel->set('assign_to',$assignee_id)->where('thz_id',$thz_id)->update(); + + if($returnType === 'api'){ + + if(empty($result)){ + return $this->response->setJSON((['status' => 'error', 'message' => 'No tickets found'])); + } + + return $this->response->setJSON((['status' => 'success', 'data' => $result])); + + }else{ + + + + } + + + + + } @@ -142,6 +182,23 @@ class ThzController extends BaseController return $this->thzMasterModel->findAll(); } + private function notificationBasedOnRole($data){ + + $id = $data['thz_id'] ?? null; + $assign_to = $data['assign_to'] ?? null; + $mobile = $data['mobile'] ?? null; + + if (!empty($assign_to)) { + + } + + if (!empty($id) && !empty($mobile)) { + + } + + + } + private function updateTicket($data){ $data['updated_by'] = get_session_userid(); diff --git a/app/Views/bds_dash.php b/app/Views/bds_dash.php index 24a5effa..9f27e8a2 100644 --- a/app/Views/bds_dash.php +++ b/app/Views/bds_dash.php @@ -160,7 +160,7 @@
    Current Tile : diff --git a/app/Views/outstanding_report_list.php b/app/Views/outstanding_report_list.php index 97d8f40c..682180a8 100644 --- a/app/Views/outstanding_report_list.php +++ b/app/Views/outstanding_report_list.php @@ -132,8 +132,8 @@ table.dataTable tbody td {
    -   - +   +
    diff --git a/app/Views/policy_transaction_endorsement_list.php b/app/Views/policy_transaction_endorsement_list.php index 52eb4fea..03530e65 100644 --- a/app/Views/policy_transaction_endorsement_list.php +++ b/app/Views/policy_transaction_endorsement_list.php @@ -268,8 +268,8 @@ custom-dropdown-menu {
    @@ -58,7 +58,7 @@
    -
    @@ -51,7 +51,7 @@
    -
    -   - +   +
    > > diff --git a/app/Views/tpa_onboarding.php b/app/Views/tpa_onboarding.php index 2d6196aa..107d61f9 100755 --- a/app/Views/tpa_onboarding.php +++ b/app/Views/tpa_onboarding.php @@ -39,7 +39,7 @@ body {

    TPA

    - "> + ">