MERGE_TEST_LIVE_ISSUES&RECON_NEW
This commit is contained in:
commit
06cd2c9614
1
.gitignore
vendored
1
.gitignore
vendored
@ -34,4 +34,5 @@ composer.lock
|
|||||||
.env
|
.env
|
||||||
.phpunit*
|
.phpunit*
|
||||||
phpqueue.sh
|
phpqueue.sh
|
||||||
|
.claude
|
||||||
|
|
||||||
|
|||||||
@ -626,6 +626,8 @@ $routes->get("downloadFileTableFile/(:any)", "EmployeeController::downloadFileLi
|
|||||||
|
|
||||||
$routes->group("employeeRest", ['filter' => ['ratelimit' , 'appSignature'] ], function ($routes) {
|
$routes->group("employeeRest", ['filter' => ['ratelimit' , 'appSignature'] ], function ($routes) {
|
||||||
|
|
||||||
|
$routes->post('logout', 'RestAuthenticationController::logout');
|
||||||
|
|
||||||
//Employee login api's
|
//Employee login api's
|
||||||
$routes->post("verifyEmployeeNumber", "RestAuthenticationController::verifyEmployeeWithMobileNumber");
|
$routes->post("verifyEmployeeNumber", "RestAuthenticationController::verifyEmployeeWithMobileNumber");
|
||||||
$routes->post("getVerifiedUserData", "RestAuthenticationController::getVerifiedUserData");
|
$routes->post("getVerifiedUserData", "RestAuthenticationController::getVerifiedUserData");
|
||||||
@ -669,7 +671,7 @@ $routes->group("employeeRest", ['filter' => ['ratelimit' , 'appSignature'] ], fu
|
|||||||
|
|
||||||
$routes->group("employeeRest", ["filter" => ['GlobalPostFileUploadGuard', 'ratelimit' , 'appSignature', 'authJWT']], function ($routes) {
|
$routes->group("employeeRest", ["filter" => ['GlobalPostFileUploadGuard', 'ratelimit' , 'appSignature', 'authJWT']], function ($routes) {
|
||||||
|
|
||||||
$routes->post('logout', 'RestAuthenticationController::logout');
|
// $routes->post('logout', 'RestAuthenticationController::logout');
|
||||||
|
|
||||||
$routes->post("ecardRequest", "ApiServiceController::ecardRequest");
|
$routes->post("ecardRequest", "ApiServiceController::ecardRequest");
|
||||||
$routes->get("getWellnessURL", "ApiServiceController::getWellnessURL");
|
$routes->get("getWellnessURL", "ApiServiceController::getWellnessURL");
|
||||||
|
|||||||
@ -231,11 +231,23 @@ class ApiServiceController extends BaseController
|
|||||||
// json_decode(file_get_contents(WRITEPATH.'/tmp/db.json'),true),
|
// json_decode(file_get_contents(WRITEPATH.'/tmp/db.json'),true),
|
||||||
// json_decode(file_get_contents(WRITEPATH.'/tmp/medi.json'),true)
|
// json_decode(file_get_contents(WRITEPATH.'/tmp/medi.json'),true)
|
||||||
// );
|
// );
|
||||||
// print_rr($report);
|
// print_rr('tata');
|
||||||
// die();
|
// die();
|
||||||
|
|
||||||
|
// $mediAssistController = new MediAssistApiController();
|
||||||
|
// $mediAssistController->MediAssistGetBenefDetails( [ 'policy_no' => '97000063250400000012', 'file_id' =>'5704','client_policy_id' => '1839' ] );
|
||||||
|
// $mediAssistController->MediAssistGetBenefDetails( [ 'policy_no' => '97000063250400000016', 'file_id' =>'5704','client_policy_id' => '2002' ] );
|
||||||
|
// die();
|
||||||
|
|
||||||
|
// $vidalApiController = new VidalApiController;
|
||||||
|
// $vidalApiController->VidalGetBenefDetails( [ 'policy_no' => '570000/48/2026/363', 'file_id' =>'5264','client_policy_id' => '9433'] );
|
||||||
|
|
||||||
|
// $fhplApiController = new FhplApiController;
|
||||||
|
// $fhplApiController->FhplGetBenefDetails( [ 'policy_no' => '570000/48/2026/453', 'file_id' =>'9999','client_policy_id' => '3557'] );
|
||||||
|
|
||||||
|
// $healthIndiaApiController = new HealthIndiaApiController;
|
||||||
|
// $healthIndiaApiController->HealthIndiaGetBenefDetails( [ 'policy_no' => '97000063250400000116', 'file_id' =>'9998','client_policy_id' => '6523'] );
|
||||||
|
// die();
|
||||||
//START OF THE PROGRAM
|
//START OF THE PROGRAM
|
||||||
log_message('error', "getTPAID payloads :" . json_encode($this->request->getPost() ?? []));
|
log_message('error', "getTPAID payloads :" . json_encode($this->request->getPost() ?? []));
|
||||||
$tpa_id = $this->request->getPost('tpa_id') ?? null;
|
$tpa_id = $this->request->getPost('tpa_id') ?? null;
|
||||||
@ -452,7 +464,7 @@ class ApiServiceController extends BaseController
|
|||||||
$data = $db->table('employees e')
|
$data = $db->table('employees e')
|
||||||
->select('pt.policy_type,
|
->select('pt.policy_type,
|
||||||
e.name, e.email_corporate as email, e.mobile as phone, e.emp_code as memberId, e.gender, e.dob, e.relationship as relation,
|
e.name, e.email_corporate as email, e.mobile as phone, e.emp_code as memberId, e.gender, e.dob, e.relationship as relation,
|
||||||
cp.policy_no as policyNumber, ep.employee_id as employeeId, cp.policy_start_date as policyStartDate, cp.policy_end_date as policyEndDate , cp.wellness_plan_id as planId , cp.wellness_vendor_id')
|
cp.policy_no as policyNumber, ep.employee_id as employeeId,ep.id, cp.policy_start_date as policyStartDate, cp.policy_end_date as policyEndDate , cp.wellness_plan_id as planId , cp.wellness_vendor_id')
|
||||||
->join('employee_polices ep', 'e.id = ep.employee_id')
|
->join('employee_polices ep', 'e.id = ep.employee_id')
|
||||||
->join('client_policy cp', 'ep.client_policy_id = cp.id')
|
->join('client_policy cp', 'ep.client_policy_id = cp.id')
|
||||||
->join('policy_type pt', 'cp.policy_type_id = pt.id')
|
->join('policy_type pt', 'cp.policy_type_id = pt.id')
|
||||||
@ -480,20 +492,40 @@ class ApiServiceController extends BaseController
|
|||||||
}
|
}
|
||||||
else if ($row['planId'] != null && empty($row['wellness_vendor_id'])) // VISIT
|
else if ($row['planId'] != null && empty($row['wellness_vendor_id'])) // VISIT
|
||||||
{
|
{
|
||||||
$userParams['name'] = $row['name'];
|
|
||||||
$userParams['email'] = $row['email'];
|
//OLD PARAMS
|
||||||
|
// $userParams['name'] = $row['name'];
|
||||||
|
// $userParams['email'] = $row['email'];
|
||||||
|
// $userParams['phone'] = $row['phone'];
|
||||||
|
// $userParams['memberId'] = $row['employeeId']; // memberId is unique primary key.
|
||||||
|
// $userParams['gender'] = $row['gender'];
|
||||||
|
// $userParams['dob'] = $row['dob'];
|
||||||
|
// $userParams['relation'] = $row['relation'];
|
||||||
|
// $userParams['policyNumber'] = $row['policyNumber'];
|
||||||
|
// $userParams['employeeId'] = $row['memberId'];
|
||||||
|
// $userParams['policyStartDate']= $row['policyStartDate'];
|
||||||
|
// $userParams['policyEndDate'] = $row['policyEndDate'];
|
||||||
|
// $userParams['policyName'] = $row['policy_type'];
|
||||||
|
// $userParams['planId'] = $row['planId'];
|
||||||
|
// $userParams['moduleName'] = 'home';
|
||||||
|
|
||||||
|
//NEW PARAMS
|
||||||
|
$userParams['memberId'] = $row['id']; // employee policy primary key (which used while onboard)from DB
|
||||||
$userParams['phone'] = $row['phone'];
|
$userParams['phone'] = $row['phone'];
|
||||||
$userParams['memberId'] = $row['employeeId']; // memberId is unique primary key.
|
$userParams['email'] = $row['email'];
|
||||||
|
$userParams['relationship'] = $row['relation'];
|
||||||
$userParams['gender'] = $row['gender'];
|
$userParams['gender'] = $row['gender'];
|
||||||
$userParams['dob'] = $row['dob'];
|
$userParams['dob'] = $row['dob'];
|
||||||
$userParams['relation'] = $row['relation'];
|
|
||||||
$userParams['policyNumber'] = $row['policyNumber'];
|
$userParams['policyNumber'] = $row['policyNumber'];
|
||||||
$userParams['employeeId'] = $row['memberId'];
|
$userParams['policyStartDate'] = $row['policyStartDate'];
|
||||||
$userParams['policyStartDate']= $row['policyStartDate'];
|
|
||||||
$userParams['policyEndDate'] = $row['policyEndDate'];
|
$userParams['policyEndDate'] = $row['policyEndDate'];
|
||||||
$userParams['policyName'] = $row['policy_type'];
|
$userParams['plan'] = $row['planId'];
|
||||||
$userParams['planId'] = $row['planId'];
|
$userParams['source'] = 'NAHANCE';
|
||||||
$userParams['moduleName'] = 'home';
|
$userParams['employeeId'] = $row['memberId'];
|
||||||
|
$userParams['firstName'] = $row['name'];
|
||||||
|
$userParams['middleName'] = '';
|
||||||
|
$userParams['lastName'] = '';
|
||||||
|
|
||||||
break; // stop after first GMC match
|
break; // stop after first GMC match
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -497,6 +497,8 @@ class EmployeeController extends AdminController
|
|||||||
batch_files.amount,
|
batch_files.amount,
|
||||||
batch_files.status,
|
batch_files.status,
|
||||||
batch_files.client_branch_id,
|
batch_files.client_branch_id,
|
||||||
|
insurers.short_name as insurer_short_name,
|
||||||
|
tpa.short_name as tpa_short_name,
|
||||||
DATE_FORMAT(batch_files.policy_issue_date, '%d/%m/%Y') AS policy_issue_date,
|
DATE_FORMAT(batch_files.policy_issue_date, '%d/%m/%Y') AS policy_issue_date,
|
||||||
|
|
||||||
CASE
|
CASE
|
||||||
@ -512,6 +514,8 @@ class EmployeeController extends AdminController
|
|||||||
|
|
||||||
")
|
")
|
||||||
->join('client_policy', 'client_policy.id = batch_files.client_policy_id')
|
->join('client_policy', 'client_policy.id = batch_files.client_policy_id')
|
||||||
|
->join('insurers', 'client_policy.insurer_id = insurers.id')
|
||||||
|
->join('tpa', 'client_policy.tpa_id = tpa.id')
|
||||||
->join('client_branch', 'client_branch.id = batch_files.client_branch_id')
|
->join('client_branch', 'client_branch.id = batch_files.client_branch_id')
|
||||||
->join('policy_type', 'policy_type.id = client_policy.policy_type_id')
|
->join('policy_type', 'policy_type.id = client_policy.policy_type_id')
|
||||||
->join('clients', 'clients.id = client_policy.client_id')
|
->join('clients', 'clients.id = client_policy.client_id')
|
||||||
@ -4029,71 +4033,202 @@ class EmployeeController extends AdminController
|
|||||||
|
|
||||||
public function getTPADataVariationReport($file_id, $type = 'download')
|
public function getTPADataVariationReport($file_id, $type = 'download')
|
||||||
{
|
{
|
||||||
$file_info = $this->batchFileModel->where('id', $file_id)->find();
|
$fileInfo = $this->batchFileModel->find((int) $file_id);
|
||||||
$client_id = $file_info[0]['client_id'];
|
if (empty($fileInfo)) {
|
||||||
$client_policy_id = $file_info[0]['client_policy_id'];
|
if ($type === 'view') {
|
||||||
$TpaApiDataModel = new TpaApiDataModel();
|
return [];
|
||||||
$emp_data_wo_tpa_id = $this->employeePolicyModel->getTPADataVariationReport($client_id, $client_policy_id, $file_id);
|
}
|
||||||
|
if ($type === 'download') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->respond(['status' => false, 'code' => 404, 'message' => 'File not found', 'data' => []], 200);
|
||||||
|
}
|
||||||
|
|
||||||
//loop emp data with TPA data for matches
|
$client_id = (int) ($fileInfo['client_id'] ?? 0);
|
||||||
foreach ($emp_data_wo_tpa_id as $db_key => $db_row)
|
$client_policy_id = (int) ($fileInfo['client_policy_id'] ?? 0);
|
||||||
{
|
// `call_type` controls whether we should force a fresh reconciliation.
|
||||||
//get TPA API data from table for current DB ep code
|
// - job => always recompute + persist rec_type snapshot
|
||||||
$tpa_temp_data = $TpaApiDataModel->select('*')
|
// - manual => compute only on first call; otherwise use cached rec_type snapshot
|
||||||
->where('emp_code', $db_row['emp_code'])
|
// $callType = strtolower((string) ($this->request->getGet('call_type') ?? 'manual'));
|
||||||
|
$isJobCall = $type === 'job';
|
||||||
|
|
||||||
|
$tpaApiDataModel = new TpaApiDataModel();
|
||||||
|
// Snapshot existence check:
|
||||||
|
// If any active row already has a non-empty rec_type, we consider this file
|
||||||
|
// already classified and can safely use cached mode for non-job calls.
|
||||||
|
$hasRecTypeSnapshot = $tpaApiDataModel->where('file_id', $file_id)
|
||||||
|
->where('is_active', 1)
|
||||||
|
->where('rec_type IS NOT NULL', null, false)
|
||||||
|
->where('rec_type !=', '')
|
||||||
|
->countAllResults() > 0;
|
||||||
|
|
||||||
|
// Compute mode rules:
|
||||||
|
// 1) job calls always recompute and overwrite rec_type for deterministic refresh.
|
||||||
|
// 2) first non-job call computes when no snapshot exists.
|
||||||
|
// Cached mode is used only for second+ non-job calls.
|
||||||
|
$shouldComputeAndPersist = $isJobCall || !$hasRecTypeSnapshot;
|
||||||
|
// echo $shouldComputeAndPersist;
|
||||||
|
// die;
|
||||||
|
$this->myLogger->logme(
|
||||||
|
'error',
|
||||||
|
'TPA variation report mode selected: ' . json_encode([
|
||||||
|
'file_id' => (int) $file_id,
|
||||||
|
'call_type' => $isJobCall,
|
||||||
|
'mode' => $shouldComputeAndPersist ? 'compute' : 'cached',
|
||||||
|
])
|
||||||
|
);
|
||||||
|
$emp_data_wo_tpa_id = [];
|
||||||
|
$not_in_nhance = [];
|
||||||
|
|
||||||
|
if ($shouldComputeAndPersist) {
|
||||||
|
// Load once and index in memory to avoid N+1 queries during reconciliation.
|
||||||
|
$allActiveTpaRows = $tpaApiDataModel->select('*')
|
||||||
->where('file_id', $file_id)
|
->where('file_id', $file_id)
|
||||||
->where('is_active', 1)
|
->where('is_active', 1)
|
||||||
->findAll();
|
->findAll();
|
||||||
$match= $this->reconcileDbWithTpa($db_row,$tpa_temp_data);
|
|
||||||
$emp_data_wo_tpa_id[$db_key]['match'] = $match;
|
$tpaByEmpCode = [];
|
||||||
|
foreach ($allActiveTpaRows as $tpaRow) {
|
||||||
|
$tpaByEmpCode[$tpaRow['emp_code']][] = $tpaRow;
|
||||||
}
|
}
|
||||||
|
|
||||||
// d($emp_data_wo_tpa_id);
|
$recTypeById = [];
|
||||||
|
foreach ($allActiveTpaRows as $tpaRow) {
|
||||||
|
// Default classification for active rows.
|
||||||
|
// Later loops will overwrite specific rows as `need_to_review` or `not_in_nhance`.
|
||||||
|
$recTypeById[$tpaRow['id']] = 'matched';
|
||||||
|
}
|
||||||
|
|
||||||
// die();
|
$emp_data_wo_tpa_id = $this->employeePolicyModel->getTPADataVariationReport($client_id, $client_policy_id, $file_id);
|
||||||
//not_in_tpa
|
|
||||||
$tpa_emp_codes = $TpaApiDataModel->select('emp_code')
|
// Reconcile DB records against TPA records and classify records for rec_type updates.
|
||||||
|
foreach ($emp_data_wo_tpa_id as $db_key => $db_row) {
|
||||||
|
$tpa_temp_data = $tpaByEmpCode[$db_row['emp_code']] ?? [];
|
||||||
|
$match = $this->reconcileDbWithTpa($db_row, $tpa_temp_data);
|
||||||
|
$emp_data_wo_tpa_id[$db_key]['match'] = $match;
|
||||||
|
|
||||||
|
if (($match['status'] ?? '') === 'matched') {
|
||||||
|
$matchedTpaId = (int) ($match['tpa_record']['id'] ?? 0);
|
||||||
|
if ($matchedTpaId > 0) {
|
||||||
|
// If compare-fields list has differences, the row must be reviewed.
|
||||||
|
// Otherwise keep it as matched.
|
||||||
|
$recTypeById[$matchedTpaId] = empty($match['not_matching']) ? 'matched' : 'need_to_review';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// No relation-level match found for this DB member.
|
||||||
|
// Mark all candidate TPA rows for the same emp_code as review-required.
|
||||||
|
foreach ($tpa_temp_data as $candidate) {
|
||||||
|
$candidateId = (int) ($candidate['id'] ?? 0);
|
||||||
|
if ($candidateId > 0) {
|
||||||
|
$recTypeById[$candidateId] = 'need_to_review';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$master_emp_codes = $this->employeePolicyModel->getTPADataVariationReport($client_id, $client_policy_id, $file_id, [], true);
|
||||||
|
$master_emp_codes = array_column($master_emp_codes, 'emp_code');
|
||||||
|
|
||||||
|
$not_in_nhance = [];
|
||||||
|
foreach ($allActiveTpaRows as $tpaRow) {
|
||||||
|
if (!in_array($tpaRow['emp_code'], $master_emp_codes, true)) {
|
||||||
|
// TPA member not found in Nhance master employee list for this client/policy.
|
||||||
|
$not_in_nhance[] = $tpaRow;
|
||||||
|
$recTypeById[(int) $tpaRow['id']] = 'not_in_nhance';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($recTypeById)) {
|
||||||
|
$updateRows = [];
|
||||||
|
foreach ($recTypeById as $id => $recType) {
|
||||||
|
$updateRows[] = [
|
||||||
|
'id' => (int) $id,
|
||||||
|
'rec_type' => $recType,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
// Persist snapshot atomically so subsequent non-job calls can use cached mode.
|
||||||
|
$db = \Config\Database::connect();
|
||||||
|
$db->transStart();
|
||||||
|
$tpaApiDataModel->updateBatch($updateRows, 'id');
|
||||||
|
$db->transComplete();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// echo 'else';die;
|
||||||
|
// Cached mode:
|
||||||
|
// Read previously classified rows from rec_type, keep response shape compatible
|
||||||
|
// with existing UI/export (`mismatch_data` still contains DB row + match payload).
|
||||||
|
$not_in_nhance = $tpaApiDataModel->select('*')
|
||||||
|
->where('is_active', 1)
|
||||||
|
->where('file_id', $file_id)
|
||||||
|
->where('rec_type', 'not_in_nhance')
|
||||||
|
->findAll();
|
||||||
|
|
||||||
|
$needToReviewRows = $tpaApiDataModel->select('*')
|
||||||
|
->where('is_active', 1)
|
||||||
|
->where('file_id', $file_id)
|
||||||
|
->where('rec_type', 'need_to_review')
|
||||||
|
->findAll();
|
||||||
|
|
||||||
|
$needToReviewByEmpCode = [];
|
||||||
|
foreach ($needToReviewRows as $row) {
|
||||||
|
$needToReviewByEmpCode[$row['emp_code']][] = $row;
|
||||||
|
}
|
||||||
|
|
||||||
|
$baseRows = $this->employeePolicyModel->getTPADataVariationReport($client_id, $client_policy_id, $file_id);
|
||||||
|
foreach ($baseRows as $db_row) {
|
||||||
|
$candidates = $needToReviewByEmpCode[$db_row['emp_code']] ?? [];
|
||||||
|
if (empty($candidates)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$selectedTpa = null;
|
||||||
|
foreach ($candidates as $candidate) {
|
||||||
|
// Prefer same-relation row to mimic reconcileDbWithTpa relation matching.
|
||||||
|
if (strtolower((string) ($candidate['relation'] ?? '')) === strtolower((string) ($db_row['relationship'] ?? ''))) {
|
||||||
|
$selectedTpa = $candidate;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($selectedTpa === null) {
|
||||||
|
$selectedTpa = $candidates[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
$db_row['match'] = [
|
||||||
|
'status' => 'matched',
|
||||||
|
'tpa_record' => $selectedTpa,
|
||||||
|
'not_matching' => [],
|
||||||
|
];
|
||||||
|
$emp_data_wo_tpa_id[] = $db_row;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Intentionally keep `not_in_tpa` live from current join/query logic
|
||||||
|
// (as requested) and do not source it from rec_type snapshot.
|
||||||
|
$tpa_emp_codes = $tpaApiDataModel->select('emp_code')
|
||||||
->where('file_id', $file_id)
|
->where('file_id', $file_id)
|
||||||
->where('is_active', 1)
|
->where('is_active', 1)
|
||||||
->groupBy('emp_code')
|
->groupBy('emp_code')
|
||||||
->findAll();
|
->findAll();
|
||||||
$tpa_emp_codes = array_column($tpa_emp_codes, 'emp_code');
|
$tpa_emp_codes = array_column($tpa_emp_codes, 'emp_code');
|
||||||
|
$not_in_tpa = $this->employeePolicyModel->getTPADataVariationReport($client_id, $client_policy_id, $file_id, $tpa_emp_codes);
|
||||||
$not_in_tpa = $this->employeePolicyModel->getTPADataVariationReport($client_id, $client_policy_id, $file_id,$tpa_emp_codes);
|
|
||||||
// d($not_in_tpa);die();
|
|
||||||
|
|
||||||
// not_in_nhance
|
|
||||||
$master_emp_codes = $this->employeePolicyModel->getTPADataVariationReport($client_id, $client_policy_id, $file_id,[],true);
|
|
||||||
$master_emp_codes = array_column($master_emp_codes, 'emp_code');
|
|
||||||
|
|
||||||
$not_in_nhance = $TpaApiDataModel->select('*')
|
|
||||||
->where('is_active',1)
|
|
||||||
->where('file_id',$file_id)
|
|
||||||
->whereNotIn('emp_code',$master_emp_codes)
|
|
||||||
->findAll();
|
|
||||||
// d($not_in_nhance);die();
|
|
||||||
|
|
||||||
if (!empty($not_in_tpa) || !empty($not_in_nhance) || !empty($emp_data_wo_tpa_id)) {
|
if (!empty($not_in_tpa) || !empty($not_in_nhance) || !empty($emp_data_wo_tpa_id)) {
|
||||||
|
|
||||||
$response = [
|
$response = [
|
||||||
'not_in_tpa' => $not_in_tpa,
|
'not_in_tpa' => $not_in_tpa,
|
||||||
'not_in_nhance' => $not_in_nhance,
|
'not_in_nhance' => $not_in_nhance,
|
||||||
'mismatch_data' => $emp_data_wo_tpa_id,
|
'mismatch_data' => $emp_data_wo_tpa_id,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
if ($type === 'view') {
|
||||||
if ($type === 'internal') {
|
return $this->respond(['status' => true, 'code' => 200, 'message' => '', 'data' => $response], 200);
|
||||||
return $response;
|
} elseif ($type === 'download') {
|
||||||
}else if ($type === 'download') {
|
|
||||||
$this->exportVariationReportExcel($not_in_tpa, $not_in_nhance, $emp_data_wo_tpa_id);
|
$this->exportVariationReportExcel($not_in_tpa, $not_in_nhance, $emp_data_wo_tpa_id);
|
||||||
} else {
|
} else {
|
||||||
return $this->respond(['status' => true,'code' => 200,'message' => '','data' => $response,],200);
|
return $this->respond(['status' => true, 'code' => 200, 'message' => '', 'data' => $response], 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
if ($type === 'view') {
|
||||||
if ($type === 'internal') {
|
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4101,12 +4236,13 @@ class EmployeeController extends AdminController
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->respond(['status' => false,'code' => 202,'message' => 'No data found','data' => [],],200);
|
return $this->respond(['status' => false, 'code' => 202, 'message' => 'No data found', 'data' => []], 200);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function proceedTPADataVariationNextStep($file_id)
|
public function proceedTPADataVariationNextStep($file_id)
|
||||||
{
|
{
|
||||||
|
// echo $file_id;die;
|
||||||
try {
|
try {
|
||||||
if (empty($file_id)) {
|
if (empty($file_id)) {
|
||||||
return $this->respond(
|
return $this->respond(
|
||||||
@ -4153,6 +4289,24 @@ class EmployeeController extends AdminController
|
|||||||
200
|
200
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($generationResult['status'])
|
||||||
|
{
|
||||||
|
if($generationResult['data']['file_id'])
|
||||||
|
{
|
||||||
|
//initiate update references b/w tpa_api_data and employess
|
||||||
|
//initiate deleteion if any
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//seems inception file id not there just put a log
|
||||||
|
$this->myLogger->logme(
|
||||||
|
'error',
|
||||||
|
'TPA RECON | Inception file id missing after generating employee upload from Not in Nhance data for file_id:'
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
} elseif ($tab === 'need_to_review') {
|
} elseif ($tab === 'need_to_review') {
|
||||||
// For the "Need to Review" tab, generate a Correction Excel
|
// For the "Need to Review" tab, generate a Correction Excel
|
||||||
// using the same overall pipeline as the Not in Nhance implementation.
|
// using the same overall pipeline as the Not in Nhance implementation.
|
||||||
@ -6167,4 +6321,218 @@ class EmployeeController extends AdminController
|
|||||||
return rmdir($dir);
|
return rmdir($dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reconcile TPA API rows with Nhance employee + employee policy records.
|
||||||
|
*
|
||||||
|
* Why this function exists:
|
||||||
|
* - TPA ingestion stores raw member rows in `tpa_api_data`.
|
||||||
|
* - Downstream processing may need a stable linkage back to the exact
|
||||||
|
* `employee_polices.id` record that represents that member in Nhance.
|
||||||
|
* - This method resolves that linkage and writes it into `tpa_api_data.ref`.
|
||||||
|
*
|
||||||
|
* Matching strategy:
|
||||||
|
* 1) Resolve candidate Nhance members by `emp_code` scoped to the same file's
|
||||||
|
* client and policy context.
|
||||||
|
* 2) Perform strict exact match on:
|
||||||
|
* - emp_code
|
||||||
|
* - name
|
||||||
|
* - dob
|
||||||
|
* - gender
|
||||||
|
* - relation/relationship
|
||||||
|
* 3) Update `tpa_api_data.ref` only when the exact match is found.
|
||||||
|
*
|
||||||
|
* Important behavior:
|
||||||
|
* - Only active rows are considered on both sides.
|
||||||
|
* - Already linked rows (`ref` present) are skipped to avoid accidental override.
|
||||||
|
* - Updates are done in batch and wrapped in DB transaction for consistency.
|
||||||
|
*
|
||||||
|
* @param int|string $file_id Batch file id whose TPA rows must be reconciled.
|
||||||
|
*
|
||||||
|
* @return array{
|
||||||
|
* status: bool,
|
||||||
|
* message: string,
|
||||||
|
* data: array{
|
||||||
|
* file_id:int,
|
||||||
|
* scanned:int,
|
||||||
|
* matched:int,
|
||||||
|
* skipped_already_mapped:int,
|
||||||
|
* unmatched:int
|
||||||
|
* }
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
public function reconTpaApiDataWithEmployeepolicies($file_id): array
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$fileId = (int) $file_id;
|
||||||
|
if ($fileId <= 0) {
|
||||||
|
return [
|
||||||
|
'status' => false,
|
||||||
|
'message' => 'Invalid file id provided.',
|
||||||
|
'data' => [],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
$fileInfo = $this->batchFileModel->find($fileId);
|
||||||
|
if (empty($fileInfo)) {
|
||||||
|
return [
|
||||||
|
'status' => false,
|
||||||
|
'message' => 'Batch file not found.',
|
||||||
|
'data' => ['file_id' => $fileId],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
$clientId = (int) ($fileInfo['client_id'] ?? 0);
|
||||||
|
$clientPolicyId = (int) ($fileInfo['client_policy_id'] ?? 0);
|
||||||
|
if ($clientId <= 0 || $clientPolicyId <= 0) {
|
||||||
|
return [
|
||||||
|
'status' => false,
|
||||||
|
'message' => 'Client/policy context missing for provided file id.',
|
||||||
|
'data' => ['file_id' => $fileId],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
$db = \Config\Database::connect();
|
||||||
|
|
||||||
|
// Pull only active TPA rows for this file. We include `ref` to skip
|
||||||
|
// rows that are already mapped by any previous reconciliation run.
|
||||||
|
$tpaRows = $db->table('tpa_api_data')
|
||||||
|
->select('id, emp_code, name, dob, relation, gender, ref')
|
||||||
|
->where('file_id', $fileId)
|
||||||
|
->where('is_active', 1)
|
||||||
|
->get()
|
||||||
|
->getResultArray();
|
||||||
|
|
||||||
|
if (empty($tpaRows)) {
|
||||||
|
return [
|
||||||
|
'status' => true,
|
||||||
|
'message' => 'No active TPA rows found for reconciliation.',
|
||||||
|
'data' => [
|
||||||
|
'file_id' => $fileId,
|
||||||
|
'scanned' => 0,
|
||||||
|
'matched' => 0,
|
||||||
|
'skipped_already_mapped' => 0,
|
||||||
|
'unmatched' => 0,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Build Nhance-side candidate pool once, keyed by emp_code.
|
||||||
|
// Each candidate represents an active employee policy member.
|
||||||
|
$dbMembers = $db->table('employee_polices ep')
|
||||||
|
->select('
|
||||||
|
ep.id AS employee_policy_id,
|
||||||
|
emp.emp_code,
|
||||||
|
emp.name,
|
||||||
|
emp.relationship,
|
||||||
|
emp.dob,
|
||||||
|
emp.gender
|
||||||
|
')
|
||||||
|
->join('employees emp', 'ep.employee_id = emp.id')
|
||||||
|
->where('ep.is_active', 1)
|
||||||
|
->where('ep.status', 'active')
|
||||||
|
->where('ep.client_policy_id', $clientPolicyId)
|
||||||
|
->where('emp.client_id', $clientId)
|
||||||
|
->where('emp.is_active', 1)
|
||||||
|
->get()
|
||||||
|
->getResultArray();
|
||||||
|
|
||||||
|
$membersByEmpCode = [];
|
||||||
|
foreach ($dbMembers as $member) {
|
||||||
|
$membersByEmpCode[$member['emp_code']][] = $member;
|
||||||
|
}
|
||||||
|
|
||||||
|
$updates = [];
|
||||||
|
$matched = 0;
|
||||||
|
$skipped = 0;
|
||||||
|
$unmatched = 0;
|
||||||
|
|
||||||
|
$normalize = static function ($value): string {
|
||||||
|
return strtolower(trim((string) $value));
|
||||||
|
};
|
||||||
|
|
||||||
|
foreach ($tpaRows as $tpaRow) {
|
||||||
|
$existingRef = trim((string) ($tpaRow['ref'] ?? ''));
|
||||||
|
if ($existingRef !== '') {
|
||||||
|
$skipped++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$empCode = (string) ($tpaRow['emp_code'] ?? '');
|
||||||
|
$candidates = $membersByEmpCode[$empCode] ?? [];
|
||||||
|
if (empty($candidates)) {
|
||||||
|
$unmatched++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$tName = $normalize($tpaRow['name'] ?? '');
|
||||||
|
$tRel = $normalize($tpaRow['relation'] ?? '');
|
||||||
|
$tDob = (string) ($tpaRow['dob'] ?? '');
|
||||||
|
$tGender = strtoupper(trim((string) ($tpaRow['gender'] ?? '')));
|
||||||
|
|
||||||
|
// Strict exact matching only (no fallback):
|
||||||
|
// emp_code is already scoped via $membersByEmpCode.
|
||||||
|
// Remaining fields must all match together.
|
||||||
|
$picked = null;
|
||||||
|
foreach ($candidates as $candidate) {
|
||||||
|
$nameOk = $normalize($candidate['name'] ?? '') === $tName;
|
||||||
|
$relOk = $normalize($candidate['relationship'] ?? '') === $tRel;
|
||||||
|
$dobOk = (string) ($candidate['dob'] ?? '') === $tDob;
|
||||||
|
$genOk = strtoupper(trim((string) ($candidate['gender'] ?? ''))) === $tGender;
|
||||||
|
if ($nameOk && $relOk && $dobOk && $genOk) {
|
||||||
|
$picked = $candidate;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($picked === null) {
|
||||||
|
$unmatched++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$updates[] = [
|
||||||
|
'id' => (int) $tpaRow['id'],
|
||||||
|
'ref' => (int) $picked['employee_policy_id'],
|
||||||
|
];
|
||||||
|
$matched++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($updates)) {
|
||||||
|
$db->transStart();
|
||||||
|
$db->table('tpa_api_data')->updateBatch($updates, 'id');
|
||||||
|
$db->transComplete();
|
||||||
|
}
|
||||||
|
|
||||||
|
$payload = [
|
||||||
|
'file_id' => $fileId,
|
||||||
|
'scanned' => count($tpaRows),
|
||||||
|
'matched' => $matched,
|
||||||
|
'skipped_already_mapped' => $skipped,
|
||||||
|
'unmatched' => $unmatched,
|
||||||
|
];
|
||||||
|
|
||||||
|
$this->myLogger->logme('error', 'TPA ref reconciliation completed: ' . json_encode($payload));
|
||||||
|
|
||||||
|
return [
|
||||||
|
'status' => true,
|
||||||
|
'message' => 'TPA rows reconciled with employee policies successfully.',
|
||||||
|
'data' => $payload,
|
||||||
|
];
|
||||||
|
} catch (\Throwable $e) {
|
||||||
|
$this->myLogger->logme(
|
||||||
|
'error',
|
||||||
|
'Error in reconTpaApiDataWithEmployeepolicies: ' . $e->getMessage(),
|
||||||
|
['file_id' => $file_id]
|
||||||
|
);
|
||||||
|
|
||||||
|
return [
|
||||||
|
'status' => false,
|
||||||
|
'message' => 'Unable to reconcile TPA rows with employee policies.',
|
||||||
|
'data' => [
|
||||||
|
'file_id' => (int) $file_id,
|
||||||
|
'error' => $e->getMessage(),
|
||||||
|
],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2413,6 +2413,7 @@ class EmployeeRestController extends AdminController
|
|||||||
->select('id,ticket_type, display_name as claim_status')
|
->select('id,ticket_type, display_name as claim_status')
|
||||||
->where('is_active', 1)
|
->where('is_active', 1)
|
||||||
->where('display_name IS NOT NULL OR display_name <> ""')
|
->where('display_name IS NOT NULL OR display_name <> ""')
|
||||||
|
->whereIn('claim_status_id',[1,2,3,4])
|
||||||
->groupBy('display_name')
|
->groupBy('display_name')
|
||||||
->findAll();
|
->findAll();
|
||||||
|
|
||||||
@ -3751,6 +3752,8 @@ class EmployeeRestController extends AdminController
|
|||||||
|
|
||||||
// $fetchData['relationship'] = strtolower($fetchData['relationship']) ?? $fetchData['relationship'];
|
// $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['created_by'] = $fetchData['emp_id'];
|
||||||
|
$fetchData['claim_created_by'] = "USER";
|
||||||
|
|
||||||
// print_r($fetchData); die;
|
// print_r($fetchData); die;
|
||||||
$insert_status = $this->ticketMaster->insert($fetchData);
|
$insert_status = $this->ticketMaster->insert($fetchData);
|
||||||
@ -4523,7 +4526,7 @@ class EmployeeRestController extends AdminController
|
|||||||
// print_r($post_data); die;
|
// print_r($post_data); die;
|
||||||
|
|
||||||
|
|
||||||
$ClientPolicyData = $this->clientPolicyModel
|
$Query = $this->clientPolicyModel
|
||||||
->select("
|
->select("
|
||||||
client_policy.id as client_policy_id ,
|
client_policy.id as client_policy_id ,
|
||||||
client_policy.client_id as client_id,
|
client_policy.client_id as client_id,
|
||||||
@ -4540,10 +4543,14 @@ class EmployeeRestController extends AdminController
|
|||||||
->join('policy_type', 'policy_type.id = client_policy.policy_type_id', 'left')
|
->join('policy_type', 'policy_type.id = client_policy.policy_type_id', 'left')
|
||||||
->where('md5(client_policy.client_id)', $post_data['client_id'])
|
->where('md5(client_policy.client_id)', $post_data['client_id'])
|
||||||
->where('client_policy.client_branch_id', $post_data['client_branch_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'))
|
// ->where('client_policy.policy_status', $this->request->getGet('policy_status'))
|
||||||
->whereIn('client_policy.id', $post_data['policy_id'])
|
if(is_array($post_data['policy_id'])){
|
||||||
->first();
|
$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'])) {
|
if (empty($post_data['client_id'])) {
|
||||||
return $this->respondCreated(['status' => false, 'message' => 'Client is required', 'data' => []]);
|
return $this->respondCreated(['status' => false, 'message' => 'Client is required', 'data' => []]);
|
||||||
|
|||||||
@ -785,7 +785,8 @@ class FhplApiController extends BaseController
|
|||||||
'doa'=>$row['DATE_OF_ADMISSION'],
|
'doa'=>$row['DATE_OF_ADMISSION'],
|
||||||
'dod'=>$row['DATE_OF_DISCHARGE'],
|
'dod'=>$row['DATE_OF_DISCHARGE'],
|
||||||
'claim_status_id'=>$claimStatus,
|
'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_claim_type' => $row['CLAIM_TYPE'] ?? null,
|
||||||
'tpa_ailments' => $row['AILMENT'] ?? null,
|
'tpa_ailments' => $row['AILMENT'] ?? null,
|
||||||
|
|
||||||
|
'claim_created_by' => 'TPA',
|
||||||
'created_at' => date('Y-m-d H:i:s'),
|
'created_at' => date('Y-m-d H:i:s'),
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -1037,6 +1039,7 @@ class FhplApiController extends BaseController
|
|||||||
|
|
||||||
'is_active' => 1,
|
'is_active' => 1,
|
||||||
'created_by' => $file_info[0]['created_by'] ?? null,
|
'created_by' => $file_info[0]['created_by'] ?? null,
|
||||||
|
'action_flag_status' => $row['IsActive'] == 1 ? 'A' : 'D'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -20,6 +20,7 @@ class HealthIndiaApiController extends BaseController
|
|||||||
protected $db;
|
protected $db;
|
||||||
protected $healthIndiaTpaId;
|
protected $healthIndiaTpaId;
|
||||||
protected $claim_type_array;
|
protected $claim_type_array;
|
||||||
|
protected $ticketController;
|
||||||
|
|
||||||
public function __construct()
|
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,
|
'dod' => !empty($row['DATEOF_DISCHARGE']) ? date('Y-m-d', strtotime($row['DATEOF_DISCHARGE'])) : null,
|
||||||
'claim_status_id' => $claimStatus,
|
'claim_status_id' => $claimStatus,
|
||||||
'tpa_id' => $this->healthIndiaTpaId,
|
'tpa_id' => $this->healthIndiaTpaId,
|
||||||
|
'claim_created_by'=> 'TPA',
|
||||||
'created_at' => date('Y-m-d H:i:s')
|
'created_at' => date('Y-m-d H:i:s')
|
||||||
]);
|
]);
|
||||||
$insertedCount++;
|
$insertedCount++;
|
||||||
@ -1010,6 +1012,7 @@ class HealthIndiaApiController extends BaseController
|
|||||||
// TPA extras
|
// TPA extras
|
||||||
'tpa_claim_status' => $status,
|
'tpa_claim_status' => $status,
|
||||||
|
|
||||||
|
'claim_created_by' => 'TPA',
|
||||||
'created_at' => date('Y-m-d H:i:s'),
|
'created_at' => date('Y-m-d H:i:s'),
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -1066,6 +1069,7 @@ class HealthIndiaApiController extends BaseController
|
|||||||
|
|
||||||
'is_active' => 1,
|
'is_active' => 1,
|
||||||
'created_by' => $file_info[0]['created_by'] ?? null,
|
'created_by' => $file_info[0]['created_by'] ?? null,
|
||||||
|
'action_flag_status' => $row['insuredStatus'] == 'Active' ? 'A' : 'D'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
// log_message('error','HEALTH_INDIA - COUNT' . count($mappedRows));
|
// log_message('error','HEALTH_INDIA - COUNT' . count($mappedRows));
|
||||||
|
|||||||
@ -4774,7 +4774,7 @@ class LeadsController extends BaseController
|
|||||||
|
|
||||||
// 🔹 Client Details (Single Row)
|
// 🔹 Client Details (Single Row)
|
||||||
$data['actual_lead_client_details'] = $this->leadModel
|
$data['actual_lead_client_details'] = $this->leadModel
|
||||||
->select('sales_actual_leads.company_name, clients.short_name, sales_actual_leads.email, sales_actual_leads.phone, sales_actual_leads.address, sales_actual_leads.website, sales_actual_leads.gst_number, sales_actual_leads.status, sales_actual_leads.assigned_to')
|
->select('sales_actual_leads.company_name, clients.short_name, clients.client_type, sales_actual_leads.email, sales_actual_leads.phone, sales_actual_leads.address, sales_actual_leads.website, sales_actual_leads.gst_number, sales_actual_leads.status, sales_actual_leads.assigned_to')
|
||||||
->join('clients', 'clients.id = sales_actual_leads.client_id', 'left')
|
->join('clients', 'clients.id = sales_actual_leads.client_id', 'left')
|
||||||
->where('sales_actual_leads.lead_id', $actual_lead_id)
|
->where('sales_actual_leads.lead_id', $actual_lead_id)
|
||||||
->first(); // first row only
|
->first(); // first row only
|
||||||
@ -5527,7 +5527,7 @@ class LeadsController extends BaseController
|
|||||||
*
|
*
|
||||||
* @param string $recipientType insurer|client|internal
|
* @param string $recipientType insurer|client|internal
|
||||||
*/
|
*/
|
||||||
protected function downloadFileFromGoogleSheet(array $lead_data, string $recipientType = 'insurer'): array
|
protected function downloadFileFromGoogleSheet(array $lead_data, string $recipientType = 'insurer'): ?array
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$leadId = (int) ($lead_data['id'] ?? 0);
|
$leadId = (int) ($lead_data['id'] ?? 0);
|
||||||
|
|||||||
@ -506,7 +506,7 @@ class MediAssistApiController extends BaseController
|
|||||||
tm.id,
|
tm.id,
|
||||||
tm.tpa_no as memberId,
|
tm.tpa_no as memberId,
|
||||||
tm.tpa_claim_push_reference_no as claimRefNo,
|
tm.tpa_claim_push_reference_no as claimRefNo,
|
||||||
tm.tpa_claim_id,
|
tm.tpa_claim_id,tm.doa,
|
||||||
tm.claim_number,
|
tm.claim_number,
|
||||||
cp.policy_no as policyNo,
|
cp.policy_no as policyNo,
|
||||||
cp.policy_start_date as startDate,
|
cp.policy_start_date as startDate,
|
||||||
@ -596,7 +596,7 @@ class MediAssistApiController extends BaseController
|
|||||||
"Confirmation Awaited" => 4,
|
"Confirmation Awaited" => 4,
|
||||||
"Information Awaited Reminder" => 4,
|
"Information Awaited Reminder" => 4,
|
||||||
"Information Awaited Final Reminder" => 4,
|
"Information Awaited Final Reminder" => 4,
|
||||||
"Insurer Concurrence Awaited" => 6,
|
"Insurer Concurrence Awaited" => 7,
|
||||||
"Closed" => 12,
|
"Closed" => 12,
|
||||||
|
|
||||||
"Physical Documents Awaited" => 9,
|
"Physical Documents Awaited" => 9,
|
||||||
@ -807,7 +807,7 @@ class MediAssistApiController extends BaseController
|
|||||||
'gender' => strtoupper($row['benefSex'] ?? null),
|
'gender' => strtoupper($row['benefSex'] ?? null),
|
||||||
'self' => strtolower($row['relName'] ?? '') === 'self' ? 1 : 0,
|
'self' => strtolower($row['relName'] ?? '') === 'self' ? 1 : 0,
|
||||||
|
|
||||||
'si' => $row['sum_insured'] ?? null,
|
'si' => $row['sum_Insured'] ?? null,
|
||||||
'doj' => $this->mediDate($row['benefWEF'] ?? null),
|
'doj' => $this->mediDate($row['benefWEF'] ?? null),
|
||||||
|
|
||||||
|
|
||||||
@ -845,7 +845,7 @@ class MediAssistApiController extends BaseController
|
|||||||
tm.id,
|
tm.id,
|
||||||
tm.tpa_no as memberId,
|
tm.tpa_no as memberId,
|
||||||
tm.tpa_claim_push_reference_no as claimRefNo,
|
tm.tpa_claim_push_reference_no as claimRefNo,
|
||||||
tm.doa,
|
tm.doa,tm.claim_no,
|
||||||
cp.policy_no as policyNo,
|
cp.policy_no as policyNo,
|
||||||
cp.policy_start_date as startDate,
|
cp.policy_start_date as startDate,
|
||||||
cp.policy_end_date as endDate,
|
cp.policy_end_date as endDate,
|
||||||
@ -944,7 +944,7 @@ class MediAssistApiController extends BaseController
|
|||||||
"Confirmation Awaited" => 4,
|
"Confirmation Awaited" => 4,
|
||||||
"Information Awaited Reminder" => 4,
|
"Information Awaited Reminder" => 4,
|
||||||
"Information Awaited Final Reminder" => 4,
|
"Information Awaited Final Reminder" => 4,
|
||||||
"Insurer Concurrence Awaited" => 6,
|
"Insurer Concurrence Awaited" => 7,
|
||||||
"Closed" => 12,
|
"Closed" => 12,
|
||||||
|
|
||||||
"Physical Documents Awaited" => 9,
|
"Physical Documents Awaited" => 9,
|
||||||
@ -1191,7 +1191,7 @@ class MediAssistApiController extends BaseController
|
|||||||
"Confirmation Awaited" => 4,
|
"Confirmation Awaited" => 4,
|
||||||
"Information Awaited Reminder" => 4,
|
"Information Awaited Reminder" => 4,
|
||||||
"Information Awaited Final Reminder" => 4,
|
"Information Awaited Final Reminder" => 4,
|
||||||
"Insurer Concurrence Awaited" => 6,
|
"Insurer Concurrence Awaited" => 7,
|
||||||
"Closed" => 12,
|
"Closed" => 12,
|
||||||
|
|
||||||
"Physical Documents Awaited" => 9,
|
"Physical Documents Awaited" => 9,
|
||||||
@ -1317,6 +1317,9 @@ class MediAssistApiController extends BaseController
|
|||||||
//others
|
//others
|
||||||
'tpa_claim_type' => $value['typE_OF_CLAIM'],
|
'tpa_claim_type' => $value['typE_OF_CLAIM'],
|
||||||
'tpa_ailments' => ($value['ailment'] ?? '') . ' - ' . ($value['ailmenT_DESC'] ?? ''),
|
'tpa_ailments' => ($value['ailment'] ?? '') . ' - ' . ($value['ailmenT_DESC'] ?? ''),
|
||||||
|
'claim_created_by' => 'TPA',
|
||||||
|
'tpa_claim_push_reference_no' => $value['clM_COMP_REFNO'] ?? null,
|
||||||
|
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@ -737,6 +737,8 @@ class TicketController extends BaseController
|
|||||||
public function ticket_form($ticket_type)
|
public function ticket_form($ticket_type)
|
||||||
{
|
{
|
||||||
$data = $this->ticket_form_data($ticket_type);
|
$data = $this->ticket_form_data($ticket_type);
|
||||||
|
$data['tab_name'] = "Claims";
|
||||||
|
$data['page_name'] = "Claims";
|
||||||
// dd($data);
|
// dd($data);
|
||||||
return $this->loadLayout('ticket_form_handler', $data);
|
return $this->loadLayout('ticket_form_handler', $data);
|
||||||
}
|
}
|
||||||
@ -1492,6 +1494,7 @@ class TicketController extends BaseController
|
|||||||
|
|
||||||
|
|
||||||
if ($ticket_data) {
|
if ($ticket_data) {
|
||||||
|
$ticket_data['claim_created_by'] = "CRM";
|
||||||
$return_value = $this->ticketMasterModel->insert($ticket_data);
|
$return_value = $this->ticketMasterModel->insert($ticket_data);
|
||||||
if ($return_value) {
|
if ($return_value) {
|
||||||
//mail trigger part
|
//mail trigger part
|
||||||
@ -1936,7 +1939,7 @@ class TicketController extends BaseController
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
$data = $this->request->getPost();
|
$data = $this->request->getPost();
|
||||||
$received_data = sanitizeInputArrayAdvanced($data);
|
$received_data = sanitizeInputArrayAdvanced($data, ['mail_content']);
|
||||||
|
|
||||||
if (isset($received_data['id']) && $received_data['id'] != '') {
|
if (isset($received_data['id']) && $received_data['id'] != '') {
|
||||||
$status = $this->ticketMailTemplateModel->save($received_data);
|
$status = $this->ticketMailTemplateModel->save($received_data);
|
||||||
|
|||||||
@ -1440,6 +1440,7 @@ class TicketServiceController extends AdminController
|
|||||||
if(!empty($data)){
|
if(!empty($data)){
|
||||||
|
|
||||||
$data['file_id'] = $file_id;
|
$data['file_id'] = $file_id;
|
||||||
|
$data['claim_created_by'] = "DUMP";
|
||||||
//insert the claim data to ticket master table
|
//insert the claim data to ticket master table
|
||||||
$insert = $ticketMasterModal->insert($data);
|
$insert = $ticketMasterModal->insert($data);
|
||||||
$inserted_claim_list[] = $insert;
|
$inserted_claim_list[] = $insert;
|
||||||
|
|||||||
@ -1617,6 +1617,7 @@ class VidalApiController extends BaseController
|
|||||||
'doj' => $doj,
|
'doj' => $doj,
|
||||||
'is_active' => 1,
|
'is_active' => 1,
|
||||||
'created_by' => $file_info[0]['created_by'] ?? null,
|
'created_by' => $file_info[0]['created_by'] ?? null,
|
||||||
|
'action_flag_status' => $row['isDeleted'] == 0 ? 'D' : 'A'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -136,7 +136,7 @@ class GlobalPostFileUploadGuard implements FilterInterface
|
|||||||
$response->setStatusCode(403)
|
$response->setStatusCode(403)
|
||||||
->setJSON([
|
->setJSON([
|
||||||
'status' => 'error',
|
'status' => 'error',
|
||||||
'message' => 'File upload rejected: Security policy violation.',
|
'message' => 'File upload rejected: Security policy violation.' . ($reason ? " Reason: $reason." : ''),
|
||||||
'debug' => (ENVIRONMENT === 'development') ? $reason : null
|
'debug' => (ENVIRONMENT === 'development') ? $reason : null
|
||||||
])
|
])
|
||||||
->send();
|
->send();
|
||||||
|
|||||||
@ -366,7 +366,7 @@ class AbhiClaimImportService extends BaseTpaClaimImportService
|
|||||||
$item['priority'] = 1;
|
$item['priority'] = 1;
|
||||||
$item['mode_of_intimation'] = 5;
|
$item['mode_of_intimation'] = 5;
|
||||||
$item['ticket_type_id'] = 1;
|
$item['ticket_type_id'] = 1;
|
||||||
|
$item['claim_created_by'] = 'DUMP_TPA';
|
||||||
|
|
||||||
$mapped[] = $item;
|
$mapped[] = $item;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -432,6 +432,7 @@ class FhplClaimImportService extends BaseTpaClaimImportService
|
|||||||
$item['priority'] = 1;
|
$item['priority'] = 1;
|
||||||
$item['mode_of_intimation'] = 5;
|
$item['mode_of_intimation'] = 5;
|
||||||
$item['ticket_type_id'] = 1;
|
$item['ticket_type_id'] = 1;
|
||||||
|
$item['claim_created_by'] = 'DUMP_TPA';
|
||||||
|
|
||||||
$mapped[] = $item;
|
$mapped[] = $item;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -347,6 +347,7 @@ class IciciClaimImportService extends BaseTpaClaimImportService
|
|||||||
$item['priority'] = 1;
|
$item['priority'] = 1;
|
||||||
$item['mode_of_intimation'] = 5;
|
$item['mode_of_intimation'] = 5;
|
||||||
$item['ticket_type_id'] = 1;
|
$item['ticket_type_id'] = 1;
|
||||||
|
$item['claim_created_by'] = 'DUMP_TPA';
|
||||||
|
|
||||||
$mapped[] = $item;
|
$mapped[] = $item;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -380,6 +380,7 @@ class MediAssistClaimImportService extends BaseTpaClaimImportService
|
|||||||
$item['priority'] = 1;
|
$item['priority'] = 1;
|
||||||
$item['mode_of_intimation'] = 5;
|
$item['mode_of_intimation'] = 5;
|
||||||
$item['ticket_type_id'] = 1;
|
$item['ticket_type_id'] = 1;
|
||||||
|
$item['claim_created_by'] = 'DUMP_TPA';
|
||||||
|
|
||||||
$mapped[] = $item;
|
$mapped[] = $item;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -332,7 +332,7 @@ class RcareClaimImportService extends BaseTpaClaimImportService
|
|||||||
$item['priority'] = 1;
|
$item['priority'] = 1;
|
||||||
$item['mode_of_intimation'] = 5;
|
$item['mode_of_intimation'] = 5;
|
||||||
$item['ticket_type_id'] = 1;
|
$item['ticket_type_id'] = 1;
|
||||||
|
$item['claim_created_by'] = 'DUMP_TPA';
|
||||||
|
|
||||||
$mapped[] = $item;
|
$mapped[] = $item;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -573,6 +573,7 @@ class VidalClaimImportService extends BaseTpaClaimImportService
|
|||||||
$item['priority'] = 1;
|
$item['priority'] = 1;
|
||||||
$item['mode_of_intimation'] = 5;
|
$item['mode_of_intimation'] = 5;
|
||||||
$item['ticket_type_id'] = 1;
|
$item['ticket_type_id'] = 1;
|
||||||
|
$item['claim_created_by'] = 'DUMP_TPA';
|
||||||
|
|
||||||
$mapped[] = $item;
|
$mapped[] = $item;
|
||||||
}
|
}
|
||||||
@ -687,6 +688,7 @@ class VidalClaimImportService extends BaseTpaClaimImportService
|
|||||||
$item['file_id'] = $file_id;
|
$item['file_id'] = $file_id;
|
||||||
$item['created_by'] = get_session_userid() ?? null;
|
$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_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;
|
$mapped[] = $item;
|
||||||
|
|
||||||
|
|||||||
@ -95,6 +95,8 @@ class TicketMasterModel extends Model
|
|||||||
'tpa_ailments',
|
'tpa_ailments',
|
||||||
'claim_dump_ref_id',
|
'claim_dump_ref_id',
|
||||||
'last_updated_by',
|
'last_updated_by',
|
||||||
|
'tpa_shortfall_no',
|
||||||
|
'claim_created_by',
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@ -27,7 +27,8 @@ class TpaApiDataModel extends Model
|
|||||||
'desc',
|
'desc',
|
||||||
'created_by',
|
'created_by',
|
||||||
'si',
|
'si',
|
||||||
'doj'
|
'doj',
|
||||||
|
'rec_type'
|
||||||
];
|
];
|
||||||
|
|
||||||
// protected $useTimestamps = true;
|
// protected $useTimestamps = true;
|
||||||
|
|||||||
@ -1,15 +1,105 @@
|
|||||||
|
<?php
|
||||||
|
$batch_header_labels = [
|
||||||
|
'S.No', 'Batch Code', 'File Name', 'Client', 'Client Branch', 'Client Policy',
|
||||||
|
'Event Type', 'Insurer/ TPA', 'Action', 'Count', '(₹)Amount', 'User/Time', 'Status', 'Action',
|
||||||
|
];
|
||||||
|
$batch_col_count = count($batch_header_labels);
|
||||||
|
$batch_col_max_len = array_fill(0, $batch_col_count, 0);
|
||||||
|
for ($i = 0; $i < $batch_col_count; $i++) {
|
||||||
|
$batch_col_max_len[$i] = mb_strlen($batch_header_labels[$i]);
|
||||||
|
}
|
||||||
|
$insurer_or_tpa = $insurer_or_tpa ?? [];
|
||||||
|
$import_or_export = $import_or_export ?? [];
|
||||||
|
|
||||||
|
if (!empty($batch_list) && is_array($batch_list)) {
|
||||||
|
foreach ($batch_list as $key => $file) {
|
||||||
|
$batch_col_max_len[0] = max($batch_col_max_len[0], mb_strlen((string) ($key + 1)));
|
||||||
|
$batch_col_max_len[1] = max($batch_col_max_len[1], mb_strlen((string) ($file['batch_code'] ?? '')));
|
||||||
|
$batch_col_max_len[2] = max($batch_col_max_len[2], mb_strlen((string) ($file['file_name'] ?? '')));
|
||||||
|
$batch_col_max_len[3] = max($batch_col_max_len[3], mb_strlen((string) ($file['client_short_name'] ?? '')));
|
||||||
|
$batch_col_max_len[4] = max($batch_col_max_len[4], mb_strlen((string) ($file['branch_name'] ?? '')));
|
||||||
|
$policy_display_len = trim(
|
||||||
|
(isset($file['policy_type']) ? $file['policy_type'] : '')
|
||||||
|
. ' - '
|
||||||
|
. (isset($file['policy_no']) ? $file['policy_no'] : '')
|
||||||
|
);
|
||||||
|
$batch_col_max_len[5] = max($batch_col_max_len[5], mb_strlen($policy_display_len));
|
||||||
|
$batch_col_max_len[6] = max($batch_col_max_len[6], mb_strlen((string) ($file['event_type'] ?? '')));
|
||||||
|
$insLabel = $insurer_or_tpa[$file['insurer_or_tpa'] ?? ''] ?? '';
|
||||||
|
$batch_col_max_len[7] = max($batch_col_max_len[7], mb_strlen((string) $insLabel));
|
||||||
|
$actKey = $file['actions'] ?? '';
|
||||||
|
$actLabel = $import_or_export[$actKey] ?? ucfirst((string) $actKey);
|
||||||
|
$batch_col_max_len[8] = max($batch_col_max_len[8], mb_strlen((string) $actLabel));
|
||||||
|
$countStr = ($file['count'] ?? null) === null ? '-' : (string) $file['count'];
|
||||||
|
$batch_col_max_len[9] = max($batch_col_max_len[9], mb_strlen($countStr));
|
||||||
|
$batch_col_max_len[10] = max($batch_col_max_len[10], mb_strlen((string) format_indian_number($file['amount'])));
|
||||||
|
$userTime = change_date_format($file['created_at'] ?? '', 'Y-m-d H:i:s', 'd M Y h:i a')
|
||||||
|
. ' by '
|
||||||
|
. get_username($file['created_by'] ?? '');
|
||||||
|
$batch_col_max_len[11] = max($batch_col_max_len[11], mb_strlen($userTime));
|
||||||
|
$batch_col_max_len[12] = max($batch_col_max_len[12], mb_strlen((string) ($file['status'] ?? '')));
|
||||||
|
$batch_col_max_len[13] = max($batch_col_max_len[13], 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$batch_col_min_px = [48, 72, 100, 72, 80, 120, 88, 96, 72, 56, 80, 160, 96, 52];
|
||||||
|
$batch_col_max_px = [64, 220, 480, 240, 240, 640, 200, 200, 140, 110, 160, 560, 320, 64];
|
||||||
|
$batch_col_width_px = [];
|
||||||
|
for ($i = 0; $i < $batch_col_count; $i++) {
|
||||||
|
$chars = max($batch_col_max_len[$i], mb_strlen($batch_header_labels[$i]));
|
||||||
|
$px = (int) round($chars * 7.0 + 26);
|
||||||
|
$batch_col_width_px[$i] = min(
|
||||||
|
$batch_col_max_px[$i],
|
||||||
|
max($batch_col_min_px[$i], $px)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
?>
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
.reload:hover {
|
.reload:hover {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.truncate {
|
/* Column widths from max data length (see PHP above).
|
||||||
max-width: 80px;
|
Avoid table-layout:fixed + identical max-width on TH — it fights DataTables col sizing and skews TH vs TD.
|
||||||
white-space: nowrap;
|
Do not max-width THEAD cells (sort icons use position:absolute; narrow max clips them). */
|
||||||
|
<?php for ($i = 0; $i < $batch_col_count; $i++) : ?>
|
||||||
|
#batch-list-table_wrapper .dataTables_scrollHead table thead th:nth-child(<?= $i + 1 ?>),
|
||||||
|
#batch-list-table thead th:nth-child(<?= $i + 1 ?>) {
|
||||||
|
min-width: <?= (int) $batch_col_width_px[$i] ?>px;
|
||||||
|
width: <?= (int) $batch_col_width_px[$i] ?>px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
vertical-align: middle;
|
||||||
|
overflow: visible !important;
|
||||||
|
}
|
||||||
|
#batch-list-table tbody td:nth-child(<?= $i + 1 ?>) {
|
||||||
|
width: <?= (int) $batch_col_width_px[$i] ?>px;
|
||||||
|
max-width: <?= (int) $batch_col_width_px[$i] ?>px;
|
||||||
|
min-width: <?= (int) $batch_col_width_px[$i] ?>px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
<?php endfor; ?>
|
||||||
|
#batch-list-table tbody td:nth-child(1),
|
||||||
|
#batch-list-table tbody td:nth-child(2),
|
||||||
|
#batch-list-table tbody td:nth-child(3),
|
||||||
|
#batch-list-table tbody td:nth-child(4),
|
||||||
|
#batch-list-table tbody td:nth-child(5),
|
||||||
|
#batch-list-table tbody td:nth-child(6),
|
||||||
|
#batch-list-table tbody td:nth-child(7),
|
||||||
|
#batch-list-table tbody td:nth-child(8),
|
||||||
|
#batch-list-table tbody td:nth-child(9),
|
||||||
|
#batch-list-table tbody td:nth-child(10),
|
||||||
|
#batch-list-table tbody td:nth-child(11),
|
||||||
|
#batch-list-table tbody td:nth-child(12) {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
#batch-list-table tbody td:nth-child(13),
|
||||||
|
#batch-list-table tbody td:nth-child(14) {
|
||||||
|
overflow: visible;
|
||||||
|
text-overflow: clip;
|
||||||
|
}
|
||||||
|
|
||||||
/* TPA variation modal layout */
|
/* TPA variation modal layout */
|
||||||
#tpa_variation_modal .modal-dialog {
|
#tpa_variation_modal .modal-dialog {
|
||||||
@ -93,31 +183,50 @@
|
|||||||
#tpa_variation_modal .dataTables_wrapper .dt-top .dataTables_filter {
|
#tpa_variation_modal .dataTables_wrapper .dt-top .dataTables_filter {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
/* Compact table + buttons (NHance) */
|
/* Compact tbody; thead must keep padding-right for sort triangles (custom.css uses ~2.35rem). */
|
||||||
#tickets-table thead th,
|
#batch-list-table tbody td {
|
||||||
#tickets-table tbody td {
|
|
||||||
padding: 5px 11px !important;
|
padding: 5px 11px !important;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
line-height: 1.25;
|
line-height: 1.25;
|
||||||
}
|
}
|
||||||
|
#batch-list-table_wrapper .dataTables_scrollHead table thead th,
|
||||||
|
#batch-list-table thead th {
|
||||||
|
padding: 5px 2.35rem 5px 11px !important;
|
||||||
|
font-size: 13px;
|
||||||
|
line-height: 1.25;
|
||||||
|
}
|
||||||
|
|
||||||
/* Action dropdown toggle in rows */
|
/* Action dropdown toggle in rows */
|
||||||
#tickets-table .dropdown-toggle.btn-sm {
|
#batch-list-table .dropdown-toggle.btn-sm {
|
||||||
padding: 4px 9px !important;
|
padding: 4px 9px !important;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* DataTables toolbar buttons (Export/Filter/Clear Filter) */
|
/* DataTables toolbar buttons (Export/Filter/Clear Filter) */
|
||||||
#tickets-table_wrapper .dt-buttons .btn {
|
#batch-list-table_wrapper .dt-buttons .btn {
|
||||||
padding: 6px 13px !important;
|
padding: 6px 13px !important;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tickets-table_wrapper .dt-buttons .btn .btn-custom {
|
#batch-list-table_wrapper .dt-buttons .btn .btn-custom {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* One horizontal scrollbar without breaking thead/tbody width sync:
|
||||||
|
* - Do NOT set overflow-x:visible on .dataTables_scrollBody — that breaks DataTables’
|
||||||
|
* scrollHead/scrollBody width matching so <th> looks cut off.
|
||||||
|
* - When there is no .dataTables_scrollBody (scrollX off, single table), outer scrolls.
|
||||||
|
* - When .dataTables_scrollBody exists (scrollX on), only that inner strip scrolls (custom.css);
|
||||||
|
* outer .table-responsive stays overflow visible via nh-dt-no-outer-scroll / :has() rules.
|
||||||
|
*/
|
||||||
|
#second_page .card-body > .table-responsive:not(:has(.dataTables_scrollBody)) {
|
||||||
|
overflow-x: auto !important;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div class="col-12" id="second_page">
|
<div class="col-12" id="second_page">
|
||||||
@ -130,7 +239,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table data-custom-table-css="table" id="tickets-table" class="table table-hover m-0 table-centered dt-responsive w-100">
|
<table data-custom-table-css="table" id="batch-list-table" class="table table-hover m-0 table-centered nowrap w-100">
|
||||||
<thead class="bg-light">
|
<thead class="bg-light">
|
||||||
<tr>
|
<tr>
|
||||||
<th class="font-weight-medium">S.No </th>
|
<th class="font-weight-medium">S.No </th>
|
||||||
@ -159,15 +268,34 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td class="text-center"><b><?php echo ($key + 1) ?></b></td>
|
<td class="text-center"><b><?php echo ($key + 1) ?></b></td>
|
||||||
<td><?php echo $file['batch_code'] ?></td>
|
<td><?php echo $file['batch_code'] ?></td>
|
||||||
<td style="overflow: hidden;" class="reload truncate" data-toggle="tooltip" data-placement="top" title="<?php echo $file['file_name'] ?>">
|
<td class="reload batch-file-cell" data-toggle="tooltip" data-placement="top" title="<?php echo htmlspecialchars($file['file_name'] ?? '', ENT_QUOTES, 'UTF-8') ?>">
|
||||||
<?php echo $file['file_name']?>
|
<?php echo $file['file_name']?>
|
||||||
</td>
|
</td>
|
||||||
<td><?php echo $file['client_short_name'] ?></td>
|
<td><?php echo $file['client_short_name'] ?></td>
|
||||||
<td><?php echo $file['branch_name'] ?></td>
|
<td><?php echo $file['branch_name'] ?></td>
|
||||||
<!-- <td><?php echo isset($file['policy_name']) ? $file['policy_name'] : '' ?> - <?php echo isset($file['policy_no']) ? $file['policy_no'] : '' ?> - <?php echo isset($file['policy_type']) ? $file['policy_type'] : '' ?></td> -->
|
<!-- <td><?php echo isset($file['policy_name']) ? $file['policy_name'] : '' ?> - <?php echo isset($file['policy_no']) ? $file['policy_no'] : '' ?> - <?php echo isset($file['policy_type']) ? $file['policy_type'] : '' ?></td> -->
|
||||||
<td><?php echo isset($file['policy_type']) ? $file['policy_type'] : '' ?> - <?php echo isset($file['policy_no']) ? $file['policy_no'] : '' ?></td>
|
<?php
|
||||||
|
$policy_display = trim(
|
||||||
|
(isset($file['policy_type']) ? $file['policy_type'] : '')
|
||||||
|
. ' - '
|
||||||
|
. (isset($file['policy_no']) ? $file['policy_no'] : '')
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<td class="batch-policy-cell reload"
|
||||||
|
data-toggle="tooltip"
|
||||||
|
data-placement="top"
|
||||||
|
title="<?= esc($policy_display) ?>"><?= esc($policy_display) ?></td>
|
||||||
<td><?php echo $file['event_type'] ?></td>
|
<td><?php echo $file['event_type'] ?></td>
|
||||||
<td><?php echo $insurer_or_tpa[$file['insurer_or_tpa']] ?></td>
|
|
||||||
|
<td><?php echo $insurer_or_tpa[$file['insurer_or_tpa']] ?>
|
||||||
|
|
||||||
|
<?php $insurer_or_tpa_display = $insurer_or_tpa[$file['insurer_or_tpa']] == 'TPA' ? $file['tpa_short_name'] : $file['insurer_short_name'] ?>
|
||||||
|
<a href=""
|
||||||
|
class="fe-alert-circle" style="color: #000;" aria-hidden="true"
|
||||||
|
data-toggle="tooltip" data-placement="top" title="<?php echo $insurer_or_tpa_display ?>"></a>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
<td><?php echo $import_or_export[$file['actions']] ?? ucfirst($file['actions']) ?></td>
|
<td><?php echo $import_or_export[$file['actions']] ?? ucfirst($file['actions']) ?></td>
|
||||||
<td><?php echo $file['count'] == null ? '-' : $file['count'] ?></td>
|
<td><?php echo $file['count'] == null ? '-' : $file['count'] ?></td>
|
||||||
|
|
||||||
@ -347,7 +475,7 @@
|
|||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<ul class="nav nav-tabs" id="tpaVariationTabs" role="tablist">
|
<ul class="nav nav-tabs" id="tpaVariationTabs" role="tablist">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link active" id="not-in-nhance-tab" data-toggle="tab" href="#not_in_nhance_tab" role="tab" aria-controls="not_in_nhance_tab" aria-selected="true">Not in Nhance</a>
|
<a class="nav-link active active_tab" id="not-in-nhance-tab" data-toggle="tab" href="#not_in_nhance_tab" role="tab" aria-controls="not_in_nhance_tab" aria-selected="true">Not in Nhance</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" id="not-in-tpa-tab" data-toggle="tab" href="#not_in_tpa_tab" role="tab" aria-controls="not_in_tpa_tab" aria-selected="false">Not in TPA</a>
|
<a class="nav-link" id="not-in-tpa-tab" data-toggle="tab" href="#not_in_tpa_tab" role="tab" aria-controls="not_in_tpa_tab" aria-selected="false">Not in TPA</a>
|
||||||
@ -439,6 +567,23 @@
|
|||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** Activate a TPA variation tab by id (not-in-nhance-tab, not-in-tpa-tab, need-to-review-tab). Works without jQuery .tab('show'). */
|
||||||
|
function showTPAVariationTabByLinkId(tabLinkId) {
|
||||||
|
var paneMap = {
|
||||||
|
'not-in-nhance-tab': 'not_in_nhance_tab',
|
||||||
|
'not-in-tpa-tab': 'not_in_tpa_tab',
|
||||||
|
'need-to-review-tab': 'need_to_review_tab'
|
||||||
|
};
|
||||||
|
var paneId = paneMap[tabLinkId];
|
||||||
|
if (!paneId) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$('#tpaVariationTabs .nav-link').removeClass('active').attr('aria-selected', 'false');
|
||||||
|
$('#' + tabLinkId).addClass('active').attr('aria-selected', 'true');
|
||||||
|
$('#tpaVariationTabContent .tab-pane').removeClass('show active');
|
||||||
|
$('#' + paneId).addClass('show active');
|
||||||
|
}
|
||||||
|
|
||||||
function renderVariationTable(tableSelector, rows, columns) {
|
function renderVariationTable(tableSelector, rows, columns) {
|
||||||
const $table = $(tableSelector);
|
const $table = $(tableSelector);
|
||||||
const $thead = $table.find('thead');
|
const $thead = $table.find('thead');
|
||||||
@ -515,8 +660,10 @@
|
|||||||
renderVariationTable('#not_in_tpa_table', notInTpa, tpaVariationColumns.not_in_tpa);
|
renderVariationTable('#not_in_tpa_table', notInTpa, tpaVariationColumns.not_in_tpa);
|
||||||
renderVariationTable('#need_to_review_table', reviewData, tpaVariationColumns.need_to_review);
|
renderVariationTable('#need_to_review_table', reviewData, tpaVariationColumns.need_to_review);
|
||||||
|
|
||||||
const activeId = $('#tpaVariationTabs .nav-link.active').attr('id') || 'not-in-nhance-tab';
|
// Default tab: Not in Nhance — select tab and init DataTable for #not_in_nhance_table as soon as data is rendered.
|
||||||
adjustVariationTableByTabId(activeId);
|
showTPAVariationTabByLinkId('not-in-nhance-tab');
|
||||||
|
updateTPAProceedButton('not-in-nhance-tab');
|
||||||
|
adjustVariationTableByTabId('not-in-nhance-tab');
|
||||||
}
|
}
|
||||||
|
|
||||||
function showTPAVariationModal() {
|
function showTPAVariationModal() {
|
||||||
@ -650,8 +797,10 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
$('#tpa_variation_modal').on('shown.bs.modal', function () {
|
$('#tpa_variation_modal').on('shown.bs.modal', function () {
|
||||||
const activeId = $('#tpaVariationTabs .nav-link.active').attr('id') || 'not-in-nhance-tab';
|
// Always show "Not in Nhance" first; re-measure DataTable now that the modal is visible.
|
||||||
adjustVariationTableByTabId(activeId);
|
showTPAVariationTabByLinkId('not-in-nhance-tab');
|
||||||
|
updateTPAProceedButton('not-in-nhance-tab');
|
||||||
|
adjustVariationTableByTabId('not-in-nhance-tab');
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#tpa_variation_modal').on('hidden.bs.modal', function () {
|
$('#tpa_variation_modal').on('hidden.bs.modal', function () {
|
||||||
@ -660,10 +809,40 @@
|
|||||||
destroyVariationDataTable('#need_to_review_table');
|
destroyVariationDataTable('#need_to_review_table');
|
||||||
});
|
});
|
||||||
|
|
||||||
const batchListTable = $('#tickets-table').DataTable({
|
/* footer.php sets scrollX/scrollY on $.fn.dataTable.defaults — force off for this init so DT does not split thead into .dataTables_scrollHead / tbody into .dataTables_scrollBody (only the body strip would scroll horizontally). */
|
||||||
|
var _dtDefScroll = {
|
||||||
|
scrollX: $.fn.dataTable.defaults.scrollX,
|
||||||
|
scrollY: $.fn.dataTable.defaults.scrollY,
|
||||||
|
scrollCollapse: $.fn.dataTable.defaults.scrollCollapse
|
||||||
|
};
|
||||||
|
$.extend($.fn.dataTable.defaults, { scrollX: false, scrollY: false, scrollCollapse: false });
|
||||||
|
|
||||||
|
const batchListTable = $('#batch-list-table').DataTable({
|
||||||
dom: "<'row'<'col-sm-7'f><'col-sm-5 text-right'B>>" + // Filter left, buttons right
|
dom: "<'row'<'col-sm-7'f><'col-sm-5 text-right'B>>" + // Filter left, buttons right
|
||||||
"<'row'<'col-sm-12'tr>>" +
|
"<'row'<'col-sm-12'tr>>" +
|
||||||
"<'row align-items-center'<'col-5 text-start'i><'col-7 d-flex justify-content-end align-items-center'<'me-2'l>p>>", lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
"<'row align-items-center'<'col-5 text-start'i><'col-7 d-flex justify-content-end align-items-center'<'me-2'l>p>>",
|
||||||
|
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||||
|
scrollX: false,
|
||||||
|
scrollY: false,
|
||||||
|
scrollCollapse: false,
|
||||||
|
initComplete: function () {
|
||||||
|
var $wrap = $(this.api().table().container());
|
||||||
|
var $body = $wrap.find('.dataTables_scrollBody');
|
||||||
|
var $head = $wrap.find('.dataTables_scrollHead');
|
||||||
|
if ($body.length && $head.length) {
|
||||||
|
$body.off('scroll.nhBatchHScroll').on('scroll.nhBatchHScroll', function () {
|
||||||
|
$head.scrollLeft($(this).scrollLeft());
|
||||||
|
});
|
||||||
|
$head.off('scroll.nhBatchHScroll').on('scroll.nhBatchHScroll', function () {
|
||||||
|
$body.scrollLeft($(this).scrollLeft());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
columnDefs: [
|
||||||
|
<?php for ($i = 0; $i < $batch_col_count; $i++) : ?>
|
||||||
|
{ targets: <?= $i ?>, width: '<?= (int) $batch_col_width_px[$i] ?>px' },
|
||||||
|
<?php endfor; ?>
|
||||||
|
],
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
extend: 'collection',
|
extend: 'collection',
|
||||||
@ -710,6 +889,8 @@
|
|||||||
responsive: false
|
responsive: false
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$.extend($.fn.dataTable.defaults, _dtDefScroll);
|
||||||
|
|
||||||
// Keep TH and TD widths in sync after any table redraw (search/sort/paginate).
|
// Keep TH and TD widths in sync after any table redraw (search/sort/paginate).
|
||||||
batchListTable.on('draw.dt', function () {
|
batchListTable.on('draw.dt', function () {
|
||||||
batchListTable.columns.adjust();
|
batchListTable.columns.adjust();
|
||||||
|
|||||||
@ -85,6 +85,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
<script>
|
||||||
|
var pageHideMainNavTitle = true;
|
||||||
|
var pageTitle = 'Claim Dump Upload';
|
||||||
|
</script>
|
||||||
|
|
||||||
<!-- <div class="row">
|
<!-- <div class="row">
|
||||||
<div class="col-xl-12" style="margin-left: 14px;max-width: 98%;">
|
<div class="col-xl-12" style="margin-left: 14px;max-width: 98%;">
|
||||||
@ -125,12 +129,12 @@
|
|||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="row" style="padding-bottom: 10px;">
|
<!-- <div class="row" style="padding-bottom: 10px;">
|
||||||
<div class="col-6" style="align-self: center;">
|
<div class="col-6" style="align-self: center;">
|
||||||
<h4 style="position: relative;">Claim Dump Upload</h4>
|
<h4 style="position: relative;">Claim Dump Upload</h4>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div> -->
|
||||||
<table data-custom-table-css="table" class="table table-hover m-0 table-centered w-100" cellspacing="0" id="tickets-table">
|
<table data-custom-table-css="table" class="table table-hover m-0 table-centered w-100" cellspacing="0" id="tickets-table">
|
||||||
<thead class="bg-light">
|
<thead class="bg-light">
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@ -162,7 +162,7 @@ input:checked + .slider:before {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<small class="mt-1 text-muted d-block">Allowed: PNG, JPG, JPEG. Size : 200KB Dimension : 100 X 100 Pixels</small>
|
<small class="mt-1 text-muted d-block">Allowed: JPG, JPEG, PNG. Size : 200KB Dimension : 100 X 100 Pixels</small>
|
||||||
<div id="client_logo_error_container"></div>
|
<div id="client_logo_error_container"></div>
|
||||||
|
|
||||||
<!-- Hidden File Input -->
|
<!-- Hidden File Input -->
|
||||||
@ -465,7 +465,7 @@ input:checked + .slider:before {
|
|||||||
$.each(res.data, function (index, item) {
|
$.each(res.data, function (index, item) {
|
||||||
var row = `<tr>
|
var row = `<tr>
|
||||||
<td> ${item.file_name}</td>
|
<td> ${item.file_name}</td>
|
||||||
<td id="form_${item.id}" style=""><form class="ajax" ><input class="file-input__input" type="file" name="file_name" accept=".jpg,.jpeg,.png"><br><small class="text-muted">Allowed: PNG, JPG, JPEG.</small>
|
<td id="form_${item.id}" style=""><form class="ajax" ><input class="file-input__input" type="file" name="file_name" accept=".jpg,.jpeg,.png"><br><small class="text-muted">Allowed: JPG, JPEG, PNG.</small>
|
||||||
<input type="hidden" class="form-control" value="<?= csrf_hash() ?>" name="<?= csrf_token() ?>" />
|
<input type="hidden" class="form-control" value="<?= csrf_hash() ?>" name="<?= csrf_token() ?>" />
|
||||||
<input type="hidden" class="form-control" value="${item.id}" name="kyc_doc_type_id" />
|
<input type="hidden" class="form-control" value="${item.id}" name="kyc_doc_type_id" />
|
||||||
<input type="hidden" name="client_id" id="id_for_kyc_file" value="${client_id_for_file}"/>
|
<input type="hidden" name="client_id" id="id_for_kyc_file" value="${client_id_for_file}"/>
|
||||||
|
|||||||
@ -220,7 +220,7 @@
|
|||||||
<input type="hidden" id="file_upload_actions" name="upload-action-type">
|
<input type="hidden" id="file_upload_actions" name="upload-action-type">
|
||||||
<input type="file" id="fileInput" name="emplist" required
|
<input type="file" id="fileInput" name="emplist" required
|
||||||
accept=" application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel,application/vnd.oasis.opendocument.spreadsheet">
|
accept=" application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel,application/vnd.oasis.opendocument.spreadsheet">
|
||||||
<small class="text-muted d-block">Allowed: XLS, XLSX. Size : 25MB Dimension : 100 X 100</small>
|
<small class="text-muted d-block">Allowed: XLS, XLSX. Size : 25MB</small>
|
||||||
<button type="submit" class="btn btn-primary">Upload</button>
|
<button type="submit" class="btn btn-primary">Upload</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -230,7 +230,7 @@
|
|||||||
<input type="hidden" id="hr_file_upload_actions" name="upload-action-type">
|
<input type="hidden" id="hr_file_upload_actions" name="upload-action-type">
|
||||||
<input type="file" id="fileInput" name="emplist" required
|
<input type="file" id="fileInput" name="emplist" required
|
||||||
accept=" application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel,application/vnd.oasis.opendocument.spreadsheet">
|
accept=" application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel,application/vnd.oasis.opendocument.spreadsheet">
|
||||||
<small class="text-muted d-block">Allowed: XLS, XLSX. Size : 25MB Dimension : 100 X 100</small>
|
<small class="text-muted d-block">Allowed: XLS, XLSX. Size : 25MB</small>
|
||||||
<button type="submit" class="btn btn-primary">Upload</button>
|
<button type="submit" class="btn btn-primary">Upload</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -258,7 +258,7 @@ table.dataTable thead th {
|
|||||||
<button class="scroll-btn left-btn" type="button">◀</button>
|
<button class="scroll-btn left-btn" type="button">◀</button>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item d-flex justify-content-center align-items-center">
|
<li class="nav-item d-flex justify-content-center align-items-center">
|
||||||
<a href="#general-q-tab" data-toggle="tab" aria-expanded="false" class="nav-link px-3 py-2 active-tab " id="general_tab">
|
<a href="#general-q-tab" data-toggle="tab" aria-expanded="false" class="nav-link px-3 py-2 active-tab active" id="general_tab">
|
||||||
<span class="mr-1"><i class="mdi mdi-contacts"></i></span>
|
<span class="mr-1"><i class="mdi mdi-contacts"></i></span>
|
||||||
<span class="d-none d-sm-inline-block ">Data From Client</span>
|
<span class="d-none d-sm-inline-block ">Data From Client</span>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@ -176,7 +176,7 @@ input:checked + .slider:before {
|
|||||||
<i class="mdi mdi-upload additional-icon"></i>
|
<i class="mdi mdi-upload additional-icon"></i>
|
||||||
</div>
|
</div>
|
||||||
<div id="logo_error_container"></div>
|
<div id="logo_error_container"></div>
|
||||||
<small class="text-muted">Allowed: JPG, JPEG, PNG. Max size: 200KB.</small>
|
<small class="text-muted">Allowed: JPG, JPEG, PNG. Size: 200KB.</small>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<img src="<?= isset($insurer['insurer_logo']) && !empty($insurer['insurer_logo']) ? base_url() . "public/uploads/logo/" . $insurer['insurer_logo'] : base_url() . "public/assets/images/avatar_2x.png" ?>"
|
<img src="<?= isset($insurer['insurer_logo']) && !empty($insurer['insurer_logo']) ? base_url() . "public/uploads/logo/" . $insurer['insurer_logo'] : base_url() . "public/assets/images/avatar_2x.png" ?>"
|
||||||
|
|||||||
@ -2516,6 +2516,9 @@
|
|||||||
$('#client_name').val(actualLeadClientName);
|
$('#client_name').val(actualLeadClientName);
|
||||||
|
|
||||||
$('#gst').val(actual_lead_client_details.gst_number || '');
|
$('#gst').val(actual_lead_client_details.gst_number || '');
|
||||||
|
if (actual_lead_client_details.client_type !== undefined && actual_lead_client_details.client_type !== null && actual_lead_client_details.client_type !== '') {
|
||||||
|
$('#client_type').val(String(actual_lead_client_details.client_type));
|
||||||
|
}
|
||||||
|
|
||||||
// existingShortName = actual_lead_client_details.short_name || '';
|
// existingShortName = actual_lead_client_details.short_name || '';
|
||||||
// if (existingShortName) {
|
// if (existingShortName) {
|
||||||
|
|||||||
@ -525,10 +525,14 @@ if (isset($selected_lead_type)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(client_type == ""){
|
if(client_type == ""){
|
||||||
|
var aid = $('#actual_lead_id').val();
|
||||||
|
if (!aid || aid === '0') {
|
||||||
toastr.warning('Please select the client type', 'Warning');
|
toastr.warning('Please select the client type', 'Warning');
|
||||||
$('#client_short_name').val('')
|
$('#client_short_name').val('');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// Actual-lead autofill: short name may be set before client type is chosen; do not clear it.
|
||||||
|
}
|
||||||
|
|
||||||
let value = $(input).val();
|
let value = $(input).val();
|
||||||
let label = $(input).closest('.form-group').find('label').text().replace('*', '').trim();
|
let label = $(input).closest('.form-group').find('label').text().replace('*', '').trim();
|
||||||
|
|||||||
@ -853,8 +853,10 @@ var pageBackButton = '<a href="<?= base_url('leads/list') ?>" class="topbar-icon
|
|||||||
// --- Re-populate Actual Lead data if it was cleared ---
|
// --- Re-populate Actual Lead data if it was cleared ---
|
||||||
if ($('#actual_lead_id').val() && $('#actual_lead_id').val() != 0) {
|
if ($('#actual_lead_id').val() && $('#actual_lead_id').val() != 0) {
|
||||||
$('#client_name').val(actualLeadClientName);
|
$('#client_name').val(actualLeadClientName);
|
||||||
// Re-generate short name from the stored client name to ensure consistency
|
if (actualLeadShortName.trim() !== '') {
|
||||||
if (actualLeadClientName.trim() !== '') {
|
$('#client_short_name').val(actualLeadShortName);
|
||||||
|
} else if (actualLeadClientName.trim() !== '') {
|
||||||
|
// Fallback only when no persisted short name is available.
|
||||||
let baseName = actualLeadClientName
|
let baseName = actualLeadClientName
|
||||||
.trim()
|
.trim()
|
||||||
.substring(0, 10)
|
.substring(0, 10)
|
||||||
@ -1359,15 +1361,16 @@ var pageBackButton = '<a href="<?= base_url('leads/list') ?>" class="topbar-icon
|
|||||||
$('#client_name').val(actualLeadClientName);
|
$('#client_name').val(actualLeadClientName);
|
||||||
|
|
||||||
$('#gst').val(actual_lead_client_details.gst_number || '');
|
$('#gst').val(actual_lead_client_details.gst_number || '');
|
||||||
// existingShortName = actual_lead_client_details.short_name || '';
|
if (actual_lead_client_details.client_type !== undefined && actual_lead_client_details.client_type !== null && actual_lead_client_details.client_type !== '') {
|
||||||
// if (existingShortName) {
|
$('#client_type').val(String(actual_lead_client_details.client_type));
|
||||||
// // ── Short name EXISTS — just populate and validate ────────
|
}
|
||||||
// $('#client_short_name').val(existingShortName);
|
let existingShortName = actual_lead_client_details.short_name || '';
|
||||||
// // validateInput($('#client_short_name')[0], 'clients', 'short_name');
|
if (existingShortName) {
|
||||||
|
// Prefer persisted short name while editing.
|
||||||
// } else {}
|
actualLeadShortName = existingShortName;
|
||||||
// Auto-generate short name from company name
|
$('#client_short_name').val(existingShortName);
|
||||||
// Use a small delay to ensure DOM is ready
|
} else {
|
||||||
|
// Fallback: generate only when short name is unavailable.
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
let baseName = actual_lead_client_details.company_name
|
let baseName = actual_lead_client_details.company_name
|
||||||
.trim()
|
.trim()
|
||||||
@ -1378,6 +1381,7 @@ var pageBackButton = '<a href="<?= base_url('leads/list') ?>" class="topbar-icon
|
|||||||
makeUniqueShortName(baseName);
|
makeUniqueShortName(baseName);
|
||||||
}, 300);
|
}, 300);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Auto-generate short name from client name on user input.
|
// Auto-generate short name from client name on user input.
|
||||||
$('#client_name').on('input', function() {
|
$('#client_name').on('input', function() {
|
||||||
|
|||||||
@ -1010,7 +1010,7 @@
|
|||||||
<div class="form-group col-md-5">
|
<div class="form-group col-md-5">
|
||||||
<label for="file">Upload File<span class="text-danger">${required_star}</span></label>
|
<label for="file">Upload File<span class="text-danger">${required_star}</span></label>
|
||||||
<input type="file" class="form-control" id="file_name" name="file[]" ${required} accept=".pdf,.jpg,.jpeg,.png">
|
<input type="file" class="form-control" id="file_name" name="file[]" ${required} accept=".pdf,.jpg,.jpeg,.png">
|
||||||
<small class="text-muted d-block">Allowed: PDF, XLSX, XLS, PNG, JPG, JPEG. <= Default</small>
|
<small class="text-muted d-block">Allowed: PDF, PNG, JPG, JPEG. </small>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-2" style="position: relative;top: 28px;">
|
<div class="form-group col-md-2" style="position: relative;top: 28px;">
|
||||||
<a class="btn btn-danger waves-effect waves-light" onclick="removeHTMLInput(this, '${container_id}')">x</a>
|
<a class="btn btn-danger waves-effect waves-light" onclick="removeHTMLInput(this, '${container_id}')">x</a>
|
||||||
|
|||||||
@ -321,9 +321,11 @@
|
|||||||
<input type="hidden" id="entity_type_id">
|
<input type="hidden" id="entity_type_id">
|
||||||
<div class="row" id="inception_form">
|
<div class="row" id="inception_form">
|
||||||
<div class="col-xl-12" style="max-width: 100% !important;">
|
<div class="col-xl-12" style="max-width: 100% !important;">
|
||||||
|
<!--
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="row" style="margin-bottom:1rem;">
|
-->
|
||||||
|
<!-- <div class="row" style="margin-bottom:1rem;"> -->
|
||||||
|
|
||||||
<!-- <div class="col-6" style="align-self: center;">
|
<!-- <div class="col-6" style="align-self: center;">
|
||||||
<h4 id="page_title" style="position: relative;">Add Policy</h4>
|
<h4 id="page_title" style="position: relative;">Add Policy</h4>
|
||||||
@ -335,7 +337,7 @@
|
|||||||
<a href="<?= base_url('policy_tranction/inception/list') ?>" type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light"
|
<a href="<?= base_url('policy_tranction/inception/list') ?>" type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light"
|
||||||
>Back</a>
|
>Back</a>
|
||||||
</div> -->
|
</div> -->
|
||||||
</div>
|
<!-- </div> -->
|
||||||
<form role="form" class="parsley-examples" method="post" id="inception_form_id" enctype="multipart/form-data" novalidate>
|
<form role="form" class="parsley-examples" method="post" id="inception_form_id" enctype="multipart/form-data" novalidate>
|
||||||
|
|
||||||
<input type="hidden" name="id" id="policy_tranction_primarykey">
|
<input type="hidden" name="id" id="policy_tranction_primarykey">
|
||||||
@ -1151,8 +1153,10 @@
|
|||||||
id="btnSubmit">Submit</button>
|
id="btnSubmit">Submit</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
<!--
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1175,7 +1175,7 @@ function addHTMLInput(data = null, container_id = 'dynamic-form-container')
|
|||||||
<div class="form-group col-md-5">
|
<div class="form-group col-md-5">
|
||||||
<label for="file">Upload File<span class="text-danger">${required_star}</span></label>
|
<label for="file">Upload File<span class="text-danger">${required_star}</span></label>
|
||||||
<input type="file" class="form-control" id="file_name" name="file[]" ${required} accept=".pdf,.jpg,.jpeg,.png">
|
<input type="file" class="form-control" id="file_name" name="file[]" ${required} accept=".pdf,.jpg,.jpeg,.png">
|
||||||
<small class="text-muted d-block">Allowed: PDF, XLSX, XLS, PNG, JPG, JPEG. <= Default</small>
|
<small class="text-muted d-block">Allowed: PDF, JPG, JPEG, PNG.</small>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-2" style="position: relative;top: 28px;">
|
<div class="form-group col-md-2" style="position: relative;top: 28px;">
|
||||||
<a class="btn btn-danger waves-effect waves-light" onclick="removeHTMLInput(this, '${container_id}')">x</a>
|
<a class="btn btn-danger waves-effect waves-light" onclick="removeHTMLInput(this, '${container_id}')">x</a>
|
||||||
|
|||||||
@ -1017,7 +1017,7 @@ function addHTMLInput(data = null)
|
|||||||
<div class="form-group col-md-5">
|
<div class="form-group col-md-5">
|
||||||
<label for="file">Upload File<span class="text-danger">*</span></label>
|
<label for="file">Upload File<span class="text-danger">*</span></label>
|
||||||
<input type="file" class="form-control" id="file_name" name="file[]" accept=".pdf,.jpg,.jpeg,.png" required>
|
<input type="file" class="form-control" id="file_name" name="file[]" accept=".pdf,.jpg,.jpeg,.png" required>
|
||||||
<small class="text-muted d-block">Allowed: PDF, XLSX, XLS, PNG, JPG, JPEG. <= Default</small>
|
<small class="text-muted d-block">Allowed: PDF, JPG, JPEG, PNG.</small>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-2" style="position: relative;top: 28px;">
|
<div class="form-group col-md-2" style="position: relative;top: 28px;">
|
||||||
<a class="btn btn-danger waves-effect waves-light" onclick="removeHTMLInput(this)">x</a>
|
<a class="btn btn-danger waves-effect waves-light" onclick="removeHTMLInput(this)">x</a>
|
||||||
|
|||||||
@ -128,10 +128,12 @@
|
|||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
<label for="email">Email<span class="text-danger">*</span></label>
|
<label for="email">Email<span class="text-danger">*</span></label>
|
||||||
<input type="email" class="form-control" id="email" name="email" placeholder="Enter Email" required data-parsley-type="email" data-parsley-trigger="keyup">
|
<input type="email" class="form-control" id="email" name="email" placeholder="Enter Email" required data-parsley-type="email" data-parsley-trigger="keyup">
|
||||||
|
<small id="email_error" class="text-danger d-none"></small>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
<label for="mobile">Mobile<span class="text-danger">*</span></label>
|
<label for="mobile">Mobile<span class="text-danger">*</span></label>
|
||||||
<input type="text" class="form-control" id="mobile" name="mobile" placeholder="Enter Mobile" required data-parsley-pattern="^[6-9]\d{9}$" data-parsley-trigger="keyup" data-parsley-length="[10,10]" data-parsley-validation-threshold="10" data-parsley-length-message="Mobile number must be 10 digits." data-parsley-pattern-message="Please enter a valid 10-digit mobile number starting with 6, 7, 8, or 9.">
|
<input type="text" class="form-control" id="mobile" name="mobile" placeholder="Enter Mobile" maxlength="10" inputmode="numeric" pattern="[0-9]{10}" required>
|
||||||
|
<small id="mobile_error" class="text-danger d-none"></small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
@ -173,7 +175,7 @@
|
|||||||
<input type="file" class="form-control" name="aadhar_file_name" id="aadhar_file_name" accept=".pdf,.jpg,.jpeg,.png" data-parsley-file-validation>
|
<input type="file" class="form-control" name="aadhar_file_name" id="aadhar_file_name" accept=".pdf,.jpg,.jpeg,.png" data-parsley-file-validation>
|
||||||
<i class="mdi mdi-upload additional-icon"></i>
|
<i class="mdi mdi-upload additional-icon"></i>
|
||||||
</div>
|
</div>
|
||||||
<small class="text-muted d-block">Allowed: PDF, XLSX, XLS, PNG, JPG, JPEG. <= Default</small>
|
<small class="text-muted d-block">Allowed: PDF, PNG, JPG, JPEG.</small>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-4">
|
||||||
<label for="pan_file_name">PAN</label>
|
<label for="pan_file_name">PAN</label>
|
||||||
@ -181,7 +183,7 @@
|
|||||||
<input type="file" class="form-control" name="pan_file_name" id="pan_file_name" accept=".pdf,.jpg,.jpeg,.png" data-parsley-file-validation>
|
<input type="file" class="form-control" name="pan_file_name" id="pan_file_name" accept=".pdf,.jpg,.jpeg,.png" data-parsley-file-validation>
|
||||||
<i class="mdi mdi-upload additional-icon"></i>
|
<i class="mdi mdi-upload additional-icon"></i>
|
||||||
</div>
|
</div>
|
||||||
<small class="text-muted d-block">Allowed: PDF, XLSX, XLS, PNG, JPG, JPEG. <= Default</small>
|
<small class="text-muted d-block">Allowed: PDF, PNG, JPG, JPEG.</small>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-4">
|
||||||
<label for="certificate_file_name">Certificate</label>
|
<label for="certificate_file_name">Certificate</label>
|
||||||
@ -189,7 +191,7 @@
|
|||||||
<input type="file" class="form-control" name="certificate_file_name" id="certificate_file_name" accept=".pdf,.jpg,.jpeg,.png" data-parsley-file-validation>
|
<input type="file" class="form-control" name="certificate_file_name" id="certificate_file_name" accept=".pdf,.jpg,.jpeg,.png" data-parsley-file-validation>
|
||||||
<i class="mdi mdi-upload additional-icon"></i>
|
<i class="mdi mdi-upload additional-icon"></i>
|
||||||
</div>
|
</div>
|
||||||
<small class="text-muted d-block">Allowed: PDF, XLSX, XLS, PNG, JPG, JPEG. <= Default</small>
|
<small class="text-muted d-block">Allowed: PDF, PNG, JPG, JPEG.</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
@ -227,41 +229,6 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// Parsley custom validator for file type and size
|
|
||||||
window.Parsley.addValidator('fileValidation', {
|
|
||||||
requirementType: 'string',
|
|
||||||
validateString: function(value, requirement, parsleyInstance) {
|
|
||||||
const file = parsleyInstance.$element[0].files[0];
|
|
||||||
if (!file) {
|
|
||||||
return true; // Skip validation if no file is selected (unless 'required' is also present)
|
|
||||||
}
|
|
||||||
|
|
||||||
const maxImageSize = 500 * 1024; // 500KB
|
|
||||||
const maxPdfSize = 25 * 1024 * 1024; // 25MB
|
|
||||||
const imageTypes = ['image/jpeg', 'image/png', 'image/jpg'];
|
|
||||||
const pdfType = 'application/pdf';
|
|
||||||
|
|
||||||
if (imageTypes.includes(file.type)) {
|
|
||||||
if (file.size > maxImageSize) {
|
|
||||||
this.errorMessage = 'Image size cannot exceed 500KB.';
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
} else if (file.type === pdfType) {
|
|
||||||
if (file.size > maxPdfSize) {
|
|
||||||
this.errorMessage = 'PDF size cannot exceed 25MB.';
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.errorMessage = 'Allowed file types are JPG, JPEG, PNG, and PDF.';
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
messages: {
|
|
||||||
en: 'File is invalid.' // Default fallback message
|
|
||||||
}
|
|
||||||
});
|
|
||||||
var table;
|
var table;
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$('#manager_id').select2();
|
$('#manager_id').select2();
|
||||||
@ -493,18 +460,77 @@
|
|||||||
|
|
||||||
$('#partnerPOSForm').on('submit', function(e) {
|
$('#partnerPOSForm').on('submit', function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var $form = $(this);
|
const form = this;
|
||||||
|
|
||||||
// Validate the form using Parsley
|
// HTML5 built-in validation
|
||||||
$form.parsley().validate();
|
if (!form.checkValidity()) {
|
||||||
|
form.reportValidity(); // shows required/pattern tooltips
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Custom validation
|
||||||
|
if (!validateForm()) return;
|
||||||
|
|
||||||
// Check if the form is valid
|
|
||||||
if ($form.parsley().isValid()) {
|
|
||||||
// If valid, submit via AJAX
|
// If valid, submit via AJAX
|
||||||
handleSaveEditAndDelete('submit');
|
handleSaveEditAndDelete('submit');
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
function validateForm() {
|
||||||
|
let isValid = true;
|
||||||
|
|
||||||
|
// Clear old errors
|
||||||
|
$('.text-danger').addClass('d-none').text('');
|
||||||
|
|
||||||
|
// Regex patterns
|
||||||
|
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
||||||
|
const mobileRegex = /^[6-9]\d{9}$/;
|
||||||
|
const aadharRegex = /^\d{12}$/;
|
||||||
|
const panRegex = /^[A-Z]{5}[0-9]{4}[A-Z]$/;
|
||||||
|
|
||||||
|
// EMAIL
|
||||||
|
const email = $('#email').val().trim();
|
||||||
|
if (email === '') {
|
||||||
|
$('#email_error').text('Email is required').removeClass('d-none');
|
||||||
|
isValid = false;
|
||||||
|
} else if (!emailRegex.test(email)) {
|
||||||
|
$('#email_error').text('Enter a valid email').removeClass('d-none');
|
||||||
|
isValid = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// MOBILE
|
||||||
|
const mobile = $('#mobile').val().trim();
|
||||||
|
if (mobile === '') {
|
||||||
|
$('#mobile_error').text('Mobile number is required').removeClass('d-none');
|
||||||
|
isValid = false;
|
||||||
|
} else if (!mobileRegex.test(mobile)) {
|
||||||
|
$('#mobile_error').text('Enter a valid 10-digit mobile number').removeClass('d-none');
|
||||||
|
isValid = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// AADHAAR
|
||||||
|
const aadhar = $('#aadhar').val().trim();
|
||||||
|
if (aadhar === '') {
|
||||||
|
$('#aadhar_error').text('Aadhaar is required').removeClass('d-none');
|
||||||
|
isValid = false;
|
||||||
|
} else if (!aadharRegex.test(aadhar)) {
|
||||||
|
$('#aadhar_error').text('Aadhaar must be 12 digits').removeClass('d-none');
|
||||||
|
isValid = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// PAN
|
||||||
|
const pan = $('#pan').val().trim();
|
||||||
|
if (pan === '') {
|
||||||
|
$('#pan_error').text('PAN is required').removeClass('d-none');
|
||||||
|
isValid = false;
|
||||||
|
} else if (!panRegex.test(pan)) {
|
||||||
|
$('#pan_error').text('Invalid PAN format (AAAPA1234A)').removeClass('d-none');
|
||||||
|
isValid = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return isValid;
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
document.addEventListener("DOMContentLoaded", function() {
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
@ -594,5 +620,4 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@ -1,5 +1,6 @@
|
|||||||
<div class="row" id="pt_onboarding"> <!-- style="position: relative; bottom: 25px; display:none;" -->
|
<div class="row" id="pt_onboarding"> <!-- style="position: relative; bottom: 25px; display:none;" -->
|
||||||
<div class="col-xl-12">
|
<div class="col-xl-12">
|
||||||
|
<div style="margin-top:10px !important;"></div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="tab-wrapper position-relative">
|
<div class="tab-wrapper position-relative">
|
||||||
<ul class="nav nav-pills navtab-bg" id="myTab">
|
<ul class="nav nav-pills navtab-bg" id="myTab">
|
||||||
|
|||||||
@ -37,18 +37,21 @@ table.dataTable tbody td {
|
|||||||
.dataTables_length label {height: 21px !important;}
|
.dataTables_length label {height: 21px !important;}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
<script>
|
||||||
|
var pageHideMainNavTitle = true;
|
||||||
|
var pageTitle = 'Claim Feedback List';
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="row" style="padding-bottom: 10px;">
|
<!-- <div class="row" style="padding-bottom: 10px;">
|
||||||
<div class="col-6" style="align-self: center;">
|
<div class="col-6" style="align-self: center;">
|
||||||
<h4 style="position: relative;">Claim Feedback List </h4>
|
<h4 style="position: relative;">Claim Feedback List </h4>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div> -->
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap">
|
<table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap">
|
||||||
<thead class="bg-light">
|
<thead class="bg-light">
|
||||||
|
|||||||
@ -28,7 +28,13 @@
|
|||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
<?php if (!isset($ticket_data)) { ?>
|
||||||
|
<script>
|
||||||
|
var pageHideMainNavTitle = true;
|
||||||
|
var pageTitle = '<?= isset($claim_ticket_type_id) && $claim_ticket_type_id == 72 ? 'Claim OPD' : 'Claim GMC' ?>';
|
||||||
|
var pageBackButton = '<a href="<?= base_url('ticket/list') ?>" class="topbar-icon-btn" title="Back"><i class="ri-arrow-left-s-line"></i></a>';
|
||||||
|
</script>
|
||||||
|
<?php } ?>
|
||||||
<div class="container-fluid-min">
|
<div class="container-fluid-min">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
@ -36,6 +42,7 @@
|
|||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<?php if (!isset($ticket_data)) { ?>
|
<?php if (!isset($ticket_data)) { ?>
|
||||||
<!-- Header Section -->
|
<!-- Header Section -->
|
||||||
|
<!--
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<div class="col-6 d-flex align-items-center">
|
<div class="col-6 d-flex align-items-center">
|
||||||
<h4 class="mb-0"><?= isset($claim_ticket_type_id) && $claim_ticket_type_id == 72 ? 'Claim OPD' : 'Claim GMC' ?></h4>
|
<h4 class="mb-0"><?= isset($claim_ticket_type_id) && $claim_ticket_type_id == 72 ? 'Claim OPD' : 'Claim GMC' ?></h4>
|
||||||
@ -46,6 +53,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
-->
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<form role="form" class="parsley-examples" method="post" id="ticket_form_data" onsubmit="submitClaimForm(event, this)" enctype="multipart/form-data">
|
<form role="form" class="parsley-examples" method="post" id="ticket_form_data" onsubmit="submitClaimForm(event, this)" enctype="multipart/form-data">
|
||||||
|
|
||||||
|
|||||||
@ -22,13 +22,20 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
<?php if (!isset($ticket_data)) { ?>
|
||||||
|
<script>
|
||||||
|
var pageHideMainNavTitle = true;
|
||||||
|
var pageTitle = 'Claim <?= $ticket_form ?>';
|
||||||
|
var pageBackButton = '<a href="<?= base_url('ticket/list') ?>" class="topbar-icon-btn" title="Back"><i class="ri-arrow-left-s-line"></i></a>';
|
||||||
|
</script>
|
||||||
|
<?php } ?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="<?= !isset($ticket_data) ? "card" : "" ?>" style="margin-right: 23px;">
|
<div class="<?= !isset($ticket_data) ? "card" : "" ?>" style="margin-right: 23px;">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<?php if (!isset($ticket_data)) { ?>
|
<?php if (!isset($ticket_data)) { ?>
|
||||||
<!-- Header Section -->
|
<!-- Header Section -->
|
||||||
|
<!--
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<div class="col-6 d-flex align-items-center">
|
<div class="col-6 d-flex align-items-center">
|
||||||
<h4 class="mb-0">Claim <?= $ticket_form ?></h4>
|
<h4 class="mb-0">Claim <?= $ticket_form ?></h4>
|
||||||
@ -39,6 +46,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
-->
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<form role="form" class="parsley-examples" method="post" id="ticket_form_data" onsubmit="submitClaimForm(event, this)"
|
<form role="form" class="parsley-examples" method="post" id="ticket_form_data" onsubmit="submitClaimForm(event, this)"
|
||||||
enctype="multipart/form-data">
|
enctype="multipart/form-data">
|
||||||
|
|||||||
@ -22,13 +22,20 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
<?php if (!isset($ticket_data)) { ?>
|
||||||
|
<script>
|
||||||
|
var pageHideMainNavTitle = true;
|
||||||
|
var pageTitle = 'Claim <?= $ticket_form ?>';
|
||||||
|
var pageBackButton = '<a href="<?= base_url('ticket/list') ?>" class="topbar-icon-btn" title="Back"><i class="ri-arrow-left-s-line"></i></a>';
|
||||||
|
</script>
|
||||||
|
<?php }?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="<?= !isset($ticket_data) ? "card" : "" ?>" style="margin-right: 23px;">
|
<div class="<?= !isset($ticket_data) ? "card" : "" ?>" style="margin-right: 23px;">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<?php if (!isset($ticket_data)) { ?>
|
<?php if (!isset($ticket_data)) { ?>
|
||||||
<!-- Header Section -->
|
<!-- Header Section -->
|
||||||
|
<!--
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<div class="col-6 d-flex align-items-center">
|
<div class="col-6 d-flex align-items-center">
|
||||||
<h4 class="mb-0">Claim <?= $ticket_form ?></h4>
|
<h4 class="mb-0">Claim <?= $ticket_form ?></h4>
|
||||||
@ -39,6 +46,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
-->
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<form role="form" class="parsley-examples" method="post" id="ticket_form_data"
|
<form role="form" class="parsley-examples" method="post" id="ticket_form_data"
|
||||||
onsubmit="return validateBeforeSubmit(event, this)"
|
onsubmit="return validateBeforeSubmit(event, this)"
|
||||||
|
|||||||
@ -57,16 +57,20 @@
|
|||||||
}
|
}
|
||||||
.dataTables_length label {height: 21px !important;}
|
.dataTables_length label {height: 21px !important;}
|
||||||
</style>
|
</style>
|
||||||
|
<script>
|
||||||
|
var pageHideMainNavTitle = true;
|
||||||
|
var pageTitle = 'Mail Template List';
|
||||||
|
</script>
|
||||||
|
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="row" style="padding-bottom: 10px;">
|
<!-- <div class="row" style="padding-bottom: 10px;">
|
||||||
<div class="col-6" style="align-self: center;">
|
<div class="col-6" style="align-self: center;">
|
||||||
<h4 style="position: relative;">Mail Template List </h4>
|
<h4 style="position: relative;">Mail Template List </h4>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div> -->
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap">
|
<table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap">
|
||||||
<thead class="bg-light">
|
<thead class="bg-light">
|
||||||
|
|||||||
@ -698,6 +698,34 @@ div.dataTables_wrapper {
|
|||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* DataTables — consistent minimum height on main app pages (≈10" laptops → large monitors).
|
||||||
|
* vmin tracks the smaller viewport edge; caps limit empty space on very large displays.
|
||||||
|
* Scroll split: min height on .dataTables_scroll / .dataTables_scrollBody.
|
||||||
|
* No scroll split: min height on wrapper only (avoids stacking min-heights with scroll region).
|
||||||
|
*/
|
||||||
|
.content-page div.dataTables_wrapper:not(:has(.dataTables_scroll)) {
|
||||||
|
min-height: clamp(18rem, 36vmin, 40rem);
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-page div.dataTables_wrapper .dataTables_scroll {
|
||||||
|
min-height: clamp(16rem, 32vmin, 34rem);
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-page div.dataTables_wrapper .dataTables_scrollBody {
|
||||||
|
min-height: clamp(14rem, 28vmin, 30rem);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Modals / overlays: do not reserve main-page list height */
|
||||||
|
.modal div.dataTables_wrapper,
|
||||||
|
.modal div.dataTables_wrapper .dataTables_scroll,
|
||||||
|
.modal div.dataTables_wrapper .dataTables_scrollBody,
|
||||||
|
#tpa_variation_modal div.dataTables_wrapper,
|
||||||
|
#tpa_variation_modal div.dataTables_wrapper .dataTables_scroll,
|
||||||
|
#tpa_variation_modal div.dataTables_wrapper .dataTables_scrollBody {
|
||||||
|
min-height: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
/* Let the middle row shrink inside flex layouts so the wrapper doesn’t widen the page */
|
/* Let the middle row shrink inside flex layouts so the wrapper doesn’t widen the page */
|
||||||
div.dataTables_wrapper > .row .dataTables_scroll {
|
div.dataTables_wrapper > .row .dataTables_scroll {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user