From b88a37bf4078dc89500420ce2298d410ee906cf5 Mon Sep 17 00:00:00 2001 From: venba-Inspriron-3558 Date: Tue, 11 Nov 2025 11:32:38 +0530 Subject: [PATCH 01/21] FIX_Policy Edit, Some Page name and tab are missing, --- app/Controllers/BDSReportController.php | 16 +++--- app/Controllers/ClientController.php | 2 +- app/Controllers/EmployeeController.php | 9 ++- app/Controllers/MasterController.php | 35 +++++------- .../PolicyTransactionController.php | 4 +- app/Controllers/ThzController.php | 7 ++- app/Views/add_image_list.php | 55 ++++++++++++++++--- app/Views/endorsement_list.php | 2 +- .../policy_transaction_inception_form.php | 44 +++++++++++++-- app/Views/test_members_list.php | 4 +- 10 files changed, 127 insertions(+), 51 deletions(-) diff --git a/app/Controllers/BDSReportController.php b/app/Controllers/BDSReportController.php index b9844e96..d0dd5ac9 100644 --- a/app/Controllers/BDSReportController.php +++ b/app/Controllers/BDSReportController.php @@ -181,8 +181,8 @@ class BDSReportController extends AdminController 'Client' => 'client' ]; + $data['tab_name'] = "IRDA Reports"; $data['page_name'] = "IRDA Report"; - return $this->loadLayout('irba_report', $data); } else { @@ -926,7 +926,7 @@ class BDSReportController extends AdminController $data['default_end'] = $default_start->format('d-m-Y'); $data['default_start'] = $default_start->modify('-60 days')->format('d-m-Y'); $data['issuer'] = [1 => 'JIBS', 2 => 'Nhance']; - $data['tab_name'] = "Renewal Report"; + $data['tab_name'] = "Renewal Reports"; $data['page_name'] = "Renewal Report"; return $this->loadLayout('renewal_search', $data); } else { @@ -1152,21 +1152,23 @@ class BDSReportController extends AdminController public function getMultiReport($report_type){ - $data['tab_name'] = "BDS Report"; - $data['page_name'] = "BDS Report"; + $data['tab_name'] = "BDS Reports"; if ($report_type == 1){ - $data['page_title'] = "BDS TAT Report"; + $data['page_name'] = "BDS TAT Report"; + $data['page_title'] = ""; $data['data'] = $this->bdsTATReport(true); // Functional Based called means True }else if ($report_type == 2){ - $data['page_title'] = "Account Manager Status Report"; + $data['page_name'] = "Account Manager Status Report"; + $data['page_title'] = ""; $data['data'] = $this->accountMangerStatusBDSReport(); }else{ - $data['page_title'] = "Account Manager TAT Report"; + $data['page_name'] = "Account Manager TAT Report"; + $data['page_title'] = ""; $data['data'] = $this->accountManagerTatBDSReport(); } diff --git a/app/Controllers/ClientController.php b/app/Controllers/ClientController.php index 55bc121f..cd2e4d7c 100755 --- a/app/Controllers/ClientController.php +++ b/app/Controllers/ClientController.php @@ -478,7 +478,7 @@ class ClientController extends AdminController public function index() { $this->myLogger->logme('error', 'Client list function called'); - $headerData['tab_name'] = 'Client List'; + $headerData['tab_name'] = 'Clients'; $headerData['page_name'] = 'Clients'; // Both Browser Tab name And Page name are same. $data['clientList'] = $this->clientModel->getCreatedByUserName(1); // passing client_type $data['client_rm'] = $this->clientRMModel->getAllClientRM(); diff --git a/app/Controllers/EmployeeController.php b/app/Controllers/EmployeeController.php index 57a05395..0da7f5a7 100755 --- a/app/Controllers/EmployeeController.php +++ b/app/Controllers/EmployeeController.php @@ -136,7 +136,7 @@ class EmployeeController extends AdminController // dd($this->request->getGet()); $this->myLogger->logme('error', 'list called'); - + $data['tab_name'] = 'Members'; $data['page_name'] = "Members"; $this->loadLayout('employee_list', $data); @@ -795,7 +795,8 @@ class EmployeeController extends AdminController $this->myLogger->logme('error', 'list called'); - $data['page_name'] = "Endorsement"; + $data['tab_name'] = "Endorsements"; + $data['page_name'] = "Endorsements"; $this->loadLayout('endorsement_list', $data); } @@ -2810,6 +2811,9 @@ class EmployeeController extends AdminController $data['employees'] = $employee_data; $data['clients'] = $this->clientModel->findAll(); // dd($data); + $data['tab_name'] = "Employees"; + $data['page_name'] = "Employees"; + return $this->loadLayout('test_members_list',$data); } @@ -3107,6 +3111,7 @@ class EmployeeController extends AdminController // print_r($data); die; // } + $data['tab_name'] = "Retail Endorsement"; $data['page_name'] = "Retail Endorsement"; $this->loadLayout('retail_endorsement_list', $data); diff --git a/app/Controllers/MasterController.php b/app/Controllers/MasterController.php index 6191007c..76bd1a5a 100755 --- a/app/Controllers/MasterController.php +++ b/app/Controllers/MasterController.php @@ -110,7 +110,7 @@ class MasterController extends AdminController public function insurerList() { $this->myLogger->logme('error','Insurer list function called'); - $headerData['tab_name'] = 'Insurer List'; + $headerData['tab_name'] = 'Insurer Masters'; $headerData['page_name'] = 'Insurers'; $data['insurerList'] = $this->insurerModel->where('is_active',1)->findAll(); $data['insurer_rm'] = $this->insurerRMModel->getAllClientRM(); @@ -250,7 +250,7 @@ class MasterController extends AdminController { $this->myLogger->logme('error','Insurer Onboarding function called'); - $headerData['tab_name'] = 'Insurer Master'; + $headerData['tab_name'] = 'Insurer Masters'; $headerData['page_name'] = 'Insurers'; $types = array( @@ -519,7 +519,7 @@ class MasterController extends AdminController public function tpaList() { $this->myLogger->logme('error','TPA list function called'); - $headerData['tab_name'] = 'TPA List'; + $headerData['tab_name'] = 'TPA Masters'; $headerData['page_name'] = 'TPA'; $data['tpaList'] = $this->tpaModel->where('is_active',1)->findAll(); // $data['insurer_rm'] = $this->insurerRMModel->getAllClientRM(); @@ -566,7 +566,7 @@ class MasterController extends AdminController { $this->myLogger->logme('error','TPA Onboarding function called'); - $headerData['tab_name'] = 'TPA Master'; + $headerData['tab_name'] = 'TPA Masters'; $headerData['page_name'] = 'TPA'; @@ -851,7 +851,7 @@ class MasterController extends AdminController public function kycList() { $this->myLogger->logme('error','KYC list function called'); - $headerData['tab_name'] = 'KYC List'; + $headerData['tab_name'] = 'KYC Masters'; $headerData['page_name'] = 'KYC'; $data['kycList'] = $this->kycEntityTypeModel->where('is_active',1)->findAll(); // $data['insurer_rm'] = $this->insurerRMModel->getAllClientRM(); @@ -898,7 +898,7 @@ class MasterController extends AdminController { $this->myLogger->logme('error','KYC Onboarding function called'); - $headerData['tab_name'] = 'KYC Master'; + $headerData['tab_name'] = 'KYC Masters'; $headerData['page_name'] = 'KYC'; @@ -1043,7 +1043,7 @@ class MasterController extends AdminController public function policyTypeList() { $this->myLogger->logme('error','Policy Type list function called'); - $headerData['tab_name'] = 'Policy Type List'; + $headerData['tab_name'] = 'Policy Type Masters'; $headerData['page_name'] = 'Policy Type'; $data['policyList'] = $this->policyTypeModel->where('is_active',1)->findAll(); // $data['insurer_rm'] = $this->insurerRMModel->getAllClientRM(); @@ -1090,7 +1090,7 @@ class MasterController extends AdminController { $this->myLogger->logme('error','Policy Type Onboarding function called'); - $headerData['tab_name'] = 'Policy Type Master'; + $headerData['tab_name'] = 'Policy Type Masters'; $headerData['page_name'] = 'Policy Type'; @@ -1246,7 +1246,7 @@ class MasterController extends AdminController //start CD Master list public function CDMasterList() { - $data['tab_name'] = 'CD Master List'; + $data['tab_name'] = 'CD Masters'; $data['page_name'] = 'CD Master'; $data['CD_Master_Data'] = $this->CDMasterModel->getCDMasterList(); $data['insurers'] = $this->insurerModel->where('is_active', 1)->findAll(); @@ -1668,7 +1668,7 @@ class MasterController extends AdminController public function VehicleMasterList() { - $data['tab_name'] = 'Vehicle Master'; + $data['tab_name'] = 'Vehicle Masters'; $data['page_name'] = 'Vehicles'; $data['vehicle_type'] = [ 'two_wheeler' => 'Two Wheeler', @@ -2076,9 +2076,7 @@ class MasterController extends AdminController { $nhanceBranchModel = new NhanceBranchModel(); $method = $this->request->getMethod(); - $data['tab_name'] = 'Nhance Branch'; - $data['page_name'] = 'Nhance Branchs'; - + if ($method === 'post') { $id = $this->request->getPost('pk') ?? null; @@ -2120,7 +2118,7 @@ class MasterController extends AdminController } $data = $nhanceBranchModel->where('is_active', 1)->orderBy('id', 'DESC')->findAll(); - return $this->loadLayout('nhance_branch_list', ['data' => $data]); + return $this->loadLayout('nhance_branch_list', ['data' => $data,'tab_name' => 'Nhance Branchs','page_name' => 'Nhance Branchs']); } elseif ($method === 'delete') { @@ -2160,8 +2158,7 @@ class MasterController extends AdminController { $vehicleTypeModel = new VehicleTypeModel(); $method = $this->request->getMethod(); - $data['tab_name'] = 'Vehicle Type'; - $data['page_name'] = 'Vehicle Types'; + if ($method === 'post') { $id = $this->request->getPost('pk') ?? null; @@ -2203,7 +2200,7 @@ class MasterController extends AdminController } $data = $vehicleTypeModel->where('is_active', 1)->orderBy('id', 'DESC')->findAll(); - return $this->loadLayout('vehicle_type_master_list', ['data' => $data]); + return $this->loadLayout('vehicle_type_master_list', ['data' => $data,'tab_name' => 'Vehicle Types','page_name' => 'Vehicle Types']); } elseif ($method === 'delete') { @@ -2242,8 +2239,6 @@ class MasterController extends AdminController { $rtoModel = new RTOModel(); $method = $this->request->getMethod(); - $data['tab_name'] = 'RTO'; - $data['page_name'] = 'RTO'; if ($method === 'post') { @@ -2286,7 +2281,7 @@ class MasterController extends AdminController } $data = $rtoModel->where('is_active', 1)->orderBy('id', 'DESC')->findAll(); - return $this->loadLayout('rto_master_list', ['data' => $data]); + return $this->loadLayout('rto_master_list', ['data' => $data,'tab_name' => 'RTO Masters','page_name' => 'RTO']); } elseif ($method === 'delete') { diff --git a/app/Controllers/PolicyTransactionController.php b/app/Controllers/PolicyTransactionController.php index 6e721f81..7c15c8ac 100644 --- a/app/Controllers/PolicyTransactionController.php +++ b/app/Controllers/PolicyTransactionController.php @@ -115,8 +115,8 @@ public function viewInception() { $bds_edit_pt_id = $this->request->getGet('pt_id') ?? null; - $data['tab_name'] = 'Policy'; - $data['page_name'] = 'Policy'; + $data['tab_name'] = 'Policies'; + $data['page_name'] = 'Policies'; // Static arrays for dropdowns $data['issuer'] = [1 => 'JIBS', 2 => 'Nhance']; diff --git a/app/Controllers/ThzController.php b/app/Controllers/ThzController.php index b0c893da..29f89df4 100644 --- a/app/Controllers/ThzController.php +++ b/app/Controllers/ThzController.php @@ -102,8 +102,6 @@ class ThzController extends BaseController public function ticketList() { - $data['tab_name'] = "Tickets"; - $data['page_name'] = "Tickets"; try { $returnType = strtolower($this->request->getGet('return_type') ?? 'api'); @@ -130,7 +128,8 @@ class ThzController extends BaseController // 3,4 remain person varannum. $data['client_list'] = $this->clientModel->getCreatedByUserName(); $data['ticket_type'] = $this->thzTypeModel->where('is_active', 1)->findAll(); - + $data['tab_name'] = "Tickets"; + $data['page_name'] = "Tickets"; return $this->loadLayout('thz_list', $data); } @@ -267,6 +266,8 @@ class ThzController extends BaseController $result['policy_terms'] = $toGetPolicyId ? $this->getPolicyTerms($toGetPolicyId) : ''; $result['ticket_type'] = $this->thzTypeModel->where('is_active', 1)->findAll(); + $result['tab_name'] = "Tickets"; + $result['page_name'] = "Ticket Details"; return $this->loadLayout('thz_notes', $result); } diff --git a/app/Views/add_image_list.php b/app/Views/add_image_list.php index 3ab9080e..5d8d65ad 100755 --- a/app/Views/add_image_list.php +++ b/app/Views/add_image_list.php @@ -22,16 +22,18 @@ table.dataTable thead th {
-
+ + +
+ @@ -62,6 +64,7 @@ table.dataTable thead th {
Advertisement Image Name
+
@@ -110,6 +113,40 @@ table.dataTable thead th { diff --git a/app/Views/leads_list.php b/app/Views/leads_list.php index 1762f32c..8075471d 100644 --- a/app/Views/leads_list.php +++ b/app/Views/leads_list.php @@ -487,12 +487,16 @@ table.dataTable tbody td { } ], language: { - search: ` -
- _INPUT_ - -
`, - searchPlaceholder: "Search" + search: ` +
+ _INPUT_ + + +
`, + searchPlaceholder: "Search", + emptyTable: '
No Data found
' }, paging: true, // Enable pagination pageLength: 10, // Set default number of rows per page (optional) diff --git a/app/Views/nhance_branch_list.php b/app/Views/nhance_branch_list.php index 8d0c1add..32c7c09c 100644 --- a/app/Views/nhance_branch_list.php +++ b/app/Views/nhance_branch_list.php @@ -124,11 +124,15 @@ ], language: { search: ` -
+
_INPUT_ - + +
`, - searchPlaceholder: "Search" + searchPlaceholder: "Search", + emptyTable: '
No Data found
' }, paging: true, // Enable pagination pageLength: 10, // Set default number of rows per page (optional) diff --git a/app/Views/outstanding_report_list.php b/app/Views/outstanding_report_list.php index 496c9afa..bd45e251 100644 --- a/app/Views/outstanding_report_list.php +++ b/app/Views/outstanding_report_list.php @@ -226,12 +226,16 @@ ] }], language: { - search: ` -
- _INPUT_ - -
`, - searchPlaceholder: "Search" + search: ` +
+ _INPUT_ + + +
`, + searchPlaceholder: "Search", + emptyTable: '
No Data found
' }, paging: true, // Enable pagination pageLength: 25 // Set default number of rows per page (optional) diff --git a/app/Views/policy_transaction_endorsement_list.php b/app/Views/policy_transaction_endorsement_list.php index d91ef483..6f5485cb 100644 --- a/app/Views/policy_transaction_endorsement_list.php +++ b/app/Views/policy_transaction_endorsement_list.php @@ -519,12 +519,16 @@ table.dataTable thead th { } ], language: { - search: ` -
- _INPUT_ - -
`, - searchPlaceholder: "Search" + search: ` +
+ _INPUT_ + + +
`, + searchPlaceholder: "Search", + emptyTable: '
No Data found
' }, paging: true, // Enable pagination pageLength: 10, // Set default number of rows per page (optional) diff --git a/app/Views/policy_transaction_inception_list.php b/app/Views/policy_transaction_inception_list.php index ede897ce..37640c11 100644 --- a/app/Views/policy_transaction_inception_list.php +++ b/app/Views/policy_transaction_inception_list.php @@ -591,12 +591,16 @@ $(document).ready(function() { } ], language: { - search: ` -
- _INPUT_ - -
`, - searchPlaceholder: "Search" + search: ` +
+ _INPUT_ + + +
`, + searchPlaceholder: "Search", + emptyTable: '
No Data found
' }, paging: true, // Enable pagination pageLength: 10, // Set default number of rows per page (optional) diff --git a/app/Views/policy_type_list.php b/app/Views/policy_type_list.php index 990f06a5..2f6d6002 100755 --- a/app/Views/policy_type_list.php +++ b/app/Views/policy_type_list.php @@ -250,12 +250,16 @@ ], language: { - search: ` -
- _INPUT_ - -
`, - searchPlaceholder: "Search" + search: ` +
+ _INPUT_ + + +
`, + searchPlaceholder: "Search", + emptyTable: '
No Data found
' }, paging: true , diff --git a/app/Views/report_bds.php b/app/Views/report_bds.php index 364a3fdd..2261d79c 100644 --- a/app/Views/report_bds.php +++ b/app/Views/report_bds.php @@ -456,12 +456,16 @@ $(document).ready(function() { } ], language: { - search: ` -
- _INPUT_ - -
`, - searchPlaceholder: "Search" + search: ` +
+ _INPUT_ + + +
`, + searchPlaceholder: "Search", + emptyTable: '
No Data found
' }, paging: true, // Enable pagination pageLength: 10, // Set default number of rows per page (optional) diff --git a/app/Views/report_bds_new.php b/app/Views/report_bds_new.php index ae9db7cf..ed9b8fe3 100644 --- a/app/Views/report_bds_new.php +++ b/app/Views/report_bds_new.php @@ -500,12 +500,16 @@ } ], language: { - search: ` -
- _INPUT_ - -
`, - searchPlaceholder: "Search" + search: ` +
+ _INPUT_ + + +
`, + searchPlaceholder: "Search", + emptyTable: '
No Data found
' }, paging: true, // Enable pagination pageLength: 10, // Set default number of rows per page (optional) diff --git a/app/Views/report_bds_old.php b/app/Views/report_bds_old.php index 261dade0..536769b6 100644 --- a/app/Views/report_bds_old.php +++ b/app/Views/report_bds_old.php @@ -189,8 +189,16 @@ $(document).ready(function() { ], language: { - search: "_INPUT_", - searchPlaceholder: "Search..." + search: ` +
+ _INPUT_ + + +
`, + searchPlaceholder: "Search", + emptyTable: '
No Data found
' }, paging: true, // Enable pagination pageLength: 10, // Set default number of rows per page (optional) diff --git a/app/Views/retail_endorsement_list.php b/app/Views/retail_endorsement_list.php index 44bbacbe..e605f723 100755 --- a/app/Views/retail_endorsement_list.php +++ b/app/Views/retail_endorsement_list.php @@ -391,12 +391,16 @@ }); }, language: { - search: ` -
- _INPUT_ - -
`, - searchPlaceholder: "Search" + search: ` +
+ _INPUT_ + + +
`, + searchPlaceholder: "Search", + emptyTable: '
No Data found
' }, paging: true, // pagingType: 'full_numbers' diff --git a/app/Views/rto_master_list.php b/app/Views/rto_master_list.php index caafe3b3..d9ecfad6 100644 --- a/app/Views/rto_master_list.php +++ b/app/Views/rto_master_list.php @@ -147,11 +147,15 @@ ], language: { search: ` -
+
_INPUT_ - + +
`, - searchPlaceholder: "Search" + searchPlaceholder: "Search", + emptyTable: '
No Data found
' }, paging: true, // Enable pagination pageLength: 10, // Set default number of rows per page (optional) diff --git a/app/Views/tat_report_band_wise_list.php b/app/Views/tat_report_band_wise_list.php index 39f0c068..e4ee2f19 100644 --- a/app/Views/tat_report_band_wise_list.php +++ b/app/Views/tat_report_band_wise_list.php @@ -134,12 +134,16 @@ } ], language: { - search: ` -
- _INPUT_ - -
`, - searchPlaceholder: "Search" + search: ` +
+ _INPUT_ + + +
`, + searchPlaceholder: "Search", + emptyTable: '
No Data found
' }, paging: true, // Enable pagination pageLength: 10, // Set default number of rows per page (optional) diff --git a/app/Views/test_members_list.php b/app/Views/test_members_list.php index bc7e255b..946fe6ab 100644 --- a/app/Views/test_members_list.php +++ b/app/Views/test_members_list.php @@ -557,12 +557,16 @@ document.addEventListener("DOMContentLoaded", function () { className:"unmapEmployees" }], language: { - search: ` -
- _INPUT_ - -
`, - searchPlaceholder: "Search" + search: ` +
+ _INPUT_ + + +
`, + searchPlaceholder: "Search", + emptyTable: '
No Data found
' }, paging: true, // Enable pagination pageLength: 25 // Set default number of rows per page (optional) diff --git a/app/Views/thz_list.php b/app/Views/thz_list.php index e4bc218a..63c64862 100644 --- a/app/Views/thz_list.php +++ b/app/Views/thz_list.php @@ -356,12 +356,16 @@ table.dataTable tbody td { } ], language: { - search: ` -
- _INPUT_ - -
`, - searchPlaceholder: "Search" + search: ` +
+ _INPUT_ + + +
`, + searchPlaceholder: "Search", + emptyTable: '
No Data found
' }, paging: true, pageLength: 10, diff --git a/app/Views/ticket_feedback_list.php b/app/Views/ticket_feedback_list.php index c8d2f304..3902ca42 100644 --- a/app/Views/ticket_feedback_list.php +++ b/app/Views/ticket_feedback_list.php @@ -138,13 +138,17 @@ $(document).ready(function() { } ], language: { - search: ` -
- _INPUT_ - -
`, - searchPlaceholder: "Search" - }, + search: ` +
+ _INPUT_ + + +
`, + searchPlaceholder: "Search", + emptyTable: '
No Data found
' + }, paging: true, // Enable pagination pageLength: 10, // Set default number of rows per page (optional) ordering: false, diff --git a/app/Views/ticket_history.php b/app/Views/ticket_history.php index 505fe971..54711dd2 100644 --- a/app/Views/ticket_history.php +++ b/app/Views/ticket_history.php @@ -60,13 +60,17 @@ if (ticketsTable.length) { // ], language: { - search: ` -
- _INPUT_ - -
`, - searchPlaceholder: "Search" - }, + search: ` +
+ _INPUT_ + + +
`, + searchPlaceholder: "Search", + emptyTable: '
No Data found
' + }, paging: true, // Enable pagination pageLength: 10, // Set default number of rows per page (optional) ordering: false, diff --git a/app/Views/ticket_list.php b/app/Views/ticket_list.php index 2b542f78..bc5c065b 100644 --- a/app/Views/ticket_list.php +++ b/app/Views/ticket_list.php @@ -325,12 +325,16 @@ $(document).ready(function() { } ], language: { - search: ` -
- _INPUT_ - -
`, - searchPlaceholder: "Search" + search: ` +
+ _INPUT_ + + +
`, + searchPlaceholder: "Search", + emptyTable: '
No Data found
' }, paging: true, // Enable pagination pageLength: 10, // Set default number of rows per page (optional) diff --git a/app/Views/ticket_mail_template.php b/app/Views/ticket_mail_template.php index d816f2a3..a2cc86d5 100644 --- a/app/Views/ticket_mail_template.php +++ b/app/Views/ticket_mail_template.php @@ -265,12 +265,16 @@ } }], language: { - search: ` -
- _INPUT_ - -
`, - searchPlaceholder: "Search" + search: ` +
+ _INPUT_ + + +
`, + searchPlaceholder: "Search", + emptyTable: '
No Data found
' }, paging: true, // Enable pagination pageLength: 10, // Set default number of rows per page (optional) diff --git a/app/Views/tpa_list.php b/app/Views/tpa_list.php index 19737cdc..412b9910 100755 --- a/app/Views/tpa_list.php +++ b/app/Views/tpa_list.php @@ -208,13 +208,17 @@ } ], language: { - search: ` -
+ search: ` +
_INPUT_ - + +
`, - searchPlaceholder: "Search" - }, + searchPlaceholder: "Search", + emptyTable: '
No Data found
' + }, paging: true, }); diff --git a/app/Views/variance_report_list.php b/app/Views/variance_report_list.php index 279fd493..800334a1 100644 --- a/app/Views/variance_report_list.php +++ b/app/Views/variance_report_list.php @@ -268,13 +268,17 @@ } ] }], - language: { - search: ` -
- _INPUT_ - -
`, - searchPlaceholder: "Search" + language: { + search: ` +
+ _INPUT_ + + +
`, + searchPlaceholder: "Search", + emptyTable: '
No Data found
' }, paging: true, // Enable pagination pageLength: 25 // Set default number of rows per page (optional) diff --git a/app/Views/vehicle_master_list.php b/app/Views/vehicle_master_list.php index 84059a5d..2e54f852 100644 --- a/app/Views/vehicle_master_list.php +++ b/app/Views/vehicle_master_list.php @@ -510,13 +510,17 @@ $(document).ready(function() { } ], language: { - search: ` -
- _INPUT_ - -
`, - searchPlaceholder: "Search" - }, + search: ` +
+ _INPUT_ + + +
`, + searchPlaceholder: "Search", + emptyTable: '
No Data found
' + }, paging: true, pageLength: 10, order: [[0, 'desc']] diff --git a/app/Views/vehicle_type_list.php b/app/Views/vehicle_type_list.php index 6692bf58..ce0181d5 100644 --- a/app/Views/vehicle_type_list.php +++ b/app/Views/vehicle_type_list.php @@ -856,13 +856,17 @@ paging: true, pageLength: 10, language: { - search: ` -
+ search: ` +
_INPUT_ - + +
`, - searchPlaceholder: "Search" - }, + searchPlaceholder: "Search", + emptyTable: '
No Data found
' + }, initComplete: function () { $(".dt-buttons").prepend(`
diff --git a/app/Views/vehicle_type_master_list.php b/app/Views/vehicle_type_master_list.php index 7dd4e3a1..fd6d0801 100755 --- a/app/Views/vehicle_type_master_list.php +++ b/app/Views/vehicle_type_master_list.php @@ -124,12 +124,16 @@ ], language: { search: ` -
+
_INPUT_ - + +
`, - searchPlaceholder: "Search" - }, + searchPlaceholder: "Search", + emptyTable: '
No Data found
' + }, paging: true, // Enable pagination pageLength: 10, // Set default number of rows per page (optional) // ordering: false, diff --git a/app/Views/view_deposit.php b/app/Views/view_deposit.php index 606da89e..d382d21c 100755 --- a/app/Views/view_deposit.php +++ b/app/Views/view_deposit.php @@ -347,12 +347,16 @@ } ], language: { - search: ` -
- _INPUT_ - -
`, - searchPlaceholder: "Search" + search: ` +
+ _INPUT_ + + +
`, + searchPlaceholder: "Search", + emptyTable: '
No Data found
' }, ordering: false, paging: true From 1ccfaa782de42acb5d55278c39b3138950709ec0 Mon Sep 17 00:00:00 2001 From: venba-Inspriron-3558 Date: Wed, 12 Nov 2025 12:25:36 +0530 Subject: [PATCH 15/21] FIX_"Negative" symbol remove --- app/Views/policy_transaction_endorsement_form.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Views/policy_transaction_endorsement_form.php b/app/Views/policy_transaction_endorsement_form.php index 2c1bfae3..74b862a3 100644 --- a/app/Views/policy_transaction_endorsement_form.php +++ b/app/Views/policy_transaction_endorsement_form.php @@ -1432,7 +1432,9 @@ let bap = selectedOption.data('bap') || ''; let allocg = selectedOption.data('allocg') || ''; let endorsement_type = $('#action_type').val(); - let isDeletion = endorsement_type === "deletion"; + // let isDeletion = endorsement_type === "deletion"; // OLD + let isDeletion = false; // REF : VR,SVR and SVM remove "-" . + console.log("bap:", bap, "allocg:", allocg, "isDeletion:", isDeletion); From bdb678e59a92ed9f28575412ee5fbf0afbc57b5c Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Wed, 12 Nov 2025 12:26:54 +0530 Subject: [PATCH 16/21] FIX_HR_RELATED_ISSUES --- app/Controllers/ClientController.php | 530 ++++++++++++++++++++------- app/Views/hr_access_controll.php | 43 ++- 2 files changed, 417 insertions(+), 156 deletions(-) diff --git a/app/Controllers/ClientController.php b/app/Controllers/ClientController.php index fb69bbcd..0bed75f5 100755 --- a/app/Controllers/ClientController.php +++ b/app/Controllers/ClientController.php @@ -5661,7 +5661,7 @@ class ClientController extends AdminController // $employeeController = new EmployeeController(); // $employeeController->truncateFileData('633'); - // $res = $this->getHrAccessData(4005); dd($res); + // $res = $this->getHrAccessData(4075); dd($res); // ---------- TICKET SERVICE CONTROLLER -------------------------------------------------------------------------------- @@ -7025,177 +7025,434 @@ class ClientController extends AdminController return $combinedHrAccessData; } + // do not remove this commented items + // public function constructHrAccessData($data, $client_id , $pre_client_id) + // { + // // print_rr($data);die; + + // $preHrs = $data['pre_hr_data']; + // $postHrs = $data['post_hr_data']; + // $hrAccessTableData = $data['hr_access_table_data']; + // $merged = []; + + // // Merge based on mobile and email + // foreach ($postHrs as $post) { + // $found = false; + // foreach ($preHrs as $index => $pre) { + + // if ( trim($post['hr_mobile']) == trim($pre['hr_mobile']) && trim($post['hr_mail']) == trim($pre['hr_mail']) ) { + + // $merged[] = [ + // 'pre_hr_id' => $pre['pre_hr_id'], + // 'post_hr_id' => $post['post_hr_id'], + // 'hr_name' => $post['hr_name'], + // 'hr_mobile' => $post['hr_mobile'], + // 'hr_mail' => $post['hr_mail'], + // 'pre_branch_id' => $pre['pre_branch_id'] ?? null, + // 'post_branch_id' => $post['post_branch_id'] ?? null, + // 'post_branch_name' => $post['post_branch_name'] ?? null + // ]; + // unset($preHrs[$index]); // remove matched pre_hr + // $found = true; + // break; + // } + // } + + // if (!$found) { + // $merged[] = [ + // 'pre_hr_id' => null, + // 'post_hr_id' => $post['post_hr_id'], + // 'hr_name' => $post['hr_name'], + // 'hr_mobile' => $post['hr_mobile'], + // 'hr_mail' => $post['hr_mail'], + // 'pre_branch_id' => $pre['pre_branch_id'] ?? null, + // 'post_branch_id' => $post['post_branch_id'] ?? null , + // 'post_branch_name' => $post['post_branch_name'] ?? null + // ]; + // } + // } + + // // Remaining preHrs (not matched) + // foreach ($preHrs as $pre) { + + // foreach ($merged as $value) { + // if ( trim($pre['hr_mobile']) == trim($value['hr_mobile']) && trim($pre['hr_mail']) == trim($value['hr_mail']) ) { + // continue 2; // Skip adding this pre_hr as it's already matched + // } + // } + + // $merged[] = [ + // 'pre_hr_id' => $pre['pre_hr_id'], + // 'post_hr_id' => null, + // 'hr_name' => $pre['hr_name'], + // 'hr_mobile' => $pre['hr_mobile'], + // 'hr_mail' => $pre['hr_mail'], + // 'pre_branch_id' => $pre['pre_branch_id'] ?? null, + // 'post_branch_id' => $post['post_branch_id'] ?? null , + // 'post_branch_name' => $post['post_branch_name'] ?? null + // ]; + // } + + // // dd($merged); + + // $result = []; + + // if (empty($hrAccessTableData)) { + + // // No access data — fill result with hr data and other fields as null + // foreach ($merged as $hr) { + // $result[] = [ + // 'hr_access_table_pk' => null, + // 'post_client_id' => $client_id ?? null, + // 'pre_hr_id' => $hr['pre_hr_id'] ?? null, + // 'post_hr_id' => $hr['post_hr_id'] ?? null, + // 'allowed_pre_modules' => [], + // 'allowed_post_modules' => [], + // 'allowed_pre_policies' => [], + // 'allowed_active_policies' => [], + // 'allowed_cd' => [], + // 'hr_name' => $hr['hr_name'] ?? null, + // 'hr_mobile' => $hr['hr_mobile'] ?? null, + // 'hr_mail' => $hr['hr_mail'] ?? null, + // 'pre_branch_id' => $hr['pre_branch_id'] ?? null, + // 'post_branch_id' => $hr['post_branch_id'] ?? null , + // 'post_branch_name' => $hr['post_branch_name'] ?? null , + // 'pre_client_id' => $pre_client_id ?? null + // ]; + // } + // } else { + // // First create a map of HR data by post_hr_id for quick lookup + // $hrMap = []; + // foreach ($merged as $hr) { + // $hrMap[$hr['post_hr_id']] = $hr; + // } + + // // Process access data first + // foreach ($hrAccessTableData as $access) { + // $post_hr_id = $access['post_hr_id']; + + // // Check if this HR exists in our merged data + // if (isset($hrMap[$post_hr_id])) { + // $hr = $hrMap[$post_hr_id]; + // $temp_arr_key = $hr['hr_mobile'] . $hr['hr_mail']; + + // // Parse allowed modules + // $allowed_modules = json_decode($access['allowed_modules'], true) ?? null; + // $allowed_pre_modules = $allowed_modules['pre'] ?? []; + // $allowed_post_modules = $allowed_modules['post'] ?? []; + + // $result[$temp_arr_key] = [ + // 'hr_access_table_pk' => $access['id'] ?? null, + // 'post_client_id' => $access['post_client_id'] ?? null, + // 'pre_hr_id' => $hr['pre_hr_id'] ?? null, + // 'post_hr_id' => $hr['post_hr_id'] ?? null, + // 'allowed_pre_modules' => $allowed_pre_modules, + // 'allowed_post_modules' => $allowed_post_modules, + // 'allowed_pre_policies' => json_decode($access['allowed_pre_policies'], true) ?? [], + // 'allowed_active_policies' => json_decode($access['allowed_active_policies'], true) ?? [], + // 'allowed_cd' => json_decode($access['allowed_cd'], true) ?? [], + // 'hr_name' => $hr['hr_name'], + // 'hr_mobile' => $hr['hr_mobile'], + // 'hr_mail' => $hr['hr_mail'], + // 'pre_branch_id' => $hr['pre_branch_id'] ?? null, + // 'post_branch_id' => $hr['post_branch_id'] ?? null , + // 'post_branch_name' => $hr['post_branch_name'] ?? null , + // 'pre_client_id' => $pre_client_id ?? null + // ]; + + // // Remove from map so we know it's been processed + // unset($hrMap[$post_hr_id]); + // } + // } + + // // Now process any remaining HRs that didn't have access records + // foreach ($hrMap as $hr) { + // $temp_arr_key = $hr['hr_mobile'] . $hr['hr_mail']; + + // $result[$temp_arr_key] = [ + // 'hr_access_table_pk' => null, + // 'post_client_id' => $client_id ?? null, + // 'pre_hr_id' => $hr['pre_hr_id'] ?? null, + // 'post_hr_id' => $hr['post_hr_id'] ?? null, + // 'allowed_pre_modules' => [], + // 'allowed_post_modules' => [], + // 'allowed_pre_policies' => [], + // 'allowed_active_policies' => [], + // 'allowed_cd' => [], + // 'hr_name' => $hr['hr_name'] ?? null, + // 'hr_mobile' => $hr['hr_mobile'] ?? null, + // 'hr_mail' => $hr['hr_mail'] ?? null, + // 'pre_branch_id' => $hr['pre_branch_id'] ?? null, + // 'post_branch_id' => $hr['post_branch_id'] ?? null , + // 'post_branch_name' => $hr['post_branch_name'] ?? null , + // 'pre_client_id' => $pre_client_id ?? null + // ]; + // } + // } + + + // $resultData['hr_access_data'] = array_values($result); + // $resultData['pre_policy_data'] = $data['pre_policy_data']; + // $resultData['post_policy_data'] = $data['post_policy_data']; + // $resultData['post_cd_data'] = $data['post_cd_data']; + + // return $resultData; + // } + public function constructHrAccessData($data, $client_id , $pre_client_id) - { - // print_rr($data);die; + { + try{ - $preHrs = $data['pre_hr_data']; - $postHrs = $data['post_hr_data']; - $hrAccessTableData = $data['hr_access_table_data']; - $merged = []; + $preHrs = $data['pre_hr_data']; + $postHrs = $data['post_hr_data']; + $hrAccessTableData = $data['hr_access_table_data']; + $merged = []; - // Merge based on mobile and email - foreach ($postHrs as $post) { - $found = false; - foreach ($preHrs as $index => $pre) { + // Merge based on mobile and email + foreach ($postHrs as $post) { + $found = false; + foreach ($preHrs as $index => $pre) { - if ( trim($post['hr_mobile']) == trim($pre['hr_mobile']) && trim($post['hr_mail']) == trim($pre['hr_mail']) ) { + if ( trim($post['hr_mobile']) == trim($pre['hr_mobile']) && trim($post['hr_mail']) == trim($pre['hr_mail']) ) { + $merged[] = [ + 'pre_hr_id' => $pre['pre_hr_id'], + 'post_hr_id' => $post['post_hr_id'], + 'hr_name' => $post['hr_name'], + 'hr_mobile' => $post['hr_mobile'], + 'hr_mail' => $post['hr_mail'], + 'pre_branch_id' => $pre['pre_branch_id'] ?? null, + 'post_branch_id' => $post['post_branch_id'] ?? null, + 'post_branch_name' => $post['post_branch_name'] ?? null + ]; + unset($preHrs[$index]); // remove matched pre_hr + $found = true; + break; + } + } + + if (!$found) { $merged[] = [ - 'pre_hr_id' => $pre['pre_hr_id'], + 'pre_hr_id' => null, 'post_hr_id' => $post['post_hr_id'], 'hr_name' => $post['hr_name'], 'hr_mobile' => $post['hr_mobile'], 'hr_mail' => $post['hr_mail'], 'pre_branch_id' => $pre['pre_branch_id'] ?? null, - 'post_branch_id' => $post['post_branch_id'] ?? null, - 'post_branch_name' => $post['post_branch_name'] ?? null + 'post_branch_id' => $post['post_branch_id'] ?? null , + 'post_branch_name' => $post['post_branch_name'] ?? null ]; - unset($preHrs[$index]); // remove matched pre_hr - $found = true; - break; } } - if (!$found) { + // Remaining preHrs (not matched) + foreach ($preHrs as $pre) { + + foreach ($merged as $value) { + if ( trim($pre['hr_mobile']) == trim($value['hr_mobile']) && trim($pre['hr_mail']) == trim($value['hr_mail']) ) { + continue 2; // Skip adding this pre_hr as it's already matched + } + } + $merged[] = [ - 'pre_hr_id' => null, - 'post_hr_id' => $post['post_hr_id'], - 'hr_name' => $post['hr_name'], - 'hr_mobile' => $post['hr_mobile'], - 'hr_mail' => $post['hr_mail'], + 'pre_hr_id' => $pre['pre_hr_id'], + 'post_hr_id' => null, + 'hr_name' => $pre['hr_name'], + 'hr_mobile' => $pre['hr_mobile'], + 'hr_mail' => $pre['hr_mail'], 'pre_branch_id' => $pre['pre_branch_id'] ?? null, 'post_branch_id' => $post['post_branch_id'] ?? null , 'post_branch_name' => $post['post_branch_name'] ?? null ]; } - } - // Remaining preHrs (not matched) - foreach ($preHrs as $pre) { + $result = []; - foreach ($merged as $value) { - if ( trim($pre['hr_mobile']) == trim($value['hr_mobile']) && trim($pre['hr_mail']) == trim($value['hr_mail']) ) { - continue 2; // Skip adding this pre_hr as it's already matched - } - } - - $merged[] = [ - 'pre_hr_id' => $pre['pre_hr_id'], - 'post_hr_id' => null, - 'hr_name' => $pre['hr_name'], - 'hr_mobile' => $pre['hr_mobile'], - 'hr_mail' => $pre['hr_mail'], - 'pre_branch_id' => $pre['pre_branch_id'] ?? null, - 'post_branch_id' => $post['post_branch_id'] ?? null , - 'post_branch_name' => $post['post_branch_name'] ?? null - ]; - } + if (empty($hrAccessTableData)) { - // dd($merged); - - $result = []; - - if (empty($hrAccessTableData)) { - - // No access data — fill result with hr data and other fields as null - foreach ($merged as $hr) { - $result[] = [ - 'hr_access_table_pk' => null, - 'post_client_id' => $client_id ?? null, - 'pre_hr_id' => $hr['pre_hr_id'] ?? null, - 'post_hr_id' => $hr['post_hr_id'] ?? null, - 'allowed_pre_modules' => [], - 'allowed_post_modules' => [], - 'allowed_pre_policies' => [], - 'allowed_active_policies' => [], - 'allowed_cd' => [], - 'hr_name' => $hr['hr_name'] ?? null, - 'hr_mobile' => $hr['hr_mobile'] ?? null, - 'hr_mail' => $hr['hr_mail'] ?? null, - 'pre_branch_id' => $hr['pre_branch_id'] ?? null, - 'post_branch_id' => $hr['post_branch_id'] ?? null , - 'post_branch_name' => $hr['post_branch_name'] ?? null , - 'pre_client_id' => $pre_client_id ?? null - ]; - } - } else { - // First create a map of HR data by post_hr_id for quick lookup - $hrMap = []; - foreach ($merged as $hr) { - $hrMap[$hr['post_hr_id']] = $hr; - } - - // Process access data first - foreach ($hrAccessTableData as $access) { - $post_hr_id = $access['post_hr_id']; - - // Check if this HR exists in our merged data - if (isset($hrMap[$post_hr_id])) { - $hr = $hrMap[$post_hr_id]; - $temp_arr_key = $hr['hr_mobile'] . $hr['hr_mail']; - - // Parse allowed modules - $allowed_modules = json_decode($access['allowed_modules'], true) ?? null; - $allowed_pre_modules = $allowed_modules['pre'] ?? []; - $allowed_post_modules = $allowed_modules['post'] ?? []; - - $result[$temp_arr_key] = [ - 'hr_access_table_pk' => $access['id'] ?? null, - 'post_client_id' => $access['post_client_id'] ?? null, + // No access data — fill result with hr data and other fields as null + foreach ($merged as $hr) { + $result[] = [ + 'hr_access_table_pk' => null, + 'post_client_id' => $client_id ?? null, 'pre_hr_id' => $hr['pre_hr_id'] ?? null, 'post_hr_id' => $hr['post_hr_id'] ?? null, - 'allowed_pre_modules' => $allowed_pre_modules, - 'allowed_post_modules' => $allowed_post_modules, - 'allowed_pre_policies' => json_decode($access['allowed_pre_policies'], true) ?? [], - 'allowed_active_policies' => json_decode($access['allowed_active_policies'], true) ?? [], - 'allowed_cd' => json_decode($access['allowed_cd'], true) ?? [], - 'hr_name' => $hr['hr_name'], - 'hr_mobile' => $hr['hr_mobile'], - 'hr_mail' => $hr['hr_mail'], + 'allowed_pre_modules' => [], + 'allowed_post_modules' => [], + 'allowed_pre_policies' => [], + 'allowed_active_policies' => [], + 'allowed_cd' => [], + 'hr_name' => $hr['hr_name'] ?? null, + 'hr_mobile' => $hr['hr_mobile'] ?? null, + 'hr_mail' => $hr['hr_mail'] ?? null, 'pre_branch_id' => $hr['pre_branch_id'] ?? null, 'post_branch_id' => $hr['post_branch_id'] ?? null , 'post_branch_name' => $hr['post_branch_name'] ?? null , 'pre_client_id' => $pre_client_id ?? null ]; + } - // Remove from map so we know it's been processed - unset($hrMap[$post_hr_id]); + } else { + + // First create a map of HR data by post_hr_id for quick lookup + $hrMap = []; + foreach ($merged as $hr) { + if(!empty($hr['post_hr_id'])){ + $hrMap['post_hr_id_' . $hr['post_hr_id']] = $hr; + }else{ + $hrMap['pre_hr_id_' . $hr['pre_hr_id']] = $hr; + } + } + + // Process access data first + foreach ($hrAccessTableData as $access) { + + $post_hr_id = $access['post_hr_id']; + $pre_hr_id = $access['pre_hr_id']; + + if (empty($post_hr_id) && !empty($pre_hr_id)) { + $type_of_access_data = "PRE"; + } elseif (!empty($post_hr_id) && empty($pre_hr_id)) { + $type_of_access_data = "POST"; + } elseif (!empty($post_hr_id) && !empty($pre_hr_id)) { + $type_of_access_data = "POST&PRE"; + } else { + $type_of_access_data = "UNKNOWN"; + } + + // Check if this HR exists in our merged data + if (isset($hrMap['post_hr_id_' . $post_hr_id])) { + + $hr = $hrMap['post_hr_id_' . $post_hr_id]; + $temp_arr_key = $hr['hr_mobile'] . $hr['hr_mail'] . $post_hr_id; + + // Parse allowed modules + $allowed_modules = json_decode($access['allowed_modules'], true) ?? null; + $allowed_pre_modules = $allowed_modules['pre'] ?? []; + $allowed_post_modules = $allowed_modules['post'] ?? []; + + $result[$temp_arr_key] = [ + 'hr_access_table_pk' => $access['id'] ?? null, + 'post_client_id' => $access['post_client_id'] ?? null, + 'pre_hr_id' => $hr['pre_hr_id'] ?? null, + 'post_hr_id' => $hr['post_hr_id'] ?? null, + 'allowed_pre_modules' => $allowed_pre_modules, + 'allowed_post_modules' => $allowed_post_modules, + 'allowed_pre_policies' => json_decode($access['allowed_pre_policies'], true) ?? [], + 'allowed_active_policies' => json_decode($access['allowed_active_policies'], true) ?? [], + 'allowed_cd' => json_decode($access['allowed_cd'], true) ?? [], + 'hr_name' => $hr['hr_name'], + 'hr_mobile' => $hr['hr_mobile'], + 'hr_mail' => $hr['hr_mail'], + 'pre_branch_id' => $hr['pre_branch_id'] ?? null, + 'post_branch_id' => $hr['post_branch_id'] ?? null , + 'post_branch_name' => $hr['post_branch_name'] ?? null , + 'pre_client_id' => $pre_client_id ?? null, + 'type_of_access_data' => $type_of_access_data ?? null + ]; + + // Remove from map so we know it's been processed + unset($hrMap['post_hr_id_' . $post_hr_id]); + + }else if (isset($hrMap['pre_hr_id_' . $pre_hr_id])){ + + $hr = $hrMap['pre_hr_id_' . $pre_hr_id]; + $temp_arr_key = $hr['hr_mobile'] . $hr['hr_mail'] . $post_hr_id; + + // Parse allowed modules + $allowed_modules = json_decode($access['allowed_modules'], true) ?? null; + $allowed_pre_modules = $allowed_modules['pre'] ?? []; + $allowed_post_modules = $allowed_modules['post'] ?? []; + + $result[$temp_arr_key] = [ + 'hr_access_table_pk' => $access['id'] ?? null, + 'post_client_id' => $access['post_client_id'] ?? null, + 'pre_hr_id' => $hr['pre_hr_id'] ?? null, + 'post_hr_id' => $hr['post_hr_id'] ?? null, + 'allowed_pre_modules' => $allowed_pre_modules, + 'allowed_post_modules' => $allowed_post_modules, + 'allowed_pre_policies' => json_decode($access['allowed_pre_policies'], true) ?? [], + 'allowed_active_policies' => json_decode($access['allowed_active_policies'], true) ?? [], + 'allowed_cd' => json_decode($access['allowed_cd'], true) ?? [], + 'hr_name' => $hr['hr_name'], + 'hr_mobile' => $hr['hr_mobile'], + 'hr_mail' => $hr['hr_mail'], + 'pre_branch_id' => $hr['pre_branch_id'] ?? null, + 'post_branch_id' => $hr['post_branch_id'] ?? null , + 'post_branch_name' => $hr['post_branch_name'] ?? null , + 'pre_client_id' => $pre_client_id ?? null, + 'type_of_access_data' => $type_of_access_data ?? null + ]; + + // Remove from map so we know it's been processed + unset($hrMap['pre_hr_id_' . $pre_hr_id]); + + } + } + + // Now process any remaining HRs that didn't have access records + foreach ($hrMap as $hr) { + + $temp_arr_key = $hr['hr_mobile'] . $hr['hr_mail']; + $post_hr_id = $hr['post_hr_id']; + $pre_hr_id = $hr['pre_hr_id']; + + if (empty($post_hr_id) && !empty($pre_hr_id)) { + $type_of_access_data = "PRE"; + } elseif (!empty($post_hr_id) && empty($pre_hr_id)) { + $type_of_access_data = "POST"; + } elseif (!empty($post_hr_id) && !empty($pre_hr_id)) { + $type_of_access_data = "POST&PRE"; + } else { + $type_of_access_data = "UNKNOWN"; + } + + $result[$temp_arr_key] = [ + 'hr_access_table_pk' => null, + 'post_client_id' => $client_id ?? null, + 'pre_hr_id' => $hr['pre_hr_id'] ?? null, + 'post_hr_id' => $hr['post_hr_id'] ?? null, + 'allowed_pre_modules' => [], + 'allowed_post_modules' => [], + 'allowed_pre_policies' => [], + 'allowed_active_policies' => [], + 'allowed_cd' => [], + 'hr_name' => $hr['hr_name'] ?? null, + 'hr_mobile' => $hr['hr_mobile'] ?? null, + 'hr_mail' => $hr['hr_mail'] ?? null, + 'pre_branch_id' => $hr['pre_branch_id'] ?? null, + 'post_branch_id' => $hr['post_branch_id'] ?? null , + 'post_branch_name' => $hr['post_branch_name'] ?? null , + 'pre_client_id' => $pre_client_id ?? null, + 'type_of_access_data' => $type_of_access_data ?? null + ]; } } - // Now process any remaining HRs that didn't have access records - foreach ($hrMap as $hr) { - $temp_arr_key = $hr['hr_mobile'] . $hr['hr_mail']; + // dd($result); + $resultData['hr_access_data'] = array_values($result); + $resultData['pre_policy_data'] = $data['pre_policy_data']; + $resultData['post_policy_data'] = $data['post_policy_data']; + $resultData['post_cd_data'] = $data['post_cd_data']; - $result[$temp_arr_key] = [ - 'hr_access_table_pk' => null, - 'post_client_id' => $client_id ?? null, - 'pre_hr_id' => $hr['pre_hr_id'] ?? null, - 'post_hr_id' => $hr['post_hr_id'] ?? null, - 'allowed_pre_modules' => [], - 'allowed_post_modules' => [], - 'allowed_pre_policies' => [], - 'allowed_active_policies' => [], - 'allowed_cd' => [], - 'hr_name' => $hr['hr_name'] ?? null, - 'hr_mobile' => $hr['hr_mobile'] ?? null, - 'hr_mail' => $hr['hr_mail'] ?? null, - 'pre_branch_id' => $hr['pre_branch_id'] ?? null, - 'post_branch_id' => $hr['post_branch_id'] ?? null , - 'post_branch_name' => $hr['post_branch_name'] ?? null , - 'pre_client_id' => $pre_client_id ?? null - ]; - } + return $resultData; + + } catch (\Throwable $th) { + + $this->myLogger->logme("error", "REST-AUTH-CONTROLLER - updateInsurerStatement: Exception: " . $th->getMessage() . " --- Line: " . $th->getLine() . " --- Trace: " . $th->getTraceAsString()); + return []; + $errorData = [ + 'message' => $th->getMessage(), + 'file' => $th->getFile(), + 'line' => $th->getLine(), + 'code' => $th->getCode(), + 'trace' => $th->getTraceAsString(), + 'trace_array' => $th->getTrace(), // full array version (optional) + 'function' => $th->getTrace()[0]['function'] ?? null, + 'class' => $th->getTrace()[0]['class'] ?? null, + ]; + return ['status' => 'failed', 'code' => 500, 'message' => $th->getMessage(), 'error_data' => $errorData]; } - - - $resultData['hr_access_data'] = array_values($result); - $resultData['pre_policy_data'] = $data['pre_policy_data']; - $resultData['post_policy_data'] = $data['post_policy_data']; - $resultData['post_cd_data'] = $data['post_cd_data']; - - return $resultData; } public function saveHrAccessData() @@ -7846,7 +8103,4 @@ class ClientController extends AdminController - - - } diff --git a/app/Views/hr_access_controll.php b/app/Views/hr_access_controll.php index cbd2838e..f845b288 100644 --- a/app/Views/hr_access_controll.php +++ b/app/Views/hr_access_controll.php @@ -60,7 +60,6 @@ -
@@ -135,14 +134,18 @@ $policies) { $statusText = $policies['policy_status'] == 1 ? 'Active' : 'In-Active'; $statusClass = $policies['policy_status'] == 1 ? 'active' : 'inactive'; - if ( - in_array($policies['branch_id'].'-'.$policies['policy_no'], $listed_pre) - && - $value['pre_branch_id'] != $policies['branch_id'] - ) { + // if ( + // in_array($policies['branch_id'].'-'.$policies['policy_no'], $listed_pre) + // && + // $value['pre_branch_id'] != $policies['branch_id'] + // ) { + // continue; + // } else { + // $listed_pre[] = $policies['branch_id'].'-'.$policies['policy_no']; + // } + + if($value['pre_branch_id'] !== $policies['branch_id']){ continue; - } else { - $listed_pre[] = $policies['branch_id'].'-'.$policies['policy_no']; } ?>
@@ -196,17 +199,21 @@ $policies) { $statusText = $policies['policy_status'] == 1 ? 'Active' : 'In-Active'; $statusClass = $policies['policy_status'] == 1 ? 'active' : 'inactive'; - if( - in_array($policies['branch_id'].'-'.$policies['policy_no'] , $listed_post) - && - $value['post_branch_id'] != $policies['branch_id'] - ) - { + // if( + // in_array($policies['branch_id'].'-'.$policies['policy_no'] , $listed_post) + // && + // $value['post_branch_id'] != $policies['branch_id'] + // ) + // { + // continue; + // } + // else + // { + // $listed_post[] = $policies['branch_id'].'-'.$policies['policy_no']; + // } + + if($value['post_branch_id'] !== $policies['branch_id']){ continue; - } - else - { - $listed_post[] = $policies['branch_id'].'-'.$policies['policy_no']; } ?> From 9e1713446130d3d9f05a41189f5cbf3cd77fed3e Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Wed, 12 Nov 2025 13:09:33 +0530 Subject: [PATCH 17/21] FIX_HR --- app/Views/client_branch.php | 1 + app/Views/client_onboarding.php | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Views/client_branch.php b/app/Views/client_branch.php index 178439fa..01ff9597 100755 --- a/app/Views/client_branch.php +++ b/app/Views/client_branch.php @@ -436,6 +436,7 @@ $("#branch_form").submit(function(event) { toastr.error(res.message, 'Error'); }else{ toastr.success(res.message, 'Success'); + newBranchSavedPeaseCallTheHrAccessFormApi = true; } // var message = (branch_PrimaryKey === '') ? // 'Client Branch Created successfully' : diff --git a/app/Views/client_onboarding.php b/app/Views/client_onboarding.php index 3dc798d6..3a195fe7 100755 --- a/app/Views/client_onboarding.php +++ b/app/Views/client_onboarding.php @@ -456,6 +456,7 @@