diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index 8dea0d8a..7d5e4c97 100755 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -3726,6 +3726,7 @@ class EmployeeRestController extends AdminController if (! empty($emp_ticket_data)) { + $received_relationship = $received_data['relationship'] ?? null; unset($received_data['relationship']); $fetchData = $emp_ticket_data[0]; @@ -3753,8 +3754,10 @@ class EmployeeRestController extends AdminController $fetchData = array_merge($fetchData, $received_data); - // $fetchData['relationship'] = strtolower($fetchData['relationship']) ?? $fetchData['relationship']; - $fetchData['relationship'] = isset($fetchData['relationship']) ? strtolower($fetchData['relationship']) : null; + // $fetchData['relationship'] = isset($fetchData['relationship']) ? strtolower($fetchData['relationship']) : null; + $fetchData['relationship'] = strtolower($received_relationship ?? $fetchData['relationship'] ?? '') ?: null; + $fetchData['created_by'] = $fetchData['emp_id']; + $fetchData['claim_created_by'] = "USER"; // print_r($fetchData); die; $insert_status = $this->ticketMaster->insert($fetchData); @@ -4527,7 +4530,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, @@ -4544,10 +4547,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 0589b80e..532776ff 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 ed5f7e1a..0552700a 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 4fb227b2..9bc8e4f9 100644 --- a/app/Controllers/MediAssistApiController.php +++ b/app/Controllers/MediAssistApiController.php @@ -695,6 +695,7 @@ class MediAssistApiController extends BaseController $fileData = $this->db->table('claim_files f') ->where('f.ticket_id', $claimId) ->where('f.docs_for_ir', 1) + ->where('f.file_type', 2) // PDF ->get() ->getResultArray(); @@ -1317,6 +1318,7 @@ class MediAssistApiController extends BaseController //others 'tpa_claim_type' => $value['typE_OF_CLAIM'], 'tpa_ailments' => ($value['ailment'] ?? '') . ' - ' . ($value['ailmenT_DESC'] ?? ''), + 'claim_created_by' => 'TPA', 'tpa_claim_push_reference_no' => $value['clM_COMP_REFNO'] ?? null, diff --git a/app/Controllers/TicketController.php b/app/Controllers/TicketController.php index 4302a338..d46306d4 100644 --- a/app/Controllers/TicketController.php +++ b/app/Controllers/TicketController.php @@ -503,6 +503,7 @@ class TicketController extends BaseController 'tm.id', 'tm.ticket_type_id', 'tm.claim_status_id', + 'tm.claim_created_by', 'tm.is_head_approved', 'tcs.claim_status AS status', 'tm.claim_number AS claim_no', @@ -640,6 +641,7 @@ class TicketController extends BaseController 'tcs.claim_status AS status', 'tm.claim_number AS claim_no', 'tm.claim_status_id', + 'tm.claim_created_by', 'tm.is_head_approved', 'tm.tpa_id', 'tm.tpa_no', @@ -1138,6 +1140,8 @@ class TicketController extends BaseController public function createTicket() { $request_data = $this->request->getPost(); + $approvedLetterFile = $this->request->getFile('approved_letter_file'); + $settleLetterFile = $this->request->getFile('settle_letter_file'); $selected_ticket_type = $this->request->getPost('ticket_type_id'); // 1. Initialize an empty rules array @@ -1453,6 +1457,84 @@ class TicketController extends BaseController $request_data = $this->request->getPost(); $sanitized_data = sanitizeInputArrayAdvanced($request_data); $ticket_data = $this->formatDateForClaim($sanitized_data); + $approvedLetterUrl = trim((string) ($ticket_data['approved_letter'] ?? '')); + $settleLetterUrl = trim((string) ($ticket_data['settle_letter'] ?? '')); + $hasApprovedLetterFile = $approvedLetterFile !== null + && $approvedLetterFile->isValid() + && $approvedLetterFile->getError() !== UPLOAD_ERR_NO_FILE; + $hasSettleLetterFile = $settleLetterFile !== null + && $settleLetterFile->isValid() + && $settleLetterFile->getError() !== UPLOAD_ERR_NO_FILE; + + if ($approvedLetterUrl !== '' && $hasApprovedLetterFile) { + return $this->response->setStatusCode(400)->setJSON([ + 'status' => false, + 'message' => 'Input validation failed', + 'code' => 400, + 'errors' => ['approved_letter' => 'Provide either Approved Letter URL or Approved Letter PDF file, not both.'], + ]); + } + + if ($approvedLetterUrl !== '' && ! $this->isClaimUploadUrl($approvedLetterUrl)) { + return $this->response->setStatusCode(400)->setJSON([ + 'status' => false, + 'message' => 'Input validation failed', + 'code' => 400, + 'errors' => ['approved_letter' => 'Approved Letter URL format is invalid.'], + ]); + } + + if ($settleLetterUrl !== '' && $hasSettleLetterFile) { + return $this->response->setStatusCode(400)->setJSON([ + 'status' => false, + 'message' => 'Input validation failed', + 'code' => 400, + 'errors' => ['settle_letter' => 'Provide either Settle Letter URL or Settle Letter PDF file, not both.'], + ]); + } + + if ($settleLetterUrl !== '' && ! $this->isClaimUploadUrl($settleLetterUrl)) { + return $this->response->setStatusCode(400)->setJSON([ + 'status' => false, + 'message' => 'Input validation failed', + 'code' => 400, + 'errors' => ['settle_letter' => 'Settle Letter URL format is invalid.'], + ]); + } + + $uploadedApprovedLetter = null; + if ($hasApprovedLetterFile) { + $uploadResult = $this->uploadApprovedLetterPdf($approvedLetterFile, 'Approved Letter'); + if (! ($uploadResult['status'] ?? false)) { + return $this->response->setStatusCode(400)->setJSON([ + 'status' => false, + 'message' => 'Input validation failed', + 'code' => 400, + 'errors' => ['approved_letter_file' => $uploadResult['message'] ?? 'Invalid Approved Letter file.'], + ]); + } + $uploadedApprovedLetter = $uploadResult['data']; + $ticket_data['approved_letter'] = ''; + } else { + $ticket_data['approved_letter'] = $approvedLetterUrl; + } + + $uploadedSettleLetter = null; + if ($hasSettleLetterFile) { + $uploadResult = $this->uploadApprovedLetterPdf($settleLetterFile, 'Settle Letter'); + if (! ($uploadResult['status'] ?? false)) { + return $this->response->setStatusCode(400)->setJSON([ + 'status' => false, + 'message' => 'Input validation failed', + 'code' => 400, + 'errors' => ['settle_letter_file' => $uploadResult['message'] ?? 'Invalid Settle Letter file.'], + ]); + } + $uploadedSettleLetter = $uploadResult['data']; + $ticket_data['settle_letter'] = ''; + } else { + $ticket_data['settle_letter'] = $settleLetterUrl; + } // $ticket_data = $this->getLastMatchedStatus($ticket_data, ); // print_rr($ticket_data); die; @@ -1494,8 +1576,40 @@ class TicketController extends BaseController if ($ticket_data) { + $ticket_data['claim_created_by'] = "CRM"; $return_value = $this->ticketMasterModel->insert($ticket_data); if ($return_value) { + if ($uploadedApprovedLetter !== null) { + $approvedLetterDownloadUrl = $this->createApprovedLetterFileUrl( + (int) $return_value, + (int) ($ticket_data['ticket_type_id'] ?? 1), + $uploadedApprovedLetter, + 'APPROVED_LETTER_PDF' + ); + $ticket_data['approved_letter'] = $approvedLetterDownloadUrl; + } + + if ($uploadedSettleLetter !== null) { + $settleLetterDownloadUrl = $this->createApprovedLetterFileUrl( + (int) $return_value, + (int) ($ticket_data['ticket_type_id'] ?? 1), + $uploadedSettleLetter, + 'SETTLE_LETTER_PDF' + ); + $ticket_data['settle_letter'] = $settleLetterDownloadUrl; + } + + if ($uploadedApprovedLetter !== null || $uploadedSettleLetter !== null) { + $updateUploadedLetterData = []; + if (isset($ticket_data['approved_letter'])) { + $updateUploadedLetterData['approved_letter'] = $ticket_data['approved_letter']; + } + if (isset($ticket_data['settle_letter'])) { + $updateUploadedLetterData['settle_letter'] = $ticket_data['settle_letter']; + } + $this->ticketMasterModel->where('id', $return_value)->set($updateUploadedLetterData)->update(); + } + //mail trigger part $this->putHistoryAfterInsert($ticket_data, $return_value); $mail_responce = $this->sendAutoMailTrigger($return_value); @@ -1514,6 +1628,8 @@ class TicketController extends BaseController { $request_data = $this->request->getPost(); + $approvedLetterFile = $this->request->getFile('approved_letter_file'); + $settleLetterFile = $this->request->getFile('settle_letter_file'); $selected_ticket_type = $this->request->getPost('ticket_type_id'); // 1. Initialize an empty rules array @@ -1829,6 +1945,85 @@ class TicketController extends BaseController $sanitized_data = sanitizeInputArrayAdvanced($request_data); $ticket_data = $this->formatDateForClaim($sanitized_data); $ticket_id = $this->request->getPost('ticket_master_id'); + $approvedLetterUrl = trim((string) ($ticket_data['approved_letter'] ?? '')); + $settleLetterUrl = trim((string) ($ticket_data['settle_letter'] ?? '')); + $hasApprovedLetterFile = $approvedLetterFile !== null + && $approvedLetterFile->isValid() + && $approvedLetterFile->getError() !== UPLOAD_ERR_NO_FILE; + $hasSettleLetterFile = $settleLetterFile !== null + && $settleLetterFile->isValid() + && $settleLetterFile->getError() !== UPLOAD_ERR_NO_FILE; + + if ($approvedLetterUrl !== '' && $hasApprovedLetterFile) { + return $this->response->setStatusCode(400)->setJSON([ + 'status' => false, + 'message' => 'Input validation failed', + 'code' => 400, + 'errors' => ['approved_letter' => 'Provide either Approved Letter URL or Approved Letter PDF file, not both.'], + ]); + } + + if ($approvedLetterUrl !== '' && ! $this->isClaimUploadUrl($approvedLetterUrl)) { + return $this->response->setStatusCode(400)->setJSON([ + 'status' => false, + 'message' => 'Input validation failed', + 'code' => 400, + 'errors' => ['approved_letter' => 'Approved Letter URL format is invalid.'], + ]); + } + + if ($settleLetterUrl !== '' && $hasSettleLetterFile) { + return $this->response->setStatusCode(400)->setJSON([ + 'status' => false, + 'message' => 'Input validation failed', + 'code' => 400, + 'errors' => ['settle_letter' => 'Provide either Settle Letter URL or Settle Letter PDF file, not both.'], + ]); + } + + if ($settleLetterUrl !== '' && ! $this->isClaimUploadUrl($settleLetterUrl)) { + return $this->response->setStatusCode(400)->setJSON([ + 'status' => false, + 'message' => 'Input validation failed', + 'code' => 400, + 'errors' => ['settle_letter' => 'Settle Letter URL format is invalid.'], + ]); + } + + $uploadedApprovedLetter = null; + if ($hasApprovedLetterFile) { + $uploadResult = $this->uploadApprovedLetterPdf($approvedLetterFile, 'Approved Letter'); + if (! ($uploadResult['status'] ?? false)) { + return $this->response->setStatusCode(400)->setJSON([ + 'status' => false, + 'message' => 'Input validation failed', + 'code' => 400, + 'errors' => ['approved_letter_file' => $uploadResult['message'] ?? 'Invalid Approved Letter file.'], + ]); + } + $uploadedApprovedLetter = $uploadResult['data']; + $ticket_data['approved_letter'] = ''; + } else { + $ticket_data['approved_letter'] = $approvedLetterUrl; + } + + $uploadedSettleLetter = null; + if ($hasSettleLetterFile) { + $uploadResult = $this->uploadApprovedLetterPdf($settleLetterFile, 'Settle Letter'); + if (! ($uploadResult['status'] ?? false)) { + return $this->response->setStatusCode(400)->setJSON([ + 'status' => false, + 'message' => 'Input validation failed', + 'code' => 400, + 'errors' => ['settle_letter_file' => $uploadResult['message'] ?? 'Invalid Settle Letter file.'], + ]); + } + $uploadedSettleLetter = $uploadResult['data']; + $ticket_data['settle_letter'] = ''; + } else { + $ticket_data['settle_letter'] = $settleLetterUrl; + } + $old_ticket_data = $this->ticketMasterModel->where('id', $ticket_id)->where('is_active', 1)->first(); $ticket_data['claim_status_id'] = $this->getLastMatchedStatus($ticket_data, $old_ticket_data); $ticket_data['last_updated_by'] = 'USER'; @@ -1839,6 +2034,24 @@ class TicketController extends BaseController $this->myLogger->logme('error', "[UPDATE_CLAIM] New Ticket Data: {data}", ['data' => json_encode($ticket_data, JSON_PRETTY_PRINT)]); if ($ticket_data) { + if ($uploadedApprovedLetter !== null) { + $ticket_data['approved_letter'] = $this->createApprovedLetterFileUrl( + (int) $ticket_id, + (int) ($ticket_data['ticket_type_id'] ?? 1), + $uploadedApprovedLetter, + 'APPROVED_LETTER_PDF' + ); + } + + if ($uploadedSettleLetter !== null) { + $ticket_data['settle_letter'] = $this->createApprovedLetterFileUrl( + (int) $ticket_id, + (int) ($ticket_data['ticket_type_id'] ?? 1), + $uploadedSettleLetter, + 'SETTLE_LETTER_PDF' + ); + } + $return_value = $this->ticketMasterModel->where('id', $ticket_id)->set($ticket_data)->update(); if ($return_value) { @@ -1938,7 +2151,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); @@ -3261,6 +3474,55 @@ class TicketController extends BaseController return strpos($host, '.') !== false; } + private function uploadApprovedLetterPdf($file, string $documentLabel = 'Approved Letter'): array + { + if ($file === null || ! $file->isValid() || $file->getError() === UPLOAD_ERR_NO_FILE) { + return ['status' => false, 'message' => $documentLabel . ' file is missing.']; + } + + $ext = strtolower((string) $file->getClientExtension()); + $mime = strtolower((string) $file->getMimeType()); + $allowedMime = ['application/pdf', 'application/x-pdf']; + + if ($ext !== 'pdf' || (! empty($mime) && ! in_array($mime, $allowedMime, true))) { + return ['status' => false, 'message' => 'Only PDF files are allowed for ' . $documentLabel . ' upload.']; + } + + $uploadPath = WRITEPATH . 'uploads/claim_files/'; + if (! is_dir($uploadPath)) { + mkdir($uploadPath, 0755, true); + } + + $diskFileName = file_Upload_for_lead($file, $uploadPath, ['pdf']); + if (empty($diskFileName)) { + return ['status' => false, 'message' => 'Failed to upload ' . $documentLabel . ' file.']; + } + + return [ + 'status' => true, + 'data' => [ + 'file_name' => $diskFileName, + 'mime_type' => $mime ?: 'application/pdf', + ], + ]; + } + + private function createApprovedLetterFileUrl(int $ticketId, int $ticketTypeId, array $uploadedFile, string $docName = 'APPROVED_LETTER_PDF'): string + { + $fileId = $this->claimFilesModel->insert([ + 'ticket_id' => $ticketId, + 'ticket_type' => $ticketTypeId, + 'file_type' => 3, + 'doc_name' => $docName, + 'file_name' => $uploadedFile['file_name'], + 'url' => $uploadedFile['file_name'], + 'mime_type' => $uploadedFile['mime_type'] ?? 'application/pdf', + 'is_active' => 1, + ]); + + return base_url('downloadClaimFile/' . $fileId); + } + public function upload_url() { @@ -3376,6 +3638,7 @@ class TicketController extends BaseController } } + //get the claim file list data against the ticket id public function getUrlDataByTicketId() { $ticket_id = $this->request->getPost('ticket_id'); @@ -3398,6 +3661,7 @@ class TicketController extends BaseController END AS url ") ->where('ticket_id', $ticket_id) + ->where('file_type !=', 3) // Assuming you want to fetch both URL and file uploads ->where('is_active', 1) ->findAll(); 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/Controllers/VidalApiController.php b/app/Controllers/VidalApiController.php index 06a78a57..82fd5db4 100644 --- a/app/Controllers/VidalApiController.php +++ b/app/Controllers/VidalApiController.php @@ -1664,6 +1664,7 @@ class VidalApiController extends BaseController $fileData = $this->db->table('claim_files f') ->where('f.ticket_id', $claimId) ->where('f.docs_for_ir', 1) + ->where('f.file_type', 2) // PDF ->get() ->getResultArray(); 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/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/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', ]; diff --git a/app/Views/UserList.php b/app/Views/UserList.php index 0adae2ad..141b3c50 100755 --- a/app/Views/UserList.php +++ b/app/Views/UserList.php @@ -341,6 +341,62 @@ table.dataTable tbody td { +first_name ?? ''))); + $ul_col_max_len[1] = max($ul_col_max_len[1], mb_strlen((string) ($row->email ?? ''))); + $ul_col_max_len[2] = max($ul_col_max_len[2], mb_strlen((string) ($row->mobile ?? ''))); + $ul_col_max_len[3] = max($ul_col_max_len[3], mb_strlen((string) ($row->user_role ?? ''))); + $statusLabel = (($row->is_active ?? 0) == 1) ? 'Active' : 'In-Active'; + $ul_col_max_len[4] = max($ul_col_max_len[4], mb_strlen($statusLabel)); + $ul_col_max_len[5] = max($ul_col_max_len[5], 4); + } +} +$ul_col_min_px = array_fill(0, $ul_col_count, 80); +$ul_col_max_px = array_fill(0, $ul_col_count, 360); +$ul_col_min_px[0] = 72; +$ul_col_max_px[0] = 280; +$ul_col_min_px[5] = 72; +$ul_col_max_px[5] = 96; +$ul_col_width_px = nhance_dt_column_widths_px($ul_header_labels, $ul_col_max_len, $ul_col_min_px, $ul_col_max_px); +?> + + <'col-sm-9'B>>" + // "<'row'<'col-sm-12'tr>>" + // "<'row'<'col-sm-5'i><'col-sm-7'p>>", @@ -1083,8 +1139,15 @@ table.dataTable tbody td { $(this).addClass('active'); loadPartner(); }); - } - }); + }, + columnDefs: [ + + { targets: , width: 'px' }, + + ] + })); + nhanceListDataTableAfterInit(); + nhanceListDataTableBindAdjust(table); function applyBottomRowDropup() { if (!table) return; @@ -1109,12 +1172,12 @@ table.dataTable tbody td { // IMPORTANT — DataTables draw event REF: TTS table.on('draw.dt', function () { - let rowCount = $('#scroll-horizontal-datatable').DataTable().rows({ filter: 'applied' }).count(); + let rowCount = table.rows({ filter: 'applied' }).count(); if (rowCount <= 2) { - $('.dataTables_scrollBody').css('overflow', 'inherit'); + $('#user-table_wrapper .dataTables_scrollBody').css('overflow', 'inherit'); } else { - $('.dataTables_scrollBody').css('overflow', 'auto'); + $('#user-table_wrapper .dataTables_scrollBody').css('overflow', 'auto'); } }); 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/batch_list.php b/app/Views/batch_list.php index 9e5f256b..96d441b0 100755 --- a/app/Views/batch_list.php +++ b/app/Views/batch_list.php @@ -266,7 +266,7 @@ for ($i = 0; $i < $batch_col_count; $i++) { ?> - + - + 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 
diff --git a/app/Views/bds_dump_file_list.php b/app/Views/bds_dump_file_list.php index 2d314fb9..b56448fa 100644 --- a/app/Views/bds_dump_file_list.php +++ b/app/Views/bds_dump_file_list.php @@ -45,7 +45,7 @@ ?>
+
- @@ -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/business_team_list.php b/app/Views/business_team_list.php index 3a91bf1e..7172fd1b 100644 --- a/app/Views/business_team_list.php +++ b/app/Views/business_team_list.php @@ -202,7 +202,7 @@ $row){ ?> - + diff --git a/app/Views/cd_master_list.php b/app/Views/cd_master_list.php index 906d86d3..1314066a 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) { ?>
+
+
@@ -45,7 +114,7 @@ $row){ ?> - + @@ -80,8 +149,8 @@ $(document).ready(function() { - var table = $('#scroll-horizontal-datatable').DataTable({ - scrollX: true, + nhanceListDataTableBeforeInit(); + var table = $('#cd-master-list-table').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,13 +243,15 @@ // searchPlaceholder: "Search..." // }, // paging: true, - }); + })); + nhanceListDataTableAfterInit(); + nhanceListDataTableBindAdjust(table); function applyBottomRowDropup() { if (!table) return; const currentRows = table.rows({ page: 'current' }).nodes().toArray(); - $('#scroll-horizontal-datatable tbody tr').removeClass('nh-force-dropup'); - $('#scroll-horizontal-datatable tbody tr td.table-action-cell .btn-group.dropdown').removeClass('dropup'); + $('#cd-master-list-table tbody tr').removeClass('nh-force-dropup'); + $('#cd-master-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++) { @@ -186,7 +262,7 @@ } } applyBottomRowDropup(); - $('#scroll-horizontal-datatable').on('draw.dt', applyBottomRowDropup); + $('#cd-master-list-table').on('draw.dt', applyBottomRowDropup); }) $(document).ready(function(){ diff --git a/app/Views/claim_dump_file_list.php b/app/Views/claim_dump_file_list.php index 146aaa4b..ab3ca668 100644 --- a/app/Views/claim_dump_file_list.php +++ b/app/Views/claim_dump_file_list.php @@ -155,7 +155,7 @@ ?> - + - +
S.No 
( )
diff --git a/app/Views/claim_mis_file_list.php b/app/Views/claim_mis_file_list.php index d26e91be..dacfbbb4 100644 --- a/app/Views/claim_mis_file_list.php +++ b/app/Views/claim_mis_file_list.php @@ -46,7 +46,7 @@ ?>
' . $file['user_name'] . '' ?> 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); +?> + \ No newline at end of file diff --git a/app/Views/frontend_content_list.php b/app/Views/frontend_content_list.php index 7ea2e54a..695feb65 100644 --- a/app/Views/frontend_content_list.php +++ b/app/Views/frontend_content_list.php @@ -1,8 +1,72 @@ + @@ -10,7 +74,7 @@
- +
@@ -26,7 +90,7 @@ $row) { ?> - + @@ -268,9 +332,9 @@ $('#notes').parsley().validate(); }); - var ticketsTable = $('#user-table'); - table = ticketsTable.DataTable({ - scrollX: true, + var ticketsTable = $('#frontend-content-list-table'); + 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 @@ -322,14 +386,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(); - $('#user-table tbody tr').removeClass('nh-force-dropup'); - $('#user-table tbody tr td.table-action-cell .btn-group.dropdown').removeClass('dropup'); + $('#frontend-content-list-table tbody tr').removeClass('nh-force-dropup'); + $('#frontend-content-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++) { @@ -340,7 +411,7 @@ } } applyBottomRowDropup(); - $('#user-table').on('draw.dt', applyBottomRowDropup); + $('#frontend-content-list-table').on('draw.dt', applyBottomRowDropup); }); $('.close').click(function(){ resetValues(); }) @@ -691,7 +762,7 @@
+ id="insurer-list-table"> @@ -71,10 +130,8 @@ -
+
-

+
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/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 @@
-->
Name 
+ id="kyc-list-table"> @@ -83,7 +140,7 @@ + + + diff --git a/app/Views/leads_list.php b/app/Views/leads_list.php index 42f32f88..b496dfe4 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
+
@@ -158,7 +264,7 @@ $row) {?> - - +
+ <'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/log_view.php b/app/Views/log_view.php index 1af7ebde..73844e6a 100644 --- a/app/Views/log_view.php +++ b/app/Views/log_view.php @@ -32,7 +32,7 @@ table.dataTable tbody td { $log): ?>
View | diff --git a/app/Views/nhance_branch_list.php b/app/Views/nhance_branch_list.php index bd302e8a..dc0190c1 100644 --- a/app/Views/nhance_branch_list.php +++ b/app/Views/nhance_branch_list.php @@ -1,8 +1,66 @@ + @@ -10,7 +68,7 @@
- +
@@ -23,7 +81,7 @@ $row) { ?> - +
-
S.No.
+
@@ -173,7 +238,7 @@ if (isset($outstanting_list)) { ?> $row) { ?> - + @@ -210,11 +275,11 @@ $(document).ready(function() { - var ticketsTable = $('#scroll-horizontal-datatable'); + var ticketsTable = $('#outstanding-report-list-table'); if (ticketsTable.length) { - ticketsTable.DataTable({ - scrollX: true, + nhanceListDataTableBeforeInit(); + var nhOutstandingTable = ticketsTable.DataTable(nhanceMergeListDataTableOptions({ // dom: "<'row'<'col-sm-6'f><'col-sm-6 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 @@ -290,8 +355,15 @@ emptyTable: '
No Data found
' }, paging: true, // Enable pagination - pageLength: 25 // Set default number of rows per page (optional) - }); + pageLength: 25, // Set default number of rows per page (optional) + columnDefs: [ + + { targets: , width: 'px' }, + + ], + })); + nhanceListDataTableAfterInit(); + nhanceListDataTableBindAdjust(nhOutstandingTable); } else { console.error("Table not found."); } diff --git a/app/Views/policy_transaction_endorsement_list.php b/app/Views/policy_transaction_endorsement_list.php index 7fbfff67..0f2555fa 100644 --- a/app/Views/policy_transaction_endorsement_list.php +++ b/app/Views/policy_transaction_endorsement_list.php @@ -296,7 +296,7 @@ $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/policy_type_list.php b/app/Views/policy_type_list.php index 7679b722..8f546d68 100755 --- a/app/Views/policy_type_list.php +++ b/app/Views/policy_type_list.php @@ -1,3 +1,26 @@ + + +
@@ -87,7 +152,7 @@
-->
S.No
+ id="policy-type-list-table"> @@ -131,7 +196,7 @@ \ No newline at end of file + diff --git a/app/Views/ticket_form_gmc.php b/app/Views/ticket_form_gmc.php index 4db28f7d..003e4c3b 100644 --- a/app/Views/ticket_form_gmc.php +++ b/app/Views/ticket_form_gmc.php @@ -429,10 +429,26 @@ value="" name="approved_date"> -
Policy Type
+ id="tpa-list-table"> @@ -87,7 +145,10 @@
Name