From d607afe5edb79a5716e4fe2b04fd0370578fd6c5 Mon Sep 17 00:00:00 2001 From: vadivelJ96 Date: Sun, 17 Aug 2025 21:39:57 +0530 Subject: [PATCH 001/135] 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 002/135] 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

- "> + ">
diff --git a/app/Views/policy_transaction_inception_list.php b/app/Views/policy_transaction_inception_list.php index cec7a681..c2cf5253 100644 --- a/app/Views/policy_transaction_inception_list.php +++ b/app/Views/policy_transaction_inception_list.php @@ -321,7 +321,7 @@ table.dataTable tbody td { Edit - + Delete
@@ -1668,9 +1668,14 @@ function hideDateField(input = null) } } -function removePolicyTransaction(input, pt_id) { +function removePolicyTransaction(input, pt_id, policy_type_id) { - confirmActionSweertAlert("Do you want to delete this transaction?", "Yes, Proceed!", "No, Cancel").then((confirmed) => { + let string = "Do you want to delete this transaction?"; + if(policy_type_id > 7){ + string = "Do you want to delete this transaction? Deleting this will also remove the linked CRM policy entry."; + } + + confirmActionSweertAlert(string, "Yes, Proceed!", "No, Cancel").then((confirmed) => { if (confirmed) { let url = '' + pt_id; @@ -1694,6 +1699,4 @@ function removePolicyTransaction(input, pt_id) { }); } - - \ No newline at end of file From 8a20d137a682824a180dc96e62983778a4d133d0 Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Fri, 22 Aug 2025 10:40:13 +0530 Subject: [PATCH 036/135] FIX_LIVE_ISSUE : RV --- app/Controllers/TicketController.php | 15 +++++++++------ app/Views/layout/header.php | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/app/Controllers/TicketController.php b/app/Controllers/TicketController.php index a50b55be..800f464b 100644 --- a/app/Controllers/TicketController.php +++ b/app/Controllers/TicketController.php @@ -2386,17 +2386,20 @@ class TicketController extends BaseController } // 5. Merge the Sum Insured value if the multiple sum insured exists - if(isset($data['multiple_sum_insured'])){ - if(isset($data['sumInsured2'])){ - $data['sumInsured2'] = $data['sumInsured2'] . ", " . implode(", ", $data['multiple_sum_insured']); - }else{ - $data['sum_insured'] = $data['sum_insured'] . ", " . implode(", ", $data['multiple_sum_insured']); + if (isset($data['multiple_sum_insured'])) { + + $multipleSumInsured = is_array($data['multiple_sum_insured']) ? $data['multiple_sum_insured'] : [$data['multiple_sum_insured']]; // force into array if string + + if (isset($data['sumInsured2'])) { + $data['sumInsured2'] .= ", " . implode(", ", $multipleSumInsured); + } else { + $data['sum_insured'] .= ", " . implode(", ", $multipleSumInsured); } + unset($data['multiple_sum_insured']); } // 6. Add the special condition to key value pair - if(!empty($data['special_condition_label'])){ foreach ($data['special_condition_label'] as $key => $value) { if($value != "" && $value != null) { diff --git a/app/Views/layout/header.php b/app/Views/layout/header.php index 712a44f1..dc34b27d 100755 --- a/app/Views/layout/header.php +++ b/app/Views/layout/header.php @@ -537,7 +537,7 @@ .show > .btn-ternary:dropdown-toggle:focus { box-shadow: 0 0 0 0.15rem rgba(226, 103, 40, 0.5); } - .btn-border-radius{ .border-radius: 10px !important; } + .btn-border-radius{ border-radius: 10px !important; } From 938279db0364f2ab329a9a0d58cd629cfe63f3a7 Mon Sep 17 00:00:00 2001 From: venba-Inspriron-3558 Date: Fri, 22 Aug 2025 12:04:42 +0530 Subject: [PATCH 037/135] BUG_Mentioned issues fixes --- app/Models/ThzMasterNotesModel.php | 2 +- app/Views/thz_list.php | 74 ++++++++++++++++++++---------- app/Views/thz_notes.php | 53 ++++++++++----------- 3 files changed, 78 insertions(+), 51 deletions(-) diff --git a/app/Models/ThzMasterNotesModel.php b/app/Models/ThzMasterNotesModel.php index 413781df..ac970b67 100644 --- a/app/Models/ThzMasterNotesModel.php +++ b/app/Models/ThzMasterNotesModel.php @@ -105,7 +105,7 @@ class ThzMasterNotesModel extends Model AND LOWER(thz_master_notes.notes_by) = 'user' WHERE thz_master_notes.thz_id = ". $integer_ticket_id ." $ticketTypeFilter - ORDER BY thz_master_notes.created_at ASC"; + ORDER BY thz_master_notes.created_at DESC"; $result = $this->db->query($notes_sql)->getResultArray(); diff --git a/app/Views/thz_list.php b/app/Views/thz_list.php index e711f27a..b56b45fd 100644 --- a/app/Views/thz_list.php +++ b/app/Views/thz_list.php @@ -80,6 +80,11 @@ tbody tr td:last-child { white-space: nowrap !important; } +.maincard{ + margin-top:0 !important; + padding-top: 0 !important; +} + .col-12 { max-width: 98% !important; @@ -122,8 +127,8 @@ td .text-muted {
-
-
+
+

Ticket List

@@ -155,7 +160,10 @@ td .text-muted {
- + + @@ -259,22 +267,23 @@ td .text-muted {
+
+ + +
+ +
-
- - -
- - - + +
+ +
- + - +
@@ -368,6 +378,11 @@ td .text-muted { myModal.show(); } + function resetTicket(){ + var form = document.getElementById('ticketForm'); + form.reset(); + } + function submitTicket() { var form = document.getElementById('ticketForm'); @@ -512,6 +527,19 @@ td .text-muted { var policyId = selectedOption.getAttribute("data-id"); document.getElementById('policy_id').value = policyId || ""; } + + function hideandshowpolicy() { + var select = document.getElementById('ticket_type').value; + var policyContainer = document.getElementById('policy_container'); + + if (select === 'Service') { + policyContainer.style.display = "block"; // show + } else { + policyContainer.style.display = "none"; // hide + document.getElementById('policy_no').value = ""; + document.getElementById('policy_id').value = ""; + } + } \ No newline at end of file diff --git a/app/Views/import_export.php b/app/Views/import_export.php index 7f2bc15d..65a30b3c 100755 --- a/app/Views/import_export.php +++ b/app/Views/import_export.php @@ -25,10 +25,17 @@ Insurer or TPA Data +
+
@@ -45,6 +52,11 @@ $('#kyc_tab').click(); } + if (window.location.hash === '#HR-DOC-tab') { + console.log('url hash :', window.location.hash) + $('#hr_tab').click(); + } + }) From 39d7efd7322f896bbd1da0c2b5de78b40130c413 Mon Sep 17 00:00:00 2001 From: vadivelJ96 Date: Fri, 22 Aug 2025 15:06:18 +0530 Subject: [PATCH 041/135] CHANGE_UI_FIX - VADIVEL J 2025-08-22 --- app/Helpers/header.php | 2 +- app/Views/UserList.php | 4 +- app/Views/client_branch.php | 4 +- app/Views/client_policy.php | 2 +- app/Views/client_rm.php | 2 +- app/Views/endorsement_list.php | 2 +- app/Views/hr_access_controll.php | 4 +- app/Views/insurer_branch.php | 4 +- app/Views/kyc_docs.php | 4 +- app/Views/layout/header_old.php | 2 +- app/Views/policies.php | 4 +- .../policy_transaction_endorsement_form.php | 2 +- .../policy_transaction_inception_form.php | 4 +- app/Views/rfq/gmc.php | 2 +- app/Views/ticket_form_gmc.php | 2 +- app/Views/ticket_form_gpa.php | 2 +- app/Views/ticket_list.php | 2 +- app/Views/tpa_branch.php | 4 +- test.http | 100 ++++++++++++++++++ 19 files changed, 126 insertions(+), 26 deletions(-) create mode 100644 test.http diff --git a/app/Helpers/header.php b/app/Helpers/header.php index dc193798..fb9e215c 100755 --- a/app/Helpers/header.php +++ b/app/Helpers/header.php @@ -615,7 +615,7 @@
  • - + 2 App Content Management diff --git a/app/Views/UserList.php b/app/Views/UserList.php index 5f8d59f2..088b15d0 100755 --- a/app/Views/UserList.php +++ b/app/Views/UserList.php @@ -344,7 +344,7 @@ table.dataTable tbody td {
    diff --git a/app/Views/client_branch.php b/app/Views/client_branch.php index b8f4cd05..da759709 100755 --- a/app/Views/client_branch.php +++ b/app/Views/client_branch.php @@ -49,7 +49,7 @@
    + class="mdi mdi-plus-box-outline" aria-hidden="true" style="padding: 5px 10px;">Add Branch
    @@ -72,7 +72,7 @@
    diff --git a/app/Views/client_policy.php b/app/Views/client_policy.php index 4d5503ec..972c96ef 100755 --- a/app/Views/client_policy.php +++ b/app/Views/client_policy.php @@ -51,7 +51,7 @@
    - +

    diff --git a/app/Views/client_rm.php b/app/Views/client_rm.php index c235351f..7611c2d0 100755 --- a/app/Views/client_rm.php +++ b/app/Views/client_rm.php @@ -180,7 +180,7 @@ $(document).ready(function(){ }).prop('disabled', false); $('#client_rm_btnSubmit').show(); - $(this).html(' Close Edit '); + $(this).html(' Close Edit '); } else { $('#account_manager').select2({ placeholder: "Select Account Manager" diff --git a/app/Views/endorsement_list.php b/app/Views/endorsement_list.php index 29702c71..6ee6ff14 100755 --- a/app/Views/endorsement_list.php +++ b/app/Views/endorsement_list.php @@ -138,7 +138,7 @@ } ?> - + @@ -173,7 +173,7 @@ -
    There is no HR data
    +

    There is no HR data

    diff --git a/app/Views/insurer_branch.php b/app/Views/insurer_branch.php index 9001fec1..915114f3 100755 --- a/app/Views/insurer_branch.php +++ b/app/Views/insurer_branch.php @@ -1,7 +1,7 @@
    - +
    @@ -23,7 +23,7 @@
    - +

    diff --git a/app/Views/kyc_docs.php b/app/Views/kyc_docs.php index 56a0bac9..9bb1ab5a 100755 --- a/app/Views/kyc_docs.php +++ b/app/Views/kyc_docs.php @@ -1,7 +1,7 @@
    - +
    @@ -22,7 +22,7 @@
    - +

    diff --git a/app/Views/layout/header_old.php b/app/Views/layout/header_old.php index def757d5..3b1cf061 100644 --- a/app/Views/layout/header_old.php +++ b/app/Views/layout/header_old.php @@ -875,7 +875,7 @@
  • " class="waves-effect" target="_blank" rel="noopener noreferrer"> - + User Manual
  • diff --git a/app/Views/policies.php b/app/Views/policies.php index 02f81ef5..08e8059f 100755 --- a/app/Views/policies.php +++ b/app/Views/policies.php @@ -1,7 +1,7 @@
    - +
    @@ -23,7 +23,7 @@
    - +

    diff --git a/app/Views/policy_transaction_endorsement_form.php b/app/Views/policy_transaction_endorsement_form.php index 82f39443..11711048 100644 --- a/app/Views/policy_transaction_endorsement_form.php +++ b/app/Views/policy_transaction_endorsement_form.php @@ -317,7 +317,7 @@ - +
    diff --git a/app/Views/policy_transaction_inception_form.php b/app/Views/policy_transaction_inception_form.php index f4752614..12478554 100644 --- a/app/Views/policy_transaction_inception_form.php +++ b/app/Views/policy_transaction_inception_form.php @@ -446,7 +446,7 @@ -
    @@ -532,7 +532,7 @@
    - +
    diff --git a/app/Views/rfq/gmc.php b/app/Views/rfq/gmc.php index fe9b7c2d..82cedab9 100644 --- a/app/Views/rfq/gmc.php +++ b/app/Views/rfq/gmc.php @@ -75,7 +75,7 @@