From 1b6c18ee88a7918d68f0dfe25b471ffb7d70ac4f Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Tue, 11 Nov 2025 17:17:48 +0530 Subject: [PATCH 01/24] FIX_CHANGE_PASS_HASH_ISSUE --- app/Controllers/RestAuthenticationController.php | 8 +------- app/Views/report_bds.php | 6 ++++-- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/app/Controllers/RestAuthenticationController.php b/app/Controllers/RestAuthenticationController.php index 3ba1557e..761ceffa 100755 --- a/app/Controllers/RestAuthenticationController.php +++ b/app/Controllers/RestAuthenticationController.php @@ -1518,12 +1518,7 @@ class RestAuthenticationController extends AdminController public function savePassword() { - log_message('error', ' '); - log_message('error', ' ************************************* POST START **************************************** '); - log_message('error', ' '); - $this->myLogger->logme("error", "REST-AUTH-CONTROLLER - savePassword: Function called"); $this->myLogger->logme("error", "REST-AUTH-CONTROLLER - savePassword: Received payload = " . json_encode($this->request->getJSON() ?? [])); - try { $payload = $this->request->getJSON(); @@ -1681,8 +1676,7 @@ class RestAuthenticationController extends AdminController if ($employeeData && password_verify($old_password, $employeeData['password'])) { // Hash new password - // $newHashedPassword = password_hash($new_password, PASSWORD_DEFAULT); - $newHashedPassword = $new_password; + $newHashedPassword = password_hash($new_password, PASSWORD_DEFAULT); // Update password and clear OTP $updated = $this->employeeModel->update($employeeData['id'], [ diff --git a/app/Views/report_bds.php b/app/Views/report_bds.php index edbfa6d8..bbb03f73 100644 --- a/app/Views/report_bds.php +++ b/app/Views/report_bds.php @@ -161,8 +161,10 @@ table.dataTable tbody td { // Date : 6/11/25 12:50 $irda_amt = isset($row['total_irda_amt']) && $row['total_irda_amt'] !== '' ? (float)$row['total_irda_amt'] : 0; $exp_amt = isset($row['exp_amt']) && $row['exp_amt'] !== '' ? (float)$row['exp_amt'] : 0; - $max_amount = max($irda_amt, $exp_amt); - $total_irda_amt = number_format($max_amount, 2, '.', ''); ?> + // $max_amount = max($irda_amt, $exp_amt); + // $total_irda_amt = number_format($max_amount, 2, '.', ''); + $total_irda_amt = empty($row['total_irda_amt']) ? $row['exp_amt'] : $row['total_irda_amt']; + ?> From 5b18ebbfc99c32e36052d4577f3743dc64e58abe Mon Sep 17 00:00:00 2001 From: venba-Inspriron-3558 Date: Tue, 11 Nov 2025 17:38:54 +0530 Subject: [PATCH 02/24] FIX_Switch button CSS --- app/Config/Routes.php | 1 + .../AppContentManagementController.php | 66 ++++-- app/Views/add_image_list.php | 216 ++++++++++++------ app/Views/client_policy.php | 23 +- 4 files changed, 197 insertions(+), 109 deletions(-) diff --git a/app/Config/Routes.php b/app/Config/Routes.php index ad1d3874..1c8b6002 100755 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -42,6 +42,7 @@ $routes->post("add_advertise_image", "AppContentManagementController::add_advert $routes->get("add_image_index", "AppContentManagementController::add_image_index"); $routes->get("getAdvertiseImage/(:any)", "AppContentManagementController::getAdvertiseImage/$1"); $routes->get("frontend_content", "AppContentManagementController::frontend_content"); +$routes->get('showAdvertiseImage/(:any)', 'AdvertiseController::showAdvertiseImage/$1'); // $routes->get('/', 'LoginController::index'); diff --git a/app/Controllers/AppContentManagementController.php b/app/Controllers/AppContentManagementController.php index 33d6ce1d..f9e1d356 100755 --- a/app/Controllers/AppContentManagementController.php +++ b/app/Controllers/AppContentManagementController.php @@ -40,36 +40,58 @@ class AppContentManagementController extends AdminController // $this->loadLayout('client_onboarding', $data); } - public function add_advertise_image(){ + public function add_advertise_image() { + try { + $file = $this->request->getFile('advertise_image'); + //1) original file name for vaildations + $fileName = $file->getClientName(); //original file name for vaildations + $existing = $this->addImgModel->where('name', $fileName)->where('is_active', 1)->first(); + if($existing){ return $this->respond(['status' => false, 'message' => 'This file has already been uploaded in active state.'], 400); } - // print_r($this->request->getPost());die; - $uploadFilePath = ROOTPATH . 'public/uploads/advertiseImage/'; - $file_name = file_Upload($this->request->getFile('advertise_image'), $uploadFilePath); - $data['id'] = $this->request->getPost('add_image_id'); - // $data['created_by'] = get_session_userid(); - $data['name'] = $file_name; + //skip 1) and use this + // $fileName = $file->getRandomName(); // Same Name Multiple time upload means different name - if($data['id'] == 0){ - $insert = $this->addImgModel->insert($data); - if($insert){ - return $this->respond(['status' => true,'code' => 200,'data' => "success"], 200); + if (!$file || !$file->isValid()) { + return $this->respond(['status' => false, 'message' => 'No file uploaded or invalid file.'], 400); + } - }else{ - return $this->respond(['status' => false,'code' => 404,'message' => 'no data found'], 200); + $uploadPath = WRITEPATH . 'uploads/advertiseImage/'; + if (!is_dir($uploadPath)) mkdir($uploadPath, 0755, true); - } - }else{ - $id = $data['id']; - $update = $this->addImgModel->update($id,$data); - if($update){ - return $this->respond(['status' => true,'code' => 200,'data' => "success"], 200); + + $file->move($uploadPath, $fileName); - }else{ - return $this->respond(['status' => false,'code' => 404,'message' => 'no data found'], 200); - } + $id = $this->request->getPost('add_image_id'); + $data = ['name' => $fileName]; + + if ($id == 0) { + $this->addImgModel->insert($data); + } else { + $this->addImgModel->update($id, $data); + } + + return $this->respond(['status' => true, 'message' => 'Image saved successfully.']); + } catch (\Exception $e) { + return $this->respond(['status' => false, 'message' => $e->getMessage()], 500); } } + public function showAdvertiseImage($fileName) + { + + $filePath = WRITEPATH . 'uploads/advertiseImage/' . $fileName; + + if (!file_exists($filePath)) { + return $this->response->setStatusCode(404, 'File not found'); + } + + $mimeType = mime_content_type($filePath); + header('Content-Type: ' . $mimeType); + readfile($filePath); + exit; + } + + public function getAdvertiseImage($image_id){ $image_data = $this->addImgModel->select('name')->where(['id' => $image_id])->first(); diff --git a/app/Views/add_image_list.php b/app/Views/add_image_list.php index 5d8d65ad..52f4a658 100755 --- a/app/Views/add_image_list.php +++ b/app/Views/add_image_list.php @@ -53,7 +53,7 @@ table.dataTable thead th { @@ -82,17 +82,15 @@ table.dataTable thead th { -
- - + +
- +
@@ -101,8 +99,9 @@ table.dataTable thead th {
+
- +
@@ -113,68 +112,69 @@ table.dataTable thead th { \ No newline at end of file diff --git a/app/Views/client_policy.php b/app/Views/client_policy.php index 3b21c09d..fdb0c39e 100755 --- a/app/Views/client_policy.php +++ b/app/Views/client_policy.php @@ -51,23 +51,24 @@ position: relative; width: 50px; height: 25px; -background-color: #fff; +background-color: #cccccc; border-radius: 25px; box-shadow: 0 0 5px rgba(0,0,0,0.2); transition: 0.3s; } -.slider::before , +/* Round knob (always white) */ +.slider::before, .slider_blue::before { -content: ""; -position: absolute; -height: 19px; -width: 19px; -left: 3px; -top: 3px; -background-color: #ccc; -border-radius: 50%; -transition: 0.3s; + content: ""; + position: absolute; + height: 19px; + width: 19px; + left: 3px; + top: 3px; + background-color: #fff; /* always white */ + border-radius: 50%; + transition: 0.3s; } input:checked + .slider { From a7a798916e541190884913356c2a3eddeee840f6 Mon Sep 17 00:00:00 2001 From: venba-Inspriron-3558 Date: Tue, 11 Nov 2025 17:40:49 +0530 Subject: [PATCH 03/24] FIX_ICON --- app/Views/add_image_list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Views/add_image_list.php b/app/Views/add_image_list.php index 52f4a658..29d7c14c 100755 --- a/app/Views/add_image_list.php +++ b/app/Views/add_image_list.php @@ -222,7 +222,7 @@ var table; $(document).ready(function() { table = $('#tickets-table').DataTable({ - dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, button right + dom: "<'row'<'col-sm-1'f><'col-sm-11 text-right'B>>" + // Filter left, button right "<'row'<'col-sm-12'tr>>" + "<'row'<'col-sm-5'i><'col-sm-7'p>>", buttons: [ From 261f5dc1dc712fd04eb7dac069c02a38539e79b1 Mon Sep 17 00:00:00 2001 From: venba-Inspriron-3558 Date: Tue, 11 Nov 2025 18:19:38 +0530 Subject: [PATCH 04/24] FIX_+ - Interchanges in policy terms --- app/Views/other_policy_terms.php | 3 ++- app/Views/policy_gmc_terms.php | 10 +++++----- app/Views/policy_gpa_terms.php | 9 +++++---- app/Views/report_bds.php | 8 ++++---- 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/app/Views/other_policy_terms.php b/app/Views/other_policy_terms.php index e674fa52..16166973 100755 --- a/app/Views/other_policy_terms.php +++ b/app/Views/other_policy_terms.php @@ -215,6 +215,7 @@ } }); + window.scrollTo({ top: 0, behavior: 'smooth' }); setTimeout(function() { $('.loader').fadeOut(); $('.loader-mask').delay(350).fadeOut('slow'); @@ -749,8 +750,8 @@
- +
diff --git a/app/Views/policy_gmc_terms.php b/app/Views/policy_gmc_terms.php index e9f6848f..5c28b10a 100755 --- a/app/Views/policy_gmc_terms.php +++ b/app/Views/policy_gmc_terms.php @@ -1052,6 +1052,7 @@ } }); + window.scrollTo({ top: 0, behavior: 'smooth' }); setTimeout(function() { $('.loader').fadeOut(); @@ -1761,15 +1762,14 @@ value="${data == null || data == undefined || data == "" ? '' : data}" type="text" name="multiple_sum_insured[]" class="form-control multiple_sum_insured mr-2" onkeypress="return onlyNumbers(event)" onkeyup="formatNumber(this); numtowordinkeyup(this)"> + -
diff --git a/app/Views/policy_gpa_terms.php b/app/Views/policy_gpa_terms.php index b8be22c0..87a151b9 100755 --- a/app/Views/policy_gpa_terms.php +++ b/app/Views/policy_gpa_terms.php @@ -499,6 +499,7 @@ } }); + window.scrollTo({ top: 0, behavior: 'smooth' }); setTimeout(function() { $('.loader').fadeOut(); @@ -927,14 +928,14 @@ style="max-width:200px;" value="${data == null || data == undefined || data == "" ? '' : data}" type="text" name="multiple_sum_insured[]" class="form-control multiple_sum_insured mr-2" onkeypress="return onlyNumbers(event)" onkeyup="formatNumber(this); numtowordinkeyup(this)"> - +
diff --git a/app/Views/report_bds.php b/app/Views/report_bds.php index bbb03f73..3aaab25d 100644 --- a/app/Views/report_bds.php +++ b/app/Views/report_bds.php @@ -103,8 +103,8 @@ table.dataTable tbody td { Premium
(without GST) Total Premium - BP % - TP/Ter % + BP% + TP/Ter% Rewards Agreed Amount Invoiced Amount @@ -147,8 +147,8 @@ table.dataTable tbody td { -  % -  % + % + % Date: Tue, 11 Nov 2025 18:38:57 +0530 Subject: [PATCH 05/24] FIX_STMT_UPLOAD_INT_ISSUE --- app/Controllers/ClientController.php | 4 +- .../PolicyTransactionController.php | 148 ++++++++++-------- 2 files changed, 84 insertions(+), 68 deletions(-) diff --git a/app/Controllers/ClientController.php b/app/Controllers/ClientController.php index 05a75542..fb69bbcd 100755 --- a/app/Controllers/ClientController.php +++ b/app/Controllers/ClientController.php @@ -5702,8 +5702,8 @@ class ClientController extends AdminController // ---------- POLICY TRANSACTION CONTROLLER -------------------------------------------------------------------------------- $policyTransactionController = new PolicyTransactionController(); - // $res = $policyTransactionController->validateInsurerStatement(['file_id' => '60']); - // $res = $policyTransactionController->updateInsurerStatement(['file_id' => '22']); + // $res = $policyTransactionController->validateInsurerStatement(['file_id' => '62']); + // $res = $policyTransactionController->updateInsurerStatement(['file_id' => '62']); // dd('-----', $res); // ----------EMP DATA SERVICE CONTROLLER-------------------------------------------------------------------------------- diff --git a/app/Controllers/PolicyTransactionController.php b/app/Controllers/PolicyTransactionController.php index b1fb07d6..a2f88d5f 100644 --- a/app/Controllers/PolicyTransactionController.php +++ b/app/Controllers/PolicyTransactionController.php @@ -2510,89 +2510,105 @@ // check policy no,insurer and etc in DB for this month // if all good return true, otherwise return false with messssage $data_to_update = []; - foreach ($excel_data as $excel_key => $excel_row) { - $is_row_empty = check_row_is_empty_or_null($excel_row); - if (!$is_row_empty) { + try{ + foreach ($excel_data as $excel_key => $excel_row) { + $is_row_empty = check_row_is_empty_or_null($excel_row); + if (!$is_row_empty) { - $is_source_found = 0; - // $policy_start_date = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[4]); //policy_start_date from excel - // $policy_end_date = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[5]); //policy_end_date from excel - $policy_no = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[1]); //policy_end_date from excel - $policy_no = preg_replace('/[\x{200C}\x{200B}]/u', '', $excel_row[1]); // - // $client_name = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[3]); //clientname from excel - $endorsement_no = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[2]); //policy_end_date from excel + $is_source_found = 0; + // $policy_start_date = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[4]); //policy_start_date from excel + // $policy_end_date = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[5]); //policy_end_date from excel + $policy_no = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[1]); //policy_end_date from excel + $policy_no = preg_replace('/[\x{200C}\x{200B}]/u', '', $excel_row[1]); // + // $client_name = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[3]); //clientname from excel + $endorsement_no = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[2]); //policy_end_date from excel - foreach ($source_data as $source_key => $source_row) { - // Kint::dump(change_date_format($excel_row[3],'d-m-Y','Y-m-d')); - $source_endorsement_no = $source_row['endorsement_no'] !== null ? $source_row['endorsement_no'] : null; - // if (($policy_no == $source_row['policy_no']) && $endorsement_no == $source_endorsement_no && change_date_format($policy_start_date, 'd-m-Y', 'Y-m-d') == $source_row['policy_start_date'] && change_date_format($policy_end_date, 'd-m-Y', 'Y-m-d') == $source_row['policy_end_date'] && $client_name == $source_row['client_name']) { - if (($policy_no == $source_row['policy_no']) && $endorsement_no == $source_endorsement_no) { - $is_source_found = 1; + foreach ($source_data as $source_key => $source_row) { + // Kint::dump(change_date_format($excel_row[3],'d-m-Y','Y-m-d')); + $source_endorsement_no = $source_row['endorsement_no'] !== null ? $source_row['endorsement_no'] : null; + // if (($policy_no == $source_row['policy_no']) && $endorsement_no == $source_endorsement_no && change_date_format($policy_start_date, 'd-m-Y', 'Y-m-d') == $source_row['policy_start_date'] && change_date_format($policy_end_date, 'd-m-Y', 'Y-m-d') == $source_row['policy_end_date'] && $client_name == $source_row['client_name']) { + if (($policy_no == $source_row['policy_no']) && $endorsement_no == $source_endorsement_no) { + $is_source_found = 1; - //calculate percentage first - $total_amt = 0; + //calculate percentage first + $total_amt = 0; - // $actual_bp_per = trim($excel_row[9]); //commented becoz this filed removed tfrom excel file - $actual_bp_per = 0; //set default value 0 for maintaining existing code flow - $actual_bp_brokerage = trim($excel_row[5]); - $actual_bp_amt = trim($excel_row[3]); + // $actual_bp_per = trim($excel_row[9]); //commented becoz this filed removed tfrom excel file + $actual_bp_per = 0; //set default value 0 for maintaining existing code flow + $actual_bp_brokerage = (int) trim($excel_row[5]); + $actual_bp_amt = (int) trim($excel_row[3]); - if (($actual_bp_brokerage && $actual_bp_brokerage != 0 && $actual_bp_brokerage != "")) { - $total_amt += $actual_bp_brokerage; - //percentage reverse calculation - if (($actual_bp_per == 0 || $actual_bp_per == 0) && !empty($actual_bp_amt)) { - $actual_bp_per = round(($actual_bp_brokerage / $actual_bp_amt) * 100, 2); + if (($actual_bp_brokerage && $actual_bp_brokerage != 0 && $actual_bp_brokerage != "")) { + $total_amt += $actual_bp_brokerage; + //percentage reverse calculation + if (($actual_bp_per == 0 || $actual_bp_per == 0) && !empty($actual_bp_amt)) { + $actual_bp_per = (int) round(($actual_bp_brokerage / $actual_bp_amt) * 100, 2); + } + } else { + $actual_bp_brokerage = $actual_bp_amt * ($actual_bp_per / 100); + $total_amt += $actual_bp_brokerage; } - } else { - $actual_bp_brokerage = $actual_bp_amt * ($actual_bp_per / 100); - $total_amt += $actual_bp_brokerage; - } - // $actual_tp_per = trim($excel_row[10]);//commented becoz this filed removed tfrom excel file - $actual_tp_per = 0;//set default value 0 for maintaining existing code flow - $actual_tp_brokerage = trim($excel_row[6]); - $actual_tp_amt = trim($excel_row[4]); + // $actual_tp_per = trim($excel_row[10]);//commented becoz this filed removed tfrom excel file + $actual_tp_per = 0;//set default value 0 for maintaining existing code flow + $actual_tp_brokerage = (int) trim($excel_row[6]); + $actual_tp_amt = (int) trim($excel_row[4]); - if ($actual_tp_brokerage && $actual_tp_brokerage != 0 && $actual_tp_brokerage != "") { - $total_amt += $actual_tp_brokerage; - //percentage reverse calculation - if (($actual_tp_per == 0 || $actual_tp_per == "") && !empty($actual_tp_amt)) { - $actual_tp_per = ($actual_tp_brokerage / $actual_tp_amt) * 100; + if ($actual_tp_brokerage && $actual_tp_brokerage != 0 && $actual_tp_brokerage != "") { + $total_amt += $actual_tp_brokerage; + //percentage reverse calculation + if (($actual_tp_per == 0 || $actual_tp_per == "") && !empty($actual_tp_amt)) { + $actual_tp_per = (int) round(($actual_tp_brokerage / $actual_tp_amt) * 100, 2); + } + } else { + $actual_tp_brokerage = $actual_tp_amt * ($actual_tp_per / 100); + $total_amt += $actual_tp_brokerage; } - } else { - $actual_tp_brokerage = $actual_tp_amt * ($actual_tp_per / 100); - $total_amt += $actual_tp_brokerage; - } - // $actual_tep_per = trim($excel_row[11]); - // $actual_tep_brokerage = trim($excel_row[14]); - // $actual_tep_amt = trim($excel_row[8]); + // $actual_tep_per = trim($excel_row[11]); + // $actual_tep_brokerage = trim($excel_row[14]); + // $actual_tep_amt = trim($excel_row[8]); - $actual_tep_per = 0; - $actual_tep_brokerage = 0; - $actual_tep_amt = 0; + $actual_tep_per = 0; + $actual_tep_brokerage = 0; + $actual_tep_amt = 0; - if ($actual_tep_brokerage && $actual_tep_brokerage != 0 && $actual_tep_brokerage != "") { - $total_amt += $actual_tep_brokerage; - //percentage reverse calculation - if (($actual_tep_per == 0 || $actual_tep_per == "") && !empty($actual_tep_amt)) { - $actual_tep_per = ($actual_tep_brokerage / $actual_tep_amt) * 100; + if ($actual_tep_brokerage && $actual_tep_brokerage != 0 && $actual_tep_brokerage != "") { + $total_amt += $actual_tep_brokerage; + //percentage reverse calculation + if (($actual_tep_per == 0 || $actual_tep_per == "") && !empty($actual_tep_amt)) { + $actual_tep_per = ($actual_tep_brokerage / $actual_tep_amt) * 100; + } + } else { + $actual_tep_brokerage = $actual_tep_amt * ($actual_tep_per / 100); + $total_amt += $actual_tep_brokerage; } - } else { - $actual_tep_brokerage = $actual_tep_amt * ($actual_tep_per / 100); - $total_amt += $actual_tep_brokerage; + + //find variance + $variance_amt = $source_row['exp_amt'] - $total_amt; + + $data_to_update[] = ['co_share_id' => $source_row['id'], 'actual_bp_amt' => $actual_bp_amt, 'actual_tp_amt' => $actual_tp_amt, 'actual_tep_amt' => $actual_tep_amt, 'actual_bp_per' => $actual_bp_per, 'actual_tp_per' => $actual_tp_per, 'actual_tep_per' => $actual_tep_per, 'variance' => $variance_amt, 'actual_tep_brokerage_amt' => $actual_tep_brokerage, 'actual_tp_brokerage_amt' => $actual_tp_brokerage, 'actual_bp_brokerage_amt' => $actual_bp_brokerage, 'reward' => trim($excel_row[7]), 'statement_id' => $file_id]; + + unset($source_data[$source_key]); + continue 2; } - - //find variance - $variance_amt = $source_row['exp_amt'] - $total_amt; - - $data_to_update[] = ['co_share_id' => $source_row['id'], 'actual_bp_amt' => $actual_bp_amt, 'actual_tp_amt' => $actual_tp_amt, 'actual_tep_amt' => $actual_tep_amt, 'actual_bp_per' => $actual_bp_per, 'actual_tp_per' => $actual_tp_per, 'actual_tep_per' => $actual_tep_per, 'variance' => $variance_amt, 'actual_tep_brokerage_amt' => $actual_tep_brokerage, 'actual_tp_brokerage_amt' => $actual_tp_brokerage, 'actual_bp_brokerage_amt' => $actual_bp_brokerage, 'reward' => trim($excel_row[7]), 'statement_id' => $file_id]; - - unset($source_data[$source_key]); - continue 2; } } } + }catch (\Throwable $th) { + + $this->myLogger->logme("error", "REST-AUTH-CONTROLLER - updateInsurerStatement: Exception: " . $th->getMessage() . " --- Line: " . $th->getLine() . " --- Trace: " . $th->getTraceAsString()); + $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]; } // dd($data_to_update); $this->coShareStmtDetailsModel->insertBatch($data_to_update, 'id'); From efa2fb6ce75abab58e7e91f8311aef6053f8b943 Mon Sep 17 00:00:00 2001 From: venba-Inspriron-3558 Date: Wed, 12 Nov 2025 09:35:28 +0530 Subject: [PATCH 06/24] FIX_all xl's Sheet name implemented --- app/Views/UserList.php | 1 + app/Views/bds_multi_report.php | 1 + app/Views/bds_renewal_report_list.php | 1 + app/Views/bds_report_Insurer_wise_Data.php | 1 + app/Views/bds_report_bap_wise_data.php | 1 + app/Views/bds_tat_wise_report.php | 1 + app/Views/cd_master_list.php | 1 + app/Views/claims_report_acc_manager_wise.php | 2 +- app/Views/claims_report_tpa_wise.php | 2 +- app/Views/employee_data_list.php | 5 +++-- app/Views/endorsement_list.php | 1 + app/Views/irda_bap_client_report_list.php | 1 + app/Views/irda_bap_insurer_report_list.php | 1 + app/Views/irda_client_report_list.php | 1 + app/Views/outstanding_report_list.php | 1 + app/Views/report_bds.php | 1 + app/Views/report_bds_new.php | 1 + app/Views/tat_report_band_wise_list.php | 1 + app/Views/thz_list.php | 1 + app/Views/ticket_feedback_list.php | 1 + app/Views/ticket_list.php | 1 + app/Views/variance_report_list.php | 3 ++- app/Views/vehicle_master_list.php | 1 + app/Views/vehicle_type_list.php | 1 + 24 files changed, 27 insertions(+), 5 deletions(-) diff --git a/app/Views/UserList.php b/app/Views/UserList.php index 7561a427..703d2c7a 100755 --- a/app/Views/UserList.php +++ b/app/Views/UserList.php @@ -935,6 +935,7 @@ table.dataTable tbody td { }, { extend: 'excel', + sheetName: 'Users', text: ' EXCEL ', exportOptions: { orthogonal: 'sort' }, className: 'app-btn-primary', diff --git a/app/Views/bds_multi_report.php b/app/Views/bds_multi_report.php index b2cbb84f..f05990cb 100644 --- a/app/Views/bds_multi_report.php +++ b/app/Views/bds_multi_report.php @@ -107,6 +107,7 @@ extend: 'excel', text: ' EXCEL ', title: 'BDS TAT BAND WISE DATA', + sheetName: 'BDS TAT BAND WISE DATA', }, ] } diff --git a/app/Views/bds_renewal_report_list.php b/app/Views/bds_renewal_report_list.php index 9d44a633..91c1b7b0 100644 --- a/app/Views/bds_renewal_report_list.php +++ b/app/Views/bds_renewal_report_list.php @@ -134,6 +134,7 @@ $(document).ready(function() { extend: 'excel', text: ' EXCEL ', title: 'Renewal-List', + sheetName: 'Renewal-List', exportOptions: { orthogonal: 'sort' }, diff --git a/app/Views/bds_report_Insurer_wise_Data.php b/app/Views/bds_report_Insurer_wise_Data.php index 835f48d6..4fcf1320 100644 --- a/app/Views/bds_report_Insurer_wise_Data.php +++ b/app/Views/bds_report_Insurer_wise_Data.php @@ -94,6 +94,7 @@ table.dataTable tbody td { extend: 'excel', text: ' EXCEL ', title: 'Insurer-Wise-Report-List', + sheetName: 'Insurer-Wise-Report-List', exportOptions: { orthogonal: 'sort' }, diff --git a/app/Views/bds_report_bap_wise_data.php b/app/Views/bds_report_bap_wise_data.php index 3b2175db..b78ed3cd 100644 --- a/app/Views/bds_report_bap_wise_data.php +++ b/app/Views/bds_report_bap_wise_data.php @@ -100,6 +100,7 @@ table.dataTable tbody td { }, className: 'app-btn-primary ', title: 'Bap-Wise-Report-List', + sheetName: 'Bap-Wise-Report-List', footer: true } ] diff --git a/app/Views/bds_tat_wise_report.php b/app/Views/bds_tat_wise_report.php index 1c30125d..ef236c6a 100644 --- a/app/Views/bds_tat_wise_report.php +++ b/app/Views/bds_tat_wise_report.php @@ -123,6 +123,7 @@ extend: 'excel', text: ' EXCEL ', title: 'BDS TAT BAND WISE DATA', + sheetName: 'BDS TAT BAND WISE DATA', className: 'app-btn-primary ', } ] diff --git a/app/Views/cd_master_list.php b/app/Views/cd_master_list.php index 466588e9..922b9f68 100755 --- a/app/Views/cd_master_list.php +++ b/app/Views/cd_master_list.php @@ -243,6 +243,7 @@ table.dataTable thead th { { extend: 'excel', text: ' EXCEL ', + sheetName: 'CD-Master-List', exportOptions: { orthogonal: 'sort' }, diff --git a/app/Views/claims_report_acc_manager_wise.php b/app/Views/claims_report_acc_manager_wise.php index 105f552a..214948a9 100644 --- a/app/Views/claims_report_acc_manager_wise.php +++ b/app/Views/claims_report_acc_manager_wise.php @@ -94,7 +94,7 @@ className: 'btn app-btn-secondary ', buttons: [ { extend: 'csv', text: ' CSV ', title: 'Insurer-Wise-Report-List', className: 'app-btn-primary ' }, - { extend: 'excel', text: ' EXCEL ', title: 'Insurer-Wise-Report-List', className: 'app-btn-primary ', exportOptions: { orthogonal: 'sort' } } + { extend: 'excel', text: ' EXCEL ', title: 'Insurer-Wise-Report-List', className: 'app-btn-primary ', sheetName: 'Insurer-Wise-Report-List', exportOptions: { orthogonal: 'sort' } } ], } ], diff --git a/app/Views/claims_report_tpa_wise.php b/app/Views/claims_report_tpa_wise.php index ec66572a..603ff8ad 100644 --- a/app/Views/claims_report_tpa_wise.php +++ b/app/Views/claims_report_tpa_wise.php @@ -92,7 +92,7 @@ className: 'btn app-btn-secondary ', buttons: [ { extend: 'csv', text: ' CSV ', title: 'Insurer-Wise-Report-List',className: 'app-btn-primary ' }, - { extend: 'excel', text: ' EXCEL ', title: 'Insurer-Wise-Report-List',className: 'app-btn-primary ', exportOptions: { orthogonal: 'sort' } } + { extend: 'excel', text: ' EXCEL ', title: 'Insurer-Wise-Report-List',className: 'app-btn-primary ', sheetName: 'Insurer-Wise-Report-List', exportOptions: { orthogonal: 'sort' } } ] } ], diff --git a/app/Views/employee_data_list.php b/app/Views/employee_data_list.php index 75e5125e..119716bc 100755 --- a/app/Views/employee_data_list.php +++ b/app/Views/employee_data_list.php @@ -354,13 +354,14 @@ extend: 'csv', text: ' CSV ', className: 'app-btn-primary ', - title: 'Member-List', + title: 'Members', }, { extend: 'excel', text: ' EXCEL ', className: 'app-btn-primary ', - title: 'Member-List', + title: 'Members', + sheetName: 'Members' } ] } diff --git a/app/Views/endorsement_list.php b/app/Views/endorsement_list.php index 0404262a..96f4899e 100755 --- a/app/Views/endorsement_list.php +++ b/app/Views/endorsement_list.php @@ -620,6 +620,7 @@ orthogonal: 'sort' }, className: 'app-btn-primary ', + sheetName: 'Endorsements' } ] } diff --git a/app/Views/irda_bap_client_report_list.php b/app/Views/irda_bap_client_report_list.php index 3e9dc0fe..25545c23 100644 --- a/app/Views/irda_bap_client_report_list.php +++ b/app/Views/irda_bap_client_report_list.php @@ -226,6 +226,7 @@ $(document).ready(function() { extend: 'excel', text: ' EXCEL ', title: 'IRDA-BAP-CLIENT-List', + sheetName: 'IRDA-BAP-CLIENT-List', exportOptions: { orthogonal: 'sort' }, diff --git a/app/Views/irda_bap_insurer_report_list.php b/app/Views/irda_bap_insurer_report_list.php index 0ed8d492..21253e6b 100644 --- a/app/Views/irda_bap_insurer_report_list.php +++ b/app/Views/irda_bap_insurer_report_list.php @@ -314,6 +314,7 @@ $(document).ready(function() { text: ' EXCEL ', className: 'app-btn-primary ', title: 'IRDA-BAP-INSURER-List', + sheetName: 'IRDA-BAP-INSURER-List', customize: function(xlsx) { var sheet = xlsx.xl.worksheets['sheet1.xml']; var total = 0; diff --git a/app/Views/irda_client_report_list.php b/app/Views/irda_client_report_list.php index d3f7993f..17272497 100644 --- a/app/Views/irda_client_report_list.php +++ b/app/Views/irda_client_report_list.php @@ -147,6 +147,7 @@ $(document).ready(function() { extend: 'excel', text: ' EXCEL ', title: 'IRDA-BAP-CLIENT-List', + sheetName: 'IRDA-BAP-CLIENT-List', className: 'app-btn-primary ', customize: function(xlsx) { var sheet = xlsx.xl.worksheets['sheet1.xml']; diff --git a/app/Views/outstanding_report_list.php b/app/Views/outstanding_report_list.php index 53b807d9..496c9afa 100644 --- a/app/Views/outstanding_report_list.php +++ b/app/Views/outstanding_report_list.php @@ -194,6 +194,7 @@ extend: 'excel', text: ' EXCEL ', title: 'Outstanding Report', + sheetName: 'Outstanding Report', customize: function(xlsx) { var sheet = xlsx.xl.worksheets['sheet1.xml']; var total = 0; diff --git a/app/Views/report_bds.php b/app/Views/report_bds.php index 3aaab25d..364a3fdd 100644 --- a/app/Views/report_bds.php +++ b/app/Views/report_bds.php @@ -342,6 +342,7 @@ $(document).ready(function() { { extend: 'excel', title: 'Policy-Tranction-BDS-List', + sheetName: 'Policy-Tranction-BDS-List', text: ' EXCEL ', className: 'app-btn-primary ', // customize: function (xlsx) { diff --git a/app/Views/report_bds_new.php b/app/Views/report_bds_new.php index 92bca589..ae9db7cf 100644 --- a/app/Views/report_bds_new.php +++ b/app/Views/report_bds_new.php @@ -385,6 +385,7 @@ { extend: 'excel', title: 'Policy-Tranction-BDS-List', + sheetName: 'Policy-Tranction-BDS-List', text: ' EXCEL ', className: 'app-btn-primary ', // customize: function (xlsx) { diff --git a/app/Views/tat_report_band_wise_list.php b/app/Views/tat_report_band_wise_list.php index 813b37f9..39f0c068 100644 --- a/app/Views/tat_report_band_wise_list.php +++ b/app/Views/tat_report_band_wise_list.php @@ -128,6 +128,7 @@ text: ' EXCEL ', className: 'app-btn-primary ', title: 'TAT BAND WISE DATA', + sheetName: 'TAT BAND WISE DATA', } ] } diff --git a/app/Views/thz_list.php b/app/Views/thz_list.php index 5e2376a5..e4bc218a 100644 --- a/app/Views/thz_list.php +++ b/app/Views/thz_list.php @@ -350,6 +350,7 @@ table.dataTable tbody td { }, className: 'app-btn-primary ', title: 'Tickets' + sheetName: 'Tickets', } ] } diff --git a/app/Views/ticket_feedback_list.php b/app/Views/ticket_feedback_list.php index 57ab8b6b..c8d2f304 100644 --- a/app/Views/ticket_feedback_list.php +++ b/app/Views/ticket_feedback_list.php @@ -131,6 +131,7 @@ $(document).ready(function() { orthogonal: 'sort' }, title: 'claim-List', + sheetName: 'claim-List', className: 'app-btn-primary ', } ] diff --git a/app/Views/ticket_list.php b/app/Views/ticket_list.php index e1b306e9..2b542f78 100644 --- a/app/Views/ticket_list.php +++ b/app/Views/ticket_list.php @@ -315,6 +315,7 @@ $(document).ready(function() { extend: 'excel', text: ' EXCEL ', title: 'claim-List', + sheetName: 'claim-List', exportOptions: { orthogonal: 'sort' }, diff --git a/app/Views/variance_report_list.php b/app/Views/variance_report_list.php index 5e59e7fc..6d609a80 100644 --- a/app/Views/variance_report_list.php +++ b/app/Views/variance_report_list.php @@ -236,7 +236,8 @@ { extend: 'excel', text: ' EXCEL ', - title: 'Variance-Report-List', + title: 'Variance-Report-List', + sheetName: 'Variance-Report-List', customize: function(xlsx) { var sheet = xlsx.xl.worksheets['sheet1.xml']; var total = 0; diff --git a/app/Views/vehicle_master_list.php b/app/Views/vehicle_master_list.php index 9d83d62e..84059a5d 100644 --- a/app/Views/vehicle_master_list.php +++ b/app/Views/vehicle_master_list.php @@ -499,6 +499,7 @@ $(document).ready(function() { }, { extend: 'excel', + sheetName: 'Vehicle-Master', text: ' EXCEL ', exportOptions: { orthogonal: 'sort' diff --git a/app/Views/vehicle_type_list.php b/app/Views/vehicle_type_list.php index 3cc0de76..6692bf58 100644 --- a/app/Views/vehicle_type_list.php +++ b/app/Views/vehicle_type_list.php @@ -845,6 +845,7 @@ text: ' EXCEL ', exportOptions: { orthogonal: 'sort' }, className: 'app-btn-primary', + sheetName: 'Vehicle-Type', exportOptions: { columns: ':not(:last-child)' } From 9162ca0f04989b715a797484ac97490aef545d15 Mon Sep 17 00:00:00 2001 From: venba-Inspriron-3558 Date: Wed, 12 Nov 2025 09:43:58 +0530 Subject: [PATCH 07/24] FIX_Sheet name implemented --- app/Views/variance_report_list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Views/variance_report_list.php b/app/Views/variance_report_list.php index 6d609a80..279fd493 100644 --- a/app/Views/variance_report_list.php +++ b/app/Views/variance_report_list.php @@ -237,7 +237,7 @@ extend: 'excel', text: ' EXCEL ', title: 'Variance-Report-List', - sheetName: 'Variance-Report-List', + sheetName: 'Variance-Report-List', // Sheet name customize: function(xlsx) { var sheet = xlsx.xl.worksheets['sheet1.xml']; var total = 0; From 33f77a472cc72b8391a78b3592f9c5ae67961c9f Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Wed, 12 Nov 2025 10:13:55 +0530 Subject: [PATCH 08/24] FIX_HR_CLIENT_DETAILS_ISSUE --- app/Controllers/EmployeeRestController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index 17755ad0..d401ec42 100755 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -1715,7 +1715,7 @@ class EmployeeRestController extends AdminController try { $client = $this->clientModel->where('id',$this->request->getGet('client_id'))->first(); - if($client) { + if(!empty($client)) { $client['client_logo'] = base_url().'public/uploads/logo/'.$client['client_logo']; $clientPolicy = $this->clientPolicyModel->where('client_id',$this->request->getGet('client_id')) ->where('client_branch_id',$this->request->getGet('client_branch_id'))->findAll(); From 538572c2748f19a34c858962b815163517a6ab3d Mon Sep 17 00:00:00 2001 From: venba-Inspriron-3558 Date: Wed, 12 Nov 2025 11:10:40 +0530 Subject: [PATCH 09/24] FIX_Implement search icon and clear icon toggle type --- app/Views/UserList.php | 12 ++++--- app/Views/add_image_list.php | 13 +++++--- app/Views/batch_list.php | 16 +++++---- app/Views/bds_multi_report.php | 16 +++++---- app/Views/bds_renewal_report_list.php | 33 +++++++++++-------- app/Views/bds_report_Insurer_wise_Data.php | 16 +++++---- app/Views/bds_report_bap_wise_data.php | 16 +++++---- app/Views/bds_tat_wise_report.php | 16 +++++---- app/Views/business_team_list.php | 13 +++++--- app/Views/cd_master_list.php | 16 +++++---- app/Views/claim_dump_file_list.php | 16 +++++---- app/Views/claims_report_acc_manager_wise.php | 16 +++++---- app/Views/claims_report_tpa_wise.php | 16 +++++---- app/Views/client_deposit_list.php | 18 ++++++---- app/Views/client_list.php | 17 ++++++---- app/Views/employee_data_list.php | 16 +++++---- app/Views/endorsement_list.php | 16 +++++---- app/Views/file_list.php | 16 +++++---- app/Views/finance_team_list.php | 12 ++++--- app/Views/hr_file_upload.php | 16 +++++---- app/Views/insurer_list.php | 16 +++++---- app/Views/irda_bap_client_report_list.php | 16 +++++---- app/Views/irda_bap_insurer_report_list.php | 16 +++++---- app/Views/irda_client_report_list.php | 16 +++++---- app/Views/kyc_list.php | 16 +++++---- app/Views/layout/footer.php | 24 ++++++++++++++ app/Views/layout/header.php | 6 ++++ app/Views/leads_list.php | 16 +++++---- app/Views/nhance_branch_list.php | 10 ++++-- app/Views/outstanding_report_list.php | 16 +++++---- .../policy_transaction_endorsement_list.php | 16 +++++---- .../policy_transaction_inception_list.php | 16 +++++---- app/Views/policy_type_list.php | 16 +++++---- app/Views/report_bds.php | 16 +++++---- app/Views/report_bds_new.php | 16 +++++---- app/Views/report_bds_old.php | 12 +++++-- app/Views/retail_endorsement_list.php | 16 +++++---- app/Views/rto_master_list.php | 10 ++++-- app/Views/tat_report_band_wise_list.php | 16 +++++---- app/Views/test_members_list.php | 16 +++++---- app/Views/thz_list.php | 16 +++++---- app/Views/ticket_feedback_list.php | 18 ++++++---- app/Views/ticket_history.php | 18 ++++++---- app/Views/ticket_list.php | 16 +++++---- app/Views/ticket_mail_template.php | 16 +++++---- app/Views/tpa_list.php | 14 +++++--- app/Views/variance_report_list.php | 18 ++++++---- app/Views/vehicle_master_list.php | 18 ++++++---- app/Views/vehicle_type_list.php | 14 +++++--- app/Views/vehicle_type_master_list.php | 12 ++++--- app/Views/view_deposit.php | 16 +++++---- 51 files changed, 517 insertions(+), 287 deletions(-) diff --git a/app/Views/UserList.php b/app/Views/UserList.php index 703d2c7a..d0dca952 100755 --- a/app/Views/UserList.php +++ b/app/Views/UserList.php @@ -949,12 +949,16 @@ table.dataTable tbody td { 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/add_image_list.php b/app/Views/add_image_list.php index 29d7c14c..46332236 100755 --- a/app/Views/add_image_list.php +++ b/app/Views/add_image_list.php @@ -236,13 +236,16 @@ $(document).ready(function() { } ], language: { - search: ` -
+ search: ` +
_INPUT_ - + +
`, - searchPlaceholder: "Search", - emptyTable: '
No Data found
' + searchPlaceholder: "Search", + emptyTable: '
No Data found
' }, paging: true }); diff --git a/app/Views/batch_list.php b/app/Views/batch_list.php index af6d3e64..6600162f 100755 --- a/app/Views/batch_list.php +++ b/app/Views/batch_list.php @@ -254,12 +254,16 @@ } ], language: { - search: ` -
- _INPUT_ - -
`, - searchPlaceholder: "Search" + search: ` +
+ _INPUT_ + + +
`, + searchPlaceholder: "Search", + emptyTable: '
No Data found
' }, paging: true }); diff --git a/app/Views/bds_multi_report.php b/app/Views/bds_multi_report.php index f05990cb..33fa456a 100644 --- a/app/Views/bds_multi_report.php +++ b/app/Views/bds_multi_report.php @@ -113,12 +113,16 @@ } ], language: { - search: ` -
- _INPUT_ - -
`, - searchPlaceholder: "Search" + search: ` +
+ _INPUT_ + + +
`, + searchPlaceholder: "Search", + emptyTable: '
No Data found
' }, paging: true, pageLength: 10, diff --git a/app/Views/bds_renewal_report_list.php b/app/Views/bds_renewal_report_list.php index 91c1b7b0..c11290a7 100644 --- a/app/Views/bds_renewal_report_list.php +++ b/app/Views/bds_renewal_report_list.php @@ -143,12 +143,16 @@ $(document).ready(function() { } ], language: { - search: ` -
- _INPUT_ - -
`, - searchPlaceholder: "Search" + search: ` +
+ _INPUT_ + + +
`, + searchPlaceholder: "Search", + emptyTable: '
No Data found
' }, paging: true, // Enable pagination pageLength: 20, // Set default number of rows per page (optional) @@ -162,14 +166,17 @@ $(document).ready(function() { // Global DataTables defaults $.extend(true, $.fn.dataTable.defaults, { language: { - search: ` -
- _INPUT_ - -
`, - searchPlaceholder: "Search" + search: ` +
+ _INPUT_ + + +
`, + searchPlaceholder: "Search", + emptyTable: '
No Data found
' }, - paging: true, pageLength: 10, ordering: false diff --git a/app/Views/bds_report_Insurer_wise_Data.php b/app/Views/bds_report_Insurer_wise_Data.php index 4fcf1320..d020fb8c 100644 --- a/app/Views/bds_report_Insurer_wise_Data.php +++ b/app/Views/bds_report_Insurer_wise_Data.php @@ -105,12 +105,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/bds_report_bap_wise_data.php b/app/Views/bds_report_bap_wise_data.php index b78ed3cd..928ad3a4 100644 --- a/app/Views/bds_report_bap_wise_data.php +++ b/app/Views/bds_report_bap_wise_data.php @@ -107,12 +107,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/bds_tat_wise_report.php b/app/Views/bds_tat_wise_report.php index ef236c6a..c47cc259 100644 --- a/app/Views/bds_tat_wise_report.php +++ b/app/Views/bds_tat_wise_report.php @@ -130,12 +130,16 @@ } ], language: { - search: ` -
- _INPUT_ - -
`, - searchPlaceholder: "Search" + search: ` +
+ _INPUT_ + + +
`, + searchPlaceholder: "Search", + emptyTable: '
No Data found
' }, paging: true, pageLength: 10, diff --git a/app/Views/business_team_list.php b/app/Views/business_team_list.php index 4329ecb6..3aeb2ed0 100644 --- a/app/Views/business_team_list.php +++ b/app/Views/business_team_list.php @@ -385,13 +385,16 @@ } ], language: { - search: ` -
+ search: ` +
_INPUT_ - + +
`, - searchPlaceholder: "Search", - emptyTable: '
No Data found
' + searchPlaceholder: "Search", + emptyTable: '
No Data found
' }, paging: true, pageLength: 10, diff --git a/app/Views/cd_master_list.php b/app/Views/cd_master_list.php index 922b9f68..c0ff4584 100755 --- a/app/Views/cd_master_list.php +++ b/app/Views/cd_master_list.php @@ -253,12 +253,16 @@ table.dataTable thead th { } ], language: { - search: ` -
- _INPUT_ - -
`, - searchPlaceholder: "Search" + search: ` +
+ _INPUT_ + + +
`, + searchPlaceholder: "Search", + emptyTable: '
No Data found
' }, paging: true, pageLength: 10, diff --git a/app/Views/claim_dump_file_list.php b/app/Views/claim_dump_file_list.php index 7a52530b..70282d89 100644 --- a/app/Views/claim_dump_file_list.php +++ b/app/Views/claim_dump_file_list.php @@ -297,12 +297,16 @@ } ], language: { - search: ` -
- _INPUT_ - -
`, - searchPlaceholder: "Search" + search: ` +
+ _INPUT_ + + +
`, + searchPlaceholder: "Search", + emptyTable: '
No Data found
' }, paging: true, // Enable pagination pageLength: 15, // Set default number of rows per page (optional) diff --git a/app/Views/claims_report_acc_manager_wise.php b/app/Views/claims_report_acc_manager_wise.php index 214948a9..177fe93f 100644 --- a/app/Views/claims_report_acc_manager_wise.php +++ b/app/Views/claims_report_acc_manager_wise.php @@ -99,12 +99,16 @@ } ], language: { - search: ` -
- _INPUT_ - -
`, - searchPlaceholder: "Search" + search: ` +
+ _INPUT_ + + +
`, + searchPlaceholder: "Search", + emptyTable: '
No Data found
' }, paging: true, pageLength: 10, diff --git a/app/Views/claims_report_tpa_wise.php b/app/Views/claims_report_tpa_wise.php index 603ff8ad..fbf5daa5 100644 --- a/app/Views/claims_report_tpa_wise.php +++ b/app/Views/claims_report_tpa_wise.php @@ -97,12 +97,16 @@ } ], language: { - search: ` -
- _INPUT_ - -
`, - searchPlaceholder: "Search" + search: ` +
+ _INPUT_ + + +
`, + searchPlaceholder: "Search", + emptyTable: '
No Data found
' }, paging: true, pageLength: 10, diff --git a/app/Views/client_deposit_list.php b/app/Views/client_deposit_list.php index 81c80750..c8be27ae 100755 --- a/app/Views/client_deposit_list.php +++ b/app/Views/client_deposit_list.php @@ -99,13 +99,17 @@ $(document).ready(function() { } ], language: { - search: ` -
- _INPUT_ - -
`, - searchPlaceholder: "Search" - }, + search: ` +
+ _INPUT_ + + +
`, + searchPlaceholder: "Search", + emptyTable: '
No Data found
' + }, }); diff --git a/app/Views/client_list.php b/app/Views/client_list.php index 237c2752..1a2f21f4 100755 --- a/app/Views/client_list.php +++ b/app/Views/client_list.php @@ -340,13 +340,16 @@ $(document).ready(function() } ], language: { - search: ` -
- _INPUT_ - -
`, - searchPlaceholder: "Search", - emptyTable: '
No Data found
' + search: ` +
+ _INPUT_ + + +
`, + searchPlaceholder: "Search", + emptyTable: '
No Data found
' }, paging: true , // pagingType: 'full_numbers' diff --git a/app/Views/employee_data_list.php b/app/Views/employee_data_list.php index 119716bc..4b594084 100755 --- a/app/Views/employee_data_list.php +++ b/app/Views/employee_data_list.php @@ -367,12 +367,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/endorsement_list.php b/app/Views/endorsement_list.php index 96f4899e..8512e000 100755 --- a/app/Views/endorsement_list.php +++ b/app/Views/endorsement_list.php @@ -650,12 +650,16 @@ }); }, language: { - search: ` -
- _INPUT_ - -
`, - searchPlaceholder: "Search" + search: ` +
+ _INPUT_ + + +
`, + searchPlaceholder: "Search", + emptyTable: '
No Data found
' }, paging: true, // pagingType: 'full_numbers' diff --git a/app/Views/file_list.php b/app/Views/file_list.php index 0b401026..52fb1940 100755 --- a/app/Views/file_list.php +++ b/app/Views/file_list.php @@ -485,12 +485,16 @@ $(document).ready(function() { } ], language: { - search: ` -
- _INPUT_ - -
`, - searchPlaceholder: "Search" + search: ` +
+ _INPUT_ + + +
`, + searchPlaceholder: "Search", + emptyTable: '
No Data found
' }, // "buttons": [{ // "extend": 'csv', diff --git a/app/Views/finance_team_list.php b/app/Views/finance_team_list.php index 0ec2aed9..6e6d2016 100644 --- a/app/Views/finance_team_list.php +++ b/app/Views/finance_team_list.php @@ -385,12 +385,16 @@ $(document).ready(function () { } ], language: { - search: ` -
+ search: ` +
_INPUT_ - + +
`, - searchPlaceholder: "Search" + searchPlaceholder: "Search", + emptyTable: '
No Data found
' }, paging: true, pageLength: 10, diff --git a/app/Views/hr_file_upload.php b/app/Views/hr_file_upload.php index dd0c7b33..9d5cf1e5 100644 --- a/app/Views/hr_file_upload.php +++ b/app/Views/hr_file_upload.php @@ -377,12 +377,16 @@ } ], language: { - search: ` -
- _INPUT_ - -
`, - searchPlaceholder: "Search" + search: ` +
+ _INPUT_ + + +
`, + searchPlaceholder: "Search", + emptyTable: '
No Data found
' }, paging: true, }); diff --git a/app/Views/insurer_list.php b/app/Views/insurer_list.php index 59727f76..bf145a61 100755 --- a/app/Views/insurer_list.php +++ b/app/Views/insurer_list.php @@ -211,12 +211,16 @@ } ], language: { - search: ` -
- _INPUT_ - -
`, - searchPlaceholder: "Search" + search: ` +
+ _INPUT_ + + +
`, + searchPlaceholder: "Search", + emptyTable: '
No Data found
' }, paging: true, }); diff --git a/app/Views/irda_bap_client_report_list.php b/app/Views/irda_bap_client_report_list.php index 25545c23..78f89695 100644 --- a/app/Views/irda_bap_client_report_list.php +++ b/app/Views/irda_bap_client_report_list.php @@ -237,12 +237,16 @@ $(document).ready(function() { } ], language: { - search: ` -
- _INPUT_ - -
`, - searchPlaceholder: "Search" + search: ` +
+ _INPUT_ + + +
`, + searchPlaceholder: "Search", + emptyTable: '
No Data found
' }, paging: true, // Enable pagination pageLength: 20, // Set default number of rows per page (optional) diff --git a/app/Views/irda_bap_insurer_report_list.php b/app/Views/irda_bap_insurer_report_list.php index 21253e6b..b57a2912 100644 --- a/app/Views/irda_bap_insurer_report_list.php +++ b/app/Views/irda_bap_insurer_report_list.php @@ -361,12 +361,16 @@ $(document).ready(function() { } ], language: { - search: ` -
- _INPUT_ - -
`, - searchPlaceholder: "Search" + search: ` +
+ _INPUT_ + + +
`, + searchPlaceholder: "Search", + emptyTable: '
No Data found
' }, paging: true, // Enable pagination pageLength: 20, // Set default number of rows per page (optional) diff --git a/app/Views/irda_client_report_list.php b/app/Views/irda_client_report_list.php index 17272497..09df1196 100644 --- a/app/Views/irda_client_report_list.php +++ b/app/Views/irda_client_report_list.php @@ -195,12 +195,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/kyc_list.php b/app/Views/kyc_list.php index 54339201..2e346371 100755 --- a/app/Views/kyc_list.php +++ b/app/Views/kyc_list.php @@ -207,12 +207,16 @@ } ], language: { - search: ` -
- _INPUT_ - -
`, - searchPlaceholder: "Search" + search: ` +
+ _INPUT_ + + +
`, + searchPlaceholder: "Search", + emptyTable: '
No Data found
' }, paging: true , }); diff --git a/app/Views/layout/footer.php b/app/Views/layout/footer.php index 5daf70cc..0fffbdc6 100755 --- a/app/Views/layout/footer.php +++ b/app/Views/layout/footer.php @@ -1210,6 +1210,30 @@ $(function(){ $(object).select2(); } + // SVR asked - Add padding to input so text doesn’t merge with icon + $(document).on('init.dt', function () { + $('.dataTables_filter input[type="search"]').css('padding-right', '30px'); + }); + + // SVR asked - Toggle icons + $(document).on('input', '.dataTables_filter input', function() { + const wrapper = $(this).closest('.datatable-search-wrapper'); + if ($(this).val()) { + wrapper.find('.datatable-search-icon').hide(); + wrapper.find('.datatable-clear-icon').show(); + } else { + wrapper.find('.datatable-search-icon').show(); + wrapper.find('.datatable-clear-icon').hide(); + } + }); + + // SVR asked - Clear search + $(document).on('click', '.datatable-clear-icon', function() { + const input = $(this).closest('.datatable-search-wrapper').find('input'); + input.val('').trigger('input'); + table.search('').draw(); + }); + diff --git a/app/Views/layout/header.php b/app/Views/layout/header.php index ba010a81..d81c7f68 100755 --- a/app/Views/layout/header.php +++ b/app/Views/layout/header.php @@ -1660,6 +1660,12 @@ .right-btn { right: 0; } + + input[type="search"]::-webkit-search-cancel-button { + -webkit-appearance: none; + appearance: none; + } + 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 10/24] 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 11/24] 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 12/24] 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 @@