From a394afbba2b92271c9a312b3bd15499dd86f41f0 Mon Sep 17 00:00:00 2001 From: Venkatesh Date: Sat, 18 Apr 2026 16:44:53 +0530 Subject: [PATCH 1/7] FIX_LIVE_CONCERNS_ISSUES --- app/Controllers/EmployeeRestController.php | 14 ++++++++++---- app/Controllers/FhplApiController.php | 4 +++- app/Controllers/HealthIndiaApiController.php | 3 +++ app/Controllers/MediAssistApiController.php | 1 + app/Controllers/TicketController.php | 3 ++- app/Controllers/TicketServiceController.php | 1 + app/Filters/GlobalPostFileUploadGuard.php | 2 +- .../AbhiClaimImportService.php | 2 +- .../FhplClaimImportService.php | 1 + .../IciciClaimImportService.php | 1 + .../MediAssistClaimImportService.php | 1 + .../RcareClaimImportService.php | 2 +- .../VidalClaimImportService.php | 4 +++- app/Models/TicketMasterModel.php | 2 ++ 14 files changed, 31 insertions(+), 10 deletions(-) diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index affdd7dc..c10bce7e 100755 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -3751,6 +3751,8 @@ class EmployeeRestController extends AdminController // $fetchData['relationship'] = strtolower($fetchData['relationship']) ?? $fetchData['relationship']; $fetchData['relationship'] = isset($fetchData['relationship']) ? strtolower($fetchData['relationship']) : null; + $fetchData['created_by'] = $fetchData['emp_id']; + $fetchData['claim_created_by'] = "USER"; // print_r($fetchData); die; $insert_status = $this->ticketMaster->insert($fetchData); @@ -4523,7 +4525,7 @@ class EmployeeRestController extends AdminController // print_r($post_data); die; - $ClientPolicyData = $this->clientPolicyModel + $Query = $this->clientPolicyModel ->select(" client_policy.id as client_policy_id , client_policy.client_id as client_id, @@ -4540,10 +4542,14 @@ class EmployeeRestController extends AdminController ->join('policy_type', 'policy_type.id = client_policy.policy_type_id', 'left') ->where('md5(client_policy.client_id)', $post_data['client_id']) ->where('client_policy.client_branch_id', $post_data['client_branch_id']) - ->where('client_policy.is_active', 1) + ->where('client_policy.is_active', 1); // ->where('client_policy.policy_status', $this->request->getGet('policy_status')) - ->whereIn('client_policy.id', $post_data['policy_id']) - ->first(); + if(is_array($post_data['policy_id'])){ + $Query->whereIn('client_policy.id', $post_data['policy_id']); + }else{ + $Query->where('client_policy.id', $post_data['policy_id']); + } + $ClientPolicyData = $Query->first(); if (empty($post_data['client_id'])) { return $this->respondCreated(['status' => false, 'message' => 'Client is required', 'data' => []]); diff --git a/app/Controllers/FhplApiController.php b/app/Controllers/FhplApiController.php index f43430f4..ec924017 100644 --- a/app/Controllers/FhplApiController.php +++ b/app/Controllers/FhplApiController.php @@ -785,7 +785,8 @@ class FhplApiController extends BaseController 'doa'=>$row['DATE_OF_ADMISSION'], 'dod'=>$row['DATE_OF_DISCHARGE'], 'claim_status_id'=>$claimStatus, - 'tpa_id'=>$this->fhplTpaId + 'tpa_id'=>$this->fhplTpaId, + 'claim_created_by'=>'TPA', ]); } @@ -974,6 +975,7 @@ class FhplApiController extends BaseController 'tpa_claim_type' => $row['CLAIM_TYPE'] ?? null, 'tpa_ailments' => $row['AILMENT'] ?? null, + 'claim_created_by' => 'TPA', 'created_at' => date('Y-m-d H:i:s'), ]; diff --git a/app/Controllers/HealthIndiaApiController.php b/app/Controllers/HealthIndiaApiController.php index 01e86c12..93adcd0a 100644 --- a/app/Controllers/HealthIndiaApiController.php +++ b/app/Controllers/HealthIndiaApiController.php @@ -20,6 +20,7 @@ class HealthIndiaApiController extends BaseController protected $db; protected $healthIndiaTpaId; protected $claim_type_array; + protected $ticketController; public function __construct() { @@ -802,6 +803,7 @@ class HealthIndiaApiController extends BaseController 'dod' => !empty($row['DATEOF_DISCHARGE']) ? date('Y-m-d', strtotime($row['DATEOF_DISCHARGE'])) : null, 'claim_status_id' => $claimStatus, 'tpa_id' => $this->healthIndiaTpaId, + 'claim_created_by'=> 'TPA', 'created_at' => date('Y-m-d H:i:s') ]); $insertedCount++; @@ -1010,6 +1012,7 @@ class HealthIndiaApiController extends BaseController // TPA extras 'tpa_claim_status' => $status, + 'claim_created_by' => 'TPA', 'created_at' => date('Y-m-d H:i:s'), ]; diff --git a/app/Controllers/MediAssistApiController.php b/app/Controllers/MediAssistApiController.php index e553b989..698f1043 100644 --- a/app/Controllers/MediAssistApiController.php +++ b/app/Controllers/MediAssistApiController.php @@ -1317,6 +1317,7 @@ class MediAssistApiController extends BaseController //others 'tpa_claim_type' => $value['typE_OF_CLAIM'], 'tpa_ailments' => ($value['ailment'] ?? '') . ' - ' . ($value['ailmenT_DESC'] ?? ''), + 'claim_created_by' => 'TPA', ]; diff --git a/app/Controllers/TicketController.php b/app/Controllers/TicketController.php index 146b748e..cae257e0 100644 --- a/app/Controllers/TicketController.php +++ b/app/Controllers/TicketController.php @@ -1492,6 +1492,7 @@ class TicketController extends BaseController if ($ticket_data) { + $ticket_data['claim_created_by'] = "CRM"; $return_value = $this->ticketMasterModel->insert($ticket_data); if ($return_value) { //mail trigger part @@ -1936,7 +1937,7 @@ class TicketController extends BaseController ]); } $data = $this->request->getPost(); - $received_data = sanitizeInputArrayAdvanced($data); + $received_data = sanitizeInputArrayAdvanced($data, ['mail_content']); if (isset($received_data['id']) && $received_data['id'] != '') { $status = $this->ticketMailTemplateModel->save($received_data); diff --git a/app/Controllers/TicketServiceController.php b/app/Controllers/TicketServiceController.php index 8e96a780..24e5e463 100644 --- a/app/Controllers/TicketServiceController.php +++ b/app/Controllers/TicketServiceController.php @@ -1440,6 +1440,7 @@ class TicketServiceController extends AdminController if(!empty($data)){ $data['file_id'] = $file_id; + $data['claim_created_by'] = "DUMP"; //insert the claim data to ticket master table $insert = $ticketMasterModal->insert($data); $inserted_claim_list[] = $insert; diff --git a/app/Filters/GlobalPostFileUploadGuard.php b/app/Filters/GlobalPostFileUploadGuard.php index d5b3f4c8..5b303056 100644 --- a/app/Filters/GlobalPostFileUploadGuard.php +++ b/app/Filters/GlobalPostFileUploadGuard.php @@ -136,7 +136,7 @@ class GlobalPostFileUploadGuard implements FilterInterface $response->setStatusCode(403) ->setJSON([ 'status' => 'error', - 'message' => 'File upload rejected: Security policy violation.', + 'message' => 'File upload rejected: Security policy violation.' . ($reason ? " Reason: $reason." : ''), 'debug' => (ENVIRONMENT === 'development') ? $reason : null ]) ->send(); diff --git a/app/Libraries/TPAClaimsImportServices/AbhiClaimImportService.php b/app/Libraries/TPAClaimsImportServices/AbhiClaimImportService.php index 103989bf..4f6ff966 100644 --- a/app/Libraries/TPAClaimsImportServices/AbhiClaimImportService.php +++ b/app/Libraries/TPAClaimsImportServices/AbhiClaimImportService.php @@ -366,7 +366,7 @@ class AbhiClaimImportService extends BaseTpaClaimImportService $item['priority'] = 1; $item['mode_of_intimation'] = 5; $item['ticket_type_id'] = 1; - + $item['claim_created_by'] = 'DUMP_TPA'; $mapped[] = $item; } diff --git a/app/Libraries/TPAClaimsImportServices/FhplClaimImportService.php b/app/Libraries/TPAClaimsImportServices/FhplClaimImportService.php index 7123230c..f2de776f 100644 --- a/app/Libraries/TPAClaimsImportServices/FhplClaimImportService.php +++ b/app/Libraries/TPAClaimsImportServices/FhplClaimImportService.php @@ -432,6 +432,7 @@ class FhplClaimImportService extends BaseTpaClaimImportService $item['priority'] = 1; $item['mode_of_intimation'] = 5; $item['ticket_type_id'] = 1; + $item['claim_created_by'] = 'DUMP_TPA'; $mapped[] = $item; } diff --git a/app/Libraries/TPAClaimsImportServices/IciciClaimImportService.php b/app/Libraries/TPAClaimsImportServices/IciciClaimImportService.php index 6e055139..736d9f5a 100644 --- a/app/Libraries/TPAClaimsImportServices/IciciClaimImportService.php +++ b/app/Libraries/TPAClaimsImportServices/IciciClaimImportService.php @@ -347,6 +347,7 @@ class IciciClaimImportService extends BaseTpaClaimImportService $item['priority'] = 1; $item['mode_of_intimation'] = 5; $item['ticket_type_id'] = 1; + $item['claim_created_by'] = 'DUMP_TPA'; $mapped[] = $item; } diff --git a/app/Libraries/TPAClaimsImportServices/MediAssistClaimImportService.php b/app/Libraries/TPAClaimsImportServices/MediAssistClaimImportService.php index 4a2952fb..a853ade6 100644 --- a/app/Libraries/TPAClaimsImportServices/MediAssistClaimImportService.php +++ b/app/Libraries/TPAClaimsImportServices/MediAssistClaimImportService.php @@ -380,6 +380,7 @@ class MediAssistClaimImportService extends BaseTpaClaimImportService $item['priority'] = 1; $item['mode_of_intimation'] = 5; $item['ticket_type_id'] = 1; + $item['claim_created_by'] = 'DUMP_TPA'; $mapped[] = $item; } diff --git a/app/Libraries/TPAClaimsImportServices/RcareClaimImportService.php b/app/Libraries/TPAClaimsImportServices/RcareClaimImportService.php index afe95c4f..dc9cf54a 100644 --- a/app/Libraries/TPAClaimsImportServices/RcareClaimImportService.php +++ b/app/Libraries/TPAClaimsImportServices/RcareClaimImportService.php @@ -332,7 +332,7 @@ class RcareClaimImportService extends BaseTpaClaimImportService $item['priority'] = 1; $item['mode_of_intimation'] = 5; $item['ticket_type_id'] = 1; - + $item['claim_created_by'] = 'DUMP_TPA'; $mapped[] = $item; } diff --git a/app/Libraries/TPAClaimsImportServices/VidalClaimImportService.php b/app/Libraries/TPAClaimsImportServices/VidalClaimImportService.php index 70a1340c..b263109c 100644 --- a/app/Libraries/TPAClaimsImportServices/VidalClaimImportService.php +++ b/app/Libraries/TPAClaimsImportServices/VidalClaimImportService.php @@ -573,6 +573,7 @@ class VidalClaimImportService extends BaseTpaClaimImportService $item['priority'] = 1; $item['mode_of_intimation'] = 5; $item['ticket_type_id'] = 1; + $item['claim_created_by'] = 'DUMP_TPA'; $mapped[] = $item; } @@ -687,7 +688,8 @@ class VidalClaimImportService extends BaseTpaClaimImportService $item['file_id'] = $file_id; $item['created_by'] = get_session_userid() ?? null; $item['claim_type'] = isset($row['mainclaim_prepost_type']) && !empty($row['mainclaim_prepost_type']) && strtolower($row['mainclaim_prepost_type']) == 'normal' ? 1 : 3; - + $item['claim_created_by'] = 'DUMP_TPA'; + $mapped[] = $item; } diff --git a/app/Models/TicketMasterModel.php b/app/Models/TicketMasterModel.php index d78402b6..475df9b1 100644 --- a/app/Models/TicketMasterModel.php +++ b/app/Models/TicketMasterModel.php @@ -95,6 +95,8 @@ class TicketMasterModel extends Model 'tpa_ailments', 'claim_dump_ref_id', 'last_updated_by', + 'tpa_shortfall_no', + 'claim_created_by', ]; From 1263a149b5bf1985a6f54e0ad4e42e9781fe0fc2 Mon Sep 17 00:00:00 2001 From: "sanjeev.p" Date: Sat, 18 Apr 2026 18:06:43 +0530 Subject: [PATCH 2/7] FIX_datatable = new helper + new js + new css --- app/Helpers/datatable_view_helper.php | 28 ++++ app/Views/add_image_list.php | 85 +++++++++- app/Views/bds_renewal_report_list.php | 89 ++++++++++- app/Views/cd_master_list.php | 86 +++++++++- app/Views/client_deposit_list.php | 83 +++++++++- app/Views/client_list.php | 93 +++++++++-- app/Views/employee_data_list.php | 147 +++++++++++++++++- app/Views/endorsement_list.php | 90 ++++++++++- app/Views/expense_list.php | 84 +++++++++- app/Views/faq_list.php | 91 ++++++++++- app/Views/frontend_content_list.php | 89 +++++++++-- app/Views/hr_file_upload.php | 74 ++++++++- app/Views/insurer_statement_list.php | 92 ++++++++++- app/Views/invoice_policy_mapping_add.php | 11 +- app/Views/kyc_list.php | 75 ++++++++- app/Views/layout/footer.php | 21 ++- app/Views/leads_list.php | 126 ++++++++++++++- app/Views/nhance_branch_list.php | 75 ++++++++- app/Views/outstanding_report_list.php | 84 +++++++++- app/Views/policy_type_list.php | 83 +++++++++- app/Views/pos_list.php | 77 ++++++++- app/Views/report_bds.php | 2 + app/Views/retail_endorsement_list.php | 116 ++++++++++++-- app/Views/rto_master_list.php | 79 +++++++++- app/Views/thz_list.php | 104 ++++++++++++- app/Views/variance_report_list.php | 87 ++++++++++- app/Views/vehicle_master_list.php | 82 +++++++++- app/Views/vehicle_type_list.php | 87 +++++++++-- .../assets/js/pages/nhance-list-datatable.js | 111 +++++++++++++ 29 files changed, 2193 insertions(+), 158 deletions(-) create mode 100644 app/Helpers/datatable_view_helper.php create mode 100644 public/assets/js/pages/nhance-list-datatable.js diff --git a/app/Helpers/datatable_view_helper.php b/app/Helpers/datatable_view_helper.php new file mode 100644 index 00000000..3089f4b1 --- /dev/null +++ b/app/Helpers/datatable_view_helper.php @@ -0,0 +1,28 @@ + $headerLabels + * @param array $maxLenPerCol Same length as $headerLabels + * @param array $minPx + * @param array $maxPx + * @return array + */ +function nhance_dt_column_widths_px(array $headerLabels, array $maxLenPerCol, array $minPx, array $maxPx): array +{ + $n = count($headerLabels); + $out = []; + for ($i = 0; $i < $n; $i++) { + $chars = max($maxLenPerCol[$i] ?? 0, mb_strlen($headerLabels[$i])); + $px = (int) round($chars * 7.0 + 26); + $out[] = min( + (int) ($maxPx[$i] ?? 640), + max((int) ($minPx[$i] ?? 48), $px) + ); + } + + return $out; +} diff --git a/app/Views/add_image_list.php b/app/Views/add_image_list.php index 4417e947..43b32fe5 100755 --- a/app/Views/add_image_list.php +++ b/app/Views/add_image_list.php @@ -1,3 +1,27 @@ +
@@ -22,7 +85,7 @@
--> - +
@@ -338,7 +401,8 @@ $('#add_image_id').val(''); $('#client_id').val(null).trigger('change'); $('#advertise_image').val(''); - table = $('#tickets-table').DataTable({ + nhanceListDataTableBeforeInit(); + table = $('#add-image-list-table').DataTable(nhanceMergeListDataTableOptions({ // 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>>", @@ -372,15 +436,22 @@ next: '►' } }, - paging: true - }); + paging: true, + columnDefs: [ + + { targets: , width: 'px' }, + + ], + })); + nhanceListDataTableAfterInit(); + nhanceListDataTableBindAdjust(table); function applyBottomRowDropup() { if (!table) return; const currentRows = table.rows({ page: 'current' }).nodes().toArray(); - $('#tickets-table tbody tr').removeClass('nh-force-dropup'); - $('#tickets-table tbody tr td.table-action-cell .btn-group.dropdown').removeClass('dropup'); + $('#add-image-list-table tbody tr').removeClass('nh-force-dropup'); + $('#add-image-list-table tbody tr td.table-action-cell .btn-group.dropdown').removeClass('dropup'); const targetCount = Math.min(2, currentRows.length); for (let i = 0; i < targetCount; i++) { @@ -392,7 +463,7 @@ } applyBottomRowDropup(); - $('#tickets-table').on('draw.dt', applyBottomRowDropup); + $('#add-image-list-table').on('draw.dt', applyBottomRowDropup); }); // ✅ Define your modal function separately diff --git a/app/Views/bds_renewal_report_list.php b/app/Views/bds_renewal_report_list.php index 16bb337a..40464f77 100644 --- a/app/Views/bds_renewal_report_list.php +++ b/app/Views/bds_renewal_report_list.php @@ -1,3 +1,41 @@ + $row) { + $bds_col_max_len[0] = max($bds_col_max_len[0], mb_strlen((string) ($index + 1))); + $rm = empty($row['policy_end_date']) ? ' - ' : date('M-Y', strtotime((string) $row['policy_end_date'])); + $bds_col_max_len[1] = max($bds_col_max_len[1], mb_strlen($rm)); + $bds_col_max_len[2] = max($bds_col_max_len[2], mb_strlen((string) ($issuer[$row['issuer']] ?? ' - '))); + $bds_col_max_len[3] = max($bds_col_max_len[3], mb_strlen((string) ($row['policy_no'] ?? ' - '))); + $bds_col_max_len[4] = max($bds_col_max_len[4], mb_strlen((string) ($row['policy_type'] ?? ' - '))); + $bds_col_max_len[5] = max($bds_col_max_len[5], mb_strlen((string) ($row['insurer_name'] ?? ' - '))); + $bds_col_max_len[6] = max($bds_col_max_len[6], mb_strlen((string) ($row['insurer_branch_name'] ?? ' - '))); + $bds_col_max_len[7] = max($bds_col_max_len[7], mb_strlen((string) ($row['client_name'] ?? ' - '))); + $bds_col_max_len[8] = max($bds_col_max_len[8], mb_strlen((string) ($client_type[$row['client_type'] ?? ''] ?? '-'))); + $bds_col_max_len[9] = max($bds_col_max_len[9], mb_strlen((string) ($row['revenue_type'] ?? ' - '))); + $bds_col_max_len[10] = max($bds_col_max_len[10], mb_strlen(empty($row['policy_issue_date']) ? '' : date('d/m/Y', strtotime((string) $row['policy_issue_date'])))); + $bds_col_max_len[11] = max($bds_col_max_len[11], mb_strlen(empty($row['policy_start_date']) ? '' : date('d/m/Y', strtotime((string) $row['policy_start_date'])))); + $bds_col_max_len[12] = max($bds_col_max_len[12], mb_strlen(empty($row['policy_end_date']) ? '' : date('d/m/Y', strtotime((string) $row['policy_end_date'])))); + $bds_col_max_len[13] = max($bds_col_max_len[13], mb_strlen((string) ($row['vehicle_no'] ?? ' - '))); + $bds_col_max_len[14] = max($bds_col_max_len[14], mb_strlen((string) ucfirst((string) ($row['lead_status'] ?? ' - ')))); +} +$bds_col_min_px = array_fill(0, $bds_col_count, 80); +$bds_col_min_px[0] = 48; +$bds_col_max_px = array_fill(0, $bds_col_count, 360); +$bds_col_max_px[0] = 64; +$bds_col_width_px = nhance_dt_column_widths_px($bds_header_labels, $bds_col_max_len, $bds_col_min_px, $bds_col_max_px); +?> + +
@@ -28,7 +98,7 @@ table.dataTable tbody td {
-->
-
Advertisement Image Name 
+
- @@ -114,11 +184,11 @@ table.dataTable tbody td { // Datatable document ready $(document).ready(function() { - var ticketsTable = $('#scroll-horizontal-datatable'); + var ticketsTable = $('#bds-renewal-report-list-table'); if (ticketsTable.length) { - ticketsTable.DataTable({ - scrollX: true, + nhanceListDataTableBeforeInit(); + var nhBdsRenewalTable = ticketsTable.DataTable(nhanceMergeListDataTableOptions({ // dom: "<'row'<'col-sm-2'f><'col-sm-10 text-right'B>>" + // Filter left, buttons right // "<'row'<'col-sm-12'tr>>" + // "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector @@ -163,7 +233,14 @@ $(document).ready(function() { paging: true, // Enable pagination pageLength: 20, // Set default number of rows per page (optional) ordering: true, - }); + columnDefs: [ + + { targets: , width: 'px' }, + + ], + })); + nhanceListDataTableAfterInit(); + nhanceListDataTableBindAdjust(nhBdsRenewalTable); } else { console.error("Table atet found."); } diff --git a/app/Views/cd_master_list.php b/app/Views/cd_master_list.php index 906d86d3..81f68346 100755 --- a/app/Views/cd_master_list.php +++ b/app/Views/cd_master_list.php @@ -1,3 +1,34 @@ + $row) { + $cdm_col_max_len[0] = max($cdm_col_max_len[0], mb_strlen((string) ($index + 1))); + $clientCell = ($row['client_name'] ?? '') . '( ' . ($row['short_name'] ?? '') . ' )'; + $cdm_col_max_len[1] = max($cdm_col_max_len[1], mb_strlen($clientCell)); + $cdm_col_max_len[2] = max($cdm_col_max_len[2], mb_strlen((string) ($row['insurer_name'] ?? ''))); + $cdm_col_max_len[3] = max($cdm_col_max_len[3], mb_strlen((string) ($row['insurer_branch_name'] ?? ''))); + $od = ! empty($row['opening_date']) ? date('d-m-Y', strtotime((string) $row['opening_date'])) : ''; + $cdm_col_max_len[4] = max($cdm_col_max_len[4], mb_strlen($od)); + $cdm_col_max_len[5] = max($cdm_col_max_len[5], mb_strlen((string) ($row['cd_ac_no'] ?? ''))); + $cdm_col_max_len[6] = max($cdm_col_max_len[6], mb_strlen((string) ($row['opening_bal'] ?? ''))); + $du = ! empty($row['created_at']) + ? (date('d-M-Y h:i A', strtotime((string) $row['created_at'])) . ' by ' . ($row['user_name'] ?? '')) + : ''; + $cdm_col_max_len[7] = max($cdm_col_max_len[7], mb_strlen($du)); + $cdm_col_max_len[8] = max($cdm_col_max_len[8], 4); +} +$cdm_col_min_px = [48, 140, 120, 140, 100, 120, 100, 200, 72]; +$cdm_col_max_px = [64, 400, 320, 360, 120, 200, 160, 480, 88]; +$cdm_col_width_px = nhance_dt_column_widths_px($cdm_header_labels, $cdm_col_max_len, $cdm_col_min_px, $cdm_col_max_px); +?> + +
@@ -28,7 +97,7 @@
--> -
@@ -83,7 +153,7 @@ table.dataTable tbody td { $row) { ?>
+
+
@@ -80,8 +149,8 @@ $(document).ready(function() { - var table = $('#scroll-horizontal-datatable').DataTable({ - scrollX: true, + nhanceListDataTableBeforeInit(); + var table = $('#scroll-horizontal-datatable').DataTable(nhanceMergeListDataTableOptions({ // dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // "<'row'<'col-sm-12'tr>>" + // "<'row'<'col-sm-5'i><'col-sm-7'p>>", @@ -141,7 +210,12 @@ }, paging: true, pageLength: 10, - order: [[0, 'desc']] + order: [[0, 'desc']], + columnDefs: [ + + { targets: , width: 'px' }, + + ], // scrollX: true, // dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // "<'row'<'col-sm-12'tr>>" + @@ -169,7 +243,9 @@ // searchPlaceholder: "Search..." // }, // paging: true, - }); + })); + nhanceListDataTableAfterInit(); + nhanceListDataTableBindAdjust(table); function applyBottomRowDropup() { if (!table) return; diff --git a/app/Views/client_deposit_list.php b/app/Views/client_deposit_list.php index c5302d9e..e02041cc 100755 --- a/app/Views/client_deposit_list.php +++ b/app/Views/client_deposit_list.php @@ -1,3 +1,72 @@ +insurer_name ?? ''))); + $cd_col_max_len[1] = max($cd_col_max_len[1], mb_strlen((string) ($value->insurer_branch_name ?? ''))); + $cd_col_max_len[2] = max($cd_col_max_len[2], mb_strlen((string) ($value->cd_master_account_no ?? ''))); + $insurerId = $value->insurer_id; + $cd_ac_pk = $value->cd_ac_pk; + $balStr = 'N/A'; + if (isset($balances[$insurerId . '-' . $cd_ac_pk])) { + $balStr = (string) ($balances[$insurerId . '-' . $cd_ac_pk]->balance ?? ''); + } + $balDisplay = '₹ ' . $balStr; + $cd_col_max_len[3] = max($cd_col_max_len[3], mb_strlen($balDisplay)); + $cd_col_max_len[4] = max($cd_col_max_len[4], mb_strlen('View Deposit')); +} +$cd_col_min_px = [100, 120, 120, 100, 120]; +$cd_col_max_px = [240, 280, 280, 200, 160]; +$cd_col_width_px = nhance_dt_column_widths_px($cd_header_labels, $cd_col_max_len, $cd_col_min_px, $cd_col_max_px); +?> + -
+
-

+
diff --git a/app/Views/kyc_list.php b/app/Views/kyc_list.php index 7754f2a8..ec621cd3 100755 --- a/app/Views/kyc_list.php +++ b/app/Views/kyc_list.php @@ -1,3 +1,22 @@ + + +
@@ -50,7 +107,7 @@
-->

S.No 
+ id="kyc-list-table"> @@ -83,7 +140,7 @@ + + + diff --git a/app/Views/leads_list.php b/app/Views/leads_list.php index 42f32f88..c9459190 100644 --- a/app/Views/leads_list.php +++ b/app/Views/leads_list.php @@ -1,3 +1,55 @@ + $row) { + $leads_col_max_len[0] = max($leads_col_max_len[0], mb_strlen((string) ($index + 1))); + $leads_col_max_len[1] = max($leads_col_max_len[1], mb_strlen((string) ($lead_type[$row['lead_type'] ?? ''] ?? '-'))); + $leads_col_max_len[2] = max($leads_col_max_len[2], mb_strlen((string) ($issuer[$row['issuer'] ?? ''] ?? '-'))); + $leads_col_max_len[3] = max($leads_col_max_len[3], mb_strlen((string) ($client_type[$row['client_type'] ?? ''] ?? '-'))); + $clientBranch = (isset($row['client_type']) && (int) $row['client_type'] === 2) + ? (string) ($row['client_name'] ?? '-') + : (string) (($row['client_short_name'] ?? '-') . ' - ' . ($row['branch_name'] ?? '-')); + $leads_col_max_len[4] = max($leads_col_max_len[4], mb_strlen($clientBranch)); + $leads_col_max_len[5] = max($leads_col_max_len[5], mb_strlen((string) ($row['entity_type'] ?? '-'))); + $leads_col_max_len[6] = max($leads_col_max_len[6], mb_strlen((string) ($row['branch_name'] ?? '-'))); + $leads_col_max_len[7] = max($leads_col_max_len[7], mb_strlen((string) ($row['branch_code'] ?? '-'))); + $leads_col_max_len[8] = max($leads_col_max_len[8], mb_strlen((string) ($row['contact_person_name'] ?? '-'))); + $leads_col_max_len[9] = max($leads_col_max_len[9], mb_strlen((string) ($row['contact_person_mobile'] ?? '-'))); + $leads_col_max_len[10] = max($leads_col_max_len[10], mb_strlen((string) ($row['policy_type'] ?? '-'))); + $leads_col_max_len[11] = max($leads_col_max_len[11], mb_strlen((string) ($lead_status[$row['status'] ?? ''] ?? '-'))); + $leads_col_max_len[12] = max($leads_col_max_len[12], 4); + } +} + +$leads_col_min_px = [48, 72, 88, 72, 120, 88, 96, 72, 120, 100, 120, 96, 52]; +$leads_col_max_px = [64, 220, 180, 140, 520, 200, 240, 120, 280, 130, 280, 200, 72]; +$leads_col_width_px = []; +for ($i = 0; $i < $leads_col_count; $i++) { + $chars = max($leads_col_max_len[$i], mb_strlen($leads_header_labels[$i])); + $px = (int) round($chars * 7.0 + 26); + $leads_col_width_px[$i] = min( + $leads_col_max_px[$i], + max($leads_col_min_px[$i], $px) + ); +} +?> @@ -134,7 +240,7 @@
-
Name
+
@@ -716,10 +822,11 @@ // Datatable document ready $(document).ready(function() { - var ticketsTable = $('#tickets-table'); + var ticketsTable = $('#leads-list-table'); if (ticketsTable.length) { - table = ticketsTable.DataTable({ + nhanceListDataTableBeforeInit(); + table = ticketsTable.DataTable(nhanceMergeListDataTableOptions({ // dom: "<'row'<'col-sm-7'f><'col-sm-5 text-right'B>>" + // Filter left, buttons right // "<'row'<'col-sm-12'tr>>" + // "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector @@ -778,14 +885,21 @@ paging: true, // Enable pagination pageLength: 10, // Set default number of rows per page (optional) // ordering: false, - }); + columnDefs: [ + + { targets: , width: 'px' }, + + ], + })); + nhanceListDataTableAfterInit(); + nhanceListDataTableBindAdjust(table); function applyBottomRowDropup() { if (!table) return; const currentRows = table.rows({ page: 'current' }).nodes().toArray(); - $('#tickets-table tbody tr').removeClass('nh-force-dropup'); - $('#tickets-table tbody tr td.table-action-cell .btn-group.dropdown').removeClass('dropup'); + $('#leads-list-table tbody tr').removeClass('nh-force-dropup'); + $('#leads-list-table tbody tr td.table-action-cell .btn-group.dropdown').removeClass('dropup'); const targetCount = Math.min(2, currentRows.length); for (let i = 0; i < targetCount; i++) { diff --git a/app/Views/nhance_branch_list.php b/app/Views/nhance_branch_list.php index bd302e8a..4addfaf9 100644 --- a/app/Views/nhance_branch_list.php +++ b/app/Views/nhance_branch_list.php @@ -1,8 +1,66 @@ + @@ -10,7 +68,7 @@
-
+
@@ -96,9 +154,9 @@ \ No newline at end of file + diff --git a/app/Views/tpa_list.php b/app/Views/tpa_list.php index c369c606..6f907c54 100755 --- a/app/Views/tpa_list.php +++ b/app/Views/tpa_list.php @@ -1,3 +1,23 @@ + +
@@ -50,7 +97,7 @@
-->
S.No.
+ id="tpa-list-table"> @@ -87,7 +134,10 @@ \ No newline at end of file diff --git a/app/Views/frontend_content_list.php b/app/Views/frontend_content_list.php index b0b38da8..695feb65 100644 --- a/app/Views/frontend_content_list.php +++ b/app/Views/frontend_content_list.php @@ -90,7 +90,7 @@ $fec_col_width_px = nhance_dt_column_widths_px($fec_header_labels, $fec_col_max_ $row) { ?> - + diff --git a/app/Views/insurer_export_templete.php b/app/Views/insurer_export_templete.php index 73d725e1..5edcc832 100755 --- a/app/Views/insurer_export_templete.php +++ b/app/Views/insurer_export_templete.php @@ -111,7 +111,7 @@ $value ){ ?> - + diff --git a/app/Views/insurer_list.php b/app/Views/insurer_list.php index 755a514c..b0611e6b 100755 --- a/app/Views/insurer_list.php +++ b/app/Views/insurer_list.php @@ -65,6 +65,17 @@ $ins_col_width_px = nhance_dt_column_widths_px($ins_header_labels, $ins_col_max_ overflow: visible; text-overflow: clip; } +#insurer-list-table tbody td { + padding: 5px 11px !important; + font-size: 13px; + line-height: 1.25; +} +#insurer-list-table_wrapper .dataTables_scrollHead table thead th, +#insurer-list-table thead th { + padding: 5px 2.35rem 5px 11px !important; + font-size: 13px; + line-height: 1.25; +}
diff --git a/app/Views/invoice_template.php b/app/Views/invoice_template.php index 865ab921..3a61a602 100644 --- a/app/Views/invoice_template.php +++ b/app/Views/invoice_template.php @@ -359,7 +359,7 @@ body { $page_break_class = (($serial % $records_per_page) == 0 && $serial != count($policies)) ? 'page-break' : ''; ?>
- + diff --git a/app/Views/leads_list.php b/app/Views/leads_list.php index c9459190..b496dfe4 100644 --- a/app/Views/leads_list.php +++ b/app/Views/leads_list.php @@ -264,7 +264,7 @@ for ($i = 0; $i < $leads_col_count; $i++) { $row) {?> - - + - + diff --git a/app/Views/policy_transaction_endorsement_list_2.php b/app/Views/policy_transaction_endorsement_list_2.php index 8e26b2c3..38b7afb4 100644 --- a/app/Views/policy_transaction_endorsement_list_2.php +++ b/app/Views/policy_transaction_endorsement_list_2.php @@ -325,7 +325,7 @@ table.dataTable thead th { $row) { ?> - + diff --git a/app/Views/pos_list.php b/app/Views/pos_list.php index 7a872e19..d989318f 100644 --- a/app/Views/pos_list.php +++ b/app/Views/pos_list.php @@ -111,7 +111,7 @@ $pos_col_width_px = nhance_dt_column_widths_px($pos_header_labels, $pos_col_max_ $row) { ?> - + diff --git a/app/Views/rto_master_list.php b/app/Views/rto_master_list.php index 1f1b8084..e5b2b2dd 100644 --- a/app/Views/rto_master_list.php +++ b/app/Views/rto_master_list.php @@ -85,7 +85,7 @@ $rto_col_width_px = nhance_dt_column_widths_px($rto_header_labels, $rto_col_max_ $row) { ?> - + diff --git a/app/Views/thz_list.php b/app/Views/thz_list.php index e53ce222..1aa69b4c 100644 --- a/app/Views/thz_list.php +++ b/app/Views/thz_list.php @@ -166,7 +166,7 @@ beccause = dataTables_length and dataTables_paginate need in same line thats why $row){ ?> - + - + diff --git a/app/Views/vehicle_master_list.php b/app/Views/vehicle_master_list.php index b880c50e..6e29f5b8 100644 --- a/app/Views/vehicle_master_list.php +++ b/app/Views/vehicle_master_list.php @@ -60,15 +60,15 @@ $vm_col_width_px = nhance_dt_column_widths_px($vm_header_labels, $vm_col_max_len ?>
Name
+ $log): ?>
View | diff --git a/app/Views/nhance_branch_list.php b/app/Views/nhance_branch_list.php index 4addfaf9..dc0190c1 100644 --- a/app/Views/nhance_branch_list.php +++ b/app/Views/nhance_branch_list.php @@ -81,7 +81,7 @@ $nb_col_width_px = nhance_dt_column_widths_px($nb_header_labels, $nb_col_max_len $row) { ?>

diff --git a/app/Views/tpa_list.php b/app/Views/tpa_list.php index 6f907c54..8b17f04c 100755 --- a/app/Views/tpa_list.php +++ b/app/Views/tpa_list.php @@ -85,6 +85,17 @@ $tpa_col_width_px = nhance_dt_column_widths_px($tpa_header_labels, $tpa_col_max_ overflow: visible; text-overflow: clip; } +#tpa-list-table tbody td { + padding: 5px 11px !important; + font-size: 13px; + line-height: 1.25; +} +#tpa-list-table_wrapper .dataTables_scrollHead table thead th, +#tpa-list-table thead th { + padding: 5px 2.35rem 5px 11px !important; + font-size: 13px; + line-height: 1.25; +}
diff --git a/app/Views/variance_report_list.php b/app/Views/variance_report_list.php index 307c5d3d..446b0930 100644 --- a/app/Views/variance_report_list.php +++ b/app/Views/variance_report_list.php @@ -376,7 +376,7 @@ $vr_col_width_px = nhance_dt_column_widths_px($vr_header_labels, $vr_col_max_len $row){ ?>