Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
6baf24bc26
@ -43,6 +43,7 @@ $routes->post("add_advertise_image", "AppContentManagementController::add_advert
|
|||||||
$routes->get("add_image_index", "AppContentManagementController::add_image_index");
|
$routes->get("add_image_index", "AppContentManagementController::add_image_index");
|
||||||
$routes->get("getAdvertiseImage/(:any)", "AppContentManagementController::getAdvertiseImage/$1");
|
$routes->get("getAdvertiseImage/(:any)", "AppContentManagementController::getAdvertiseImage/$1");
|
||||||
$routes->get("frontend_content", "AppContentManagementController::frontend_content");
|
$routes->get("frontend_content", "AppContentManagementController::frontend_content");
|
||||||
|
$routes->get('showAdvertiseImage/(:any)', 'AdvertiseController::showAdvertiseImage/$1');
|
||||||
|
|
||||||
|
|
||||||
// $routes->get('/', 'LoginController::index');
|
// $routes->get('/', 'LoginController::index');
|
||||||
@ -478,6 +479,7 @@ $routes->group("rfq", ["filter" => "authMVC"], function ($routes) {
|
|||||||
$routes->get("driveListFiles", "GoogleDriveController::listFiles");
|
$routes->get("driveListFiles", "GoogleDriveController::listFiles");
|
||||||
$routes->post('dmsSearch', 'PolicyTransactionController::dmsSearch', ['filter' => 'authMVC']);
|
$routes->post('dmsSearch', 'PolicyTransactionController::dmsSearch', ['filter' => 'authMVC']);
|
||||||
$routes->get('dmsSearch', 'PolicyTransactionController::dmsSearch', ['filter' => 'authMVC']);
|
$routes->get('dmsSearch', 'PolicyTransactionController::dmsSearch', ['filter' => 'authMVC']);
|
||||||
|
$routes->get('payouts', 'PolicyTransactionController::payouts', ['filter' => 'authMVC']);
|
||||||
$routes->get('downloadGdriveFile', 'GoogleDriveController::downloadGdriveFile', ['filter' => 'authMVC']);
|
$routes->get('downloadGdriveFile', 'GoogleDriveController::downloadGdriveFile', ['filter' => 'authMVC']);
|
||||||
$routes->get('cli/sendZeptoMail', 'MasterController::testZeptoSMTP');
|
$routes->get('cli/sendZeptoMail', 'MasterController::testZeptoSMTP');
|
||||||
|
|
||||||
@ -555,6 +557,8 @@ $routes->group("employeeRest", ["filter" => "authJWT"], function ($routes) {
|
|||||||
|
|
||||||
$routes->post("ecardRequest", "ApiServiceController::ecardRequest");
|
$routes->post("ecardRequest", "ApiServiceController::ecardRequest");
|
||||||
|
|
||||||
|
$routes->get("getWellnessURL", "ApiServiceController::getWellnessURL");
|
||||||
|
|
||||||
$routes->post("logHrActivity", "RestAuthenticationController::logHrActivity");
|
$routes->post("logHrActivity", "RestAuthenticationController::logHrActivity");
|
||||||
$routes->post("getVerifiedUserData", "RestAuthenticationController::getVerifiedUserData");
|
$routes->post("getVerifiedUserData", "RestAuthenticationController::getVerifiedUserData");
|
||||||
|
|
||||||
@ -590,7 +594,7 @@ $routes->group("employeeRest", ["filter" => "authJWT"], function ($routes) {
|
|||||||
$routes->get("getEmployeeActiveOrInactivePolicy", "EmployeeRestController::getEmployeeActiveOrInactivePolicy");
|
$routes->get("getEmployeeActiveOrInactivePolicy", "EmployeeRestController::getEmployeeActiveOrInactivePolicy");
|
||||||
$routes->get("getFEContent", "EmployeeRestController::getFEContent");
|
$routes->get("getFEContent", "EmployeeRestController::getFEContent");
|
||||||
$routes->get("getAdvertisementImage", "EmployeeRestController::getAdvertisementImage");
|
$routes->get("getAdvertisementImage", "EmployeeRestController::getAdvertisementImage");
|
||||||
$routes->get("getWellnessURL", "EmployeeRestController::getWellnessURL");
|
|
||||||
$routes->get("getEcardURL", "EmployeeRestController::getEcardURL");
|
$routes->get("getEcardURL", "EmployeeRestController::getEcardURL");
|
||||||
//$routes->post('postDataForTicket',"EmployeeRestController::postDataForTicket");
|
//$routes->post('postDataForTicket',"EmployeeRestController::postDataForTicket");
|
||||||
|
|
||||||
@ -701,12 +705,14 @@ $routes->get('getEnrollmentBatchStatus','ICICILombardController::getEnrollmentBa
|
|||||||
$routes->get('fetchUHIDDetails','ICICILombardController::fetchUHIDDetails');
|
$routes->get('fetchUHIDDetails','ICICILombardController::fetchUHIDDetails');
|
||||||
|
|
||||||
//Third party Vidal Api Call
|
//Third party Vidal Api Call
|
||||||
|
$routes->get('fileUpload','VidalApiController::fileUpload');
|
||||||
$routes->post('hospitalNetwork','VidalApiController::hospitalNetwork');
|
$routes->post('hospitalNetwork','VidalApiController::hospitalNetwork');
|
||||||
$routes->post('eCardService','VidalApiController::eCardService');
|
$routes->post('eCardService','VidalApiController::eCardService');
|
||||||
$routes->post('claimStatusCheck','VidalApiController::claimStatusCheck');
|
$routes->post('claimStatusCheck','VidalApiController::claimStatusCheck');
|
||||||
$routes->post('newClaim','VidalApiController::newClaim');
|
$routes->get('newClaim','VidalApiController::SubmitClaim');
|
||||||
$routes->post('enrollment','VidalApiController::enrollment');
|
$routes->post('enrollment','VidalApiController::enrollment');
|
||||||
|
$routes->get('fileUploadToVidal','VidalApiController::fileUploadToVidal');
|
||||||
|
$routes->get('claimStatus','VidalApiController::claimStatus');
|
||||||
|
|
||||||
//Third party MediAssist Api Call
|
//Third party MediAssist Api Call
|
||||||
|
|
||||||
|
|||||||
@ -213,6 +213,101 @@ class ApiServiceController extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getWellnessUrl()
|
||||||
|
{
|
||||||
|
|
||||||
|
$emp_id = $this->request->getGet('emp_id');
|
||||||
|
$client_policy_id = $this->request->getGet('client_policy_id');
|
||||||
|
|
||||||
|
$db = \Config\Database::connect();
|
||||||
|
|
||||||
|
// $data = $db->table('employees e')
|
||||||
|
// ->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,
|
||||||
|
// cp.policy_no as policyNumber, cp.policy_no as employeeId, cp.policy_start_date as policyStartDate, cp.policy_end_date as policyEndDate')
|
||||||
|
// ->join('employee_polices ep', 'e.id = ep.employee_id')
|
||||||
|
// ->join('client_policy cp', 'ep.client_policy_id = cp.id')
|
||||||
|
// ->join('policy_type pt', 'cp.policy_type_id = pt.id')
|
||||||
|
// ->where('e.id', $emp_id)
|
||||||
|
// ->where('e.emp_status', 'active')
|
||||||
|
// ->where('ep.status', 'active')
|
||||||
|
// ->where('e.is_active', 1)
|
||||||
|
// ->where('ep.is_active', 1)
|
||||||
|
// ->get()
|
||||||
|
// ->getResultArray();
|
||||||
|
|
||||||
|
$data = $db->table('employee_polices ep')
|
||||||
|
->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,
|
||||||
|
cp.policy_no as policyNumber, cp.policy_no as employeeId, cp.policy_start_date as policyStartDate, cp.policy_end_date as policyEndDate, cp.wellness_plan_id as planId')
|
||||||
|
->join('employees e', 'e.id = ep.employee_id')
|
||||||
|
->join('client_policy cp', 'ep.client_policy_id = cp.id')
|
||||||
|
->join('policy_type pt', 'cp.policy_type_id = pt.id')
|
||||||
|
->where('ep.employee_id', $emp_id)
|
||||||
|
->where('ep.client_policy_id', $client_policy_id)
|
||||||
|
->where('ep.status', 'active')
|
||||||
|
->where('ep.is_active', 1)
|
||||||
|
->get()
|
||||||
|
->getRow();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$userParams = [];
|
||||||
|
if(!empty($data))
|
||||||
|
{
|
||||||
|
$userParams['name'] = $data->name;
|
||||||
|
$userParams['email'] = $data->email;
|
||||||
|
$userParams['phone'] = $data->phone;
|
||||||
|
$userParams['memberId'] = $data->memberId;
|
||||||
|
$userParams['gender'] = $data->gender;
|
||||||
|
$userParams['dob'] = $data->dob;
|
||||||
|
$userParams['relation'] = $data->relation;
|
||||||
|
$userParams['policyNumber'] = $data->policyNumber;
|
||||||
|
$userParams['employeeId'] = $data->employeeId;
|
||||||
|
$userParams['policyStartDate']= $data->policyStartDate;
|
||||||
|
$userParams['policyEndDate'] = $data->policyEndDate;
|
||||||
|
$userParams['policyName'] = 'Nhance ' . $data->policy_type;
|
||||||
|
$userParams['planId'] = $data->planId;
|
||||||
|
$userParams['moduleName'] = 'home';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// dd($userParams);
|
||||||
|
|
||||||
|
if (empty($userParams)) {
|
||||||
|
return $this->respond(['status' => 'failed','message' => 'Coming soon........!'], 200);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Derive 32-byte key from SHA256
|
||||||
|
$derivedKey = hash('sha256', env('VISIT_SECRET_KEY'), true);
|
||||||
|
|
||||||
|
// Build query string like Node.js
|
||||||
|
$plainText = '';
|
||||||
|
foreach ($userParams as $k => $v) {
|
||||||
|
$plainText .= "&{$k}={$v}";
|
||||||
|
}
|
||||||
|
$plainText = ltrim($plainText, '&');
|
||||||
|
|
||||||
|
// Encrypt
|
||||||
|
$algorithm = "aes-256-cbc";
|
||||||
|
$encrypted = openssl_encrypt($plainText, $algorithm, $derivedKey, OPENSSL_RAW_DATA, env('VISIT_IV'));
|
||||||
|
|
||||||
|
// Base64URL encode (same as Node.js output)
|
||||||
|
$output = rtrim(strtr(base64_encode($encrypted), '+/', '-_'), '=');
|
||||||
|
|
||||||
|
$baseURL = env('VISIT_BASE_URL');
|
||||||
|
$clientId = env('VISIT_CLIENT_ID');
|
||||||
|
$finalUrl = $baseURL . '/sso?userParams=' . $output . '&clientId=' . $clientId;
|
||||||
|
|
||||||
|
if (!empty($finalUrl)) {
|
||||||
|
log_message('error', 'VISIT SSO | emp_id: '.$emp_id.' | URL: '.$finalUrl);
|
||||||
|
return $this->respond(['status' => 'success','data' => $finalUrl], 200);
|
||||||
|
} else {
|
||||||
|
return $this->respond(['status' => 'failed','message' => 'Coming soon........!'], 200);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -40,36 +40,58 @@ class AppContentManagementController extends AdminController
|
|||||||
// $this->loadLayout('client_onboarding', $data);
|
// $this->loadLayout('client_onboarding', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function add_advertise_image(){
|
public function add_advertise_image() {
|
||||||
|
try {
|
||||||
|
$file = $this->request->getFile('advertise_image');
|
||||||
|
//1) original file name for vaildations
|
||||||
|
$fileName = $file->getClientName(); //original file name for vaildations
|
||||||
|
$existing = $this->addImgModel->where('name', $fileName)->where('is_active', 1)->first();
|
||||||
|
if($existing){ return $this->respond(['status' => false, 'message' => 'This file has already been uploaded in active state.'], 400); }
|
||||||
|
|
||||||
// print_r($this->request->getPost());die;
|
//skip 1) and use this
|
||||||
$uploadFilePath = ROOTPATH . 'public/uploads/advertiseImage/';
|
// $fileName = $file->getRandomName(); // Same Name Multiple time upload means different name
|
||||||
$file_name = file_Upload($this->request->getFile('advertise_image'), $uploadFilePath);
|
|
||||||
$data['id'] = $this->request->getPost('add_image_id');
|
|
||||||
// $data['created_by'] = get_session_userid();
|
|
||||||
$data['name'] = $file_name;
|
|
||||||
|
|
||||||
if($data['id'] == 0){
|
if (!$file || !$file->isValid()) {
|
||||||
$insert = $this->addImgModel->insert($data);
|
return $this->respond(['status' => false, 'message' => 'No file uploaded or invalid file.'], 400);
|
||||||
if($insert){
|
}
|
||||||
return $this->respond(['status' => true,'code' => 200,'data' => "success"], 200);
|
|
||||||
|
|
||||||
}else{
|
$uploadPath = WRITEPATH . 'uploads/advertiseImage/';
|
||||||
return $this->respond(['status' => false,'code' => 404,'message' => 'no data found'], 200);
|
if (!is_dir($uploadPath)) mkdir($uploadPath, 0755, true);
|
||||||
|
|
||||||
}
|
|
||||||
}else{
|
$file->move($uploadPath, $fileName);
|
||||||
$id = $data['id'];
|
|
||||||
$update = $this->addImgModel->update($id,$data);
|
|
||||||
if($update){
|
|
||||||
return $this->respond(['status' => true,'code' => 200,'data' => "success"], 200);
|
|
||||||
|
|
||||||
}else{
|
$id = $this->request->getPost('add_image_id');
|
||||||
return $this->respond(['status' => false,'code' => 404,'message' => 'no data found'], 200);
|
$data = ['name' => $fileName];
|
||||||
}
|
|
||||||
|
if ($id == 0) {
|
||||||
|
$this->addImgModel->insert($data);
|
||||||
|
} else {
|
||||||
|
$this->addImgModel->update($id, $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->respond(['status' => true, 'message' => 'Image saved successfully.']);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return $this->respond(['status' => false, 'message' => $e->getMessage()], 500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function showAdvertiseImage($fileName)
|
||||||
|
{
|
||||||
|
|
||||||
|
$filePath = WRITEPATH . 'uploads/advertiseImage/' . $fileName;
|
||||||
|
|
||||||
|
if (!file_exists($filePath)) {
|
||||||
|
return $this->response->setStatusCode(404, 'File not found');
|
||||||
|
}
|
||||||
|
|
||||||
|
$mimeType = mime_content_type($filePath);
|
||||||
|
header('Content-Type: ' . $mimeType);
|
||||||
|
readfile($filePath);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getAdvertiseImage($image_id){
|
public function getAdvertiseImage($image_id){
|
||||||
|
|
||||||
$image_data = $this->addImgModel->select('name')->where(['id' => $image_id])->first();
|
$image_data = $this->addImgModel->select('name')->where(['id' => $image_id])->first();
|
||||||
|
|||||||
@ -5661,7 +5661,7 @@ class ClientController extends AdminController
|
|||||||
|
|
||||||
// $employeeController = new EmployeeController();
|
// $employeeController = new EmployeeController();
|
||||||
// $employeeController->truncateFileData('633');
|
// $employeeController->truncateFileData('633');
|
||||||
// $res = $this->getHrAccessData(4005); dd($res);
|
// $res = $this->getHrAccessData(4075); dd($res);
|
||||||
|
|
||||||
// ---------- TICKET SERVICE CONTROLLER --------------------------------------------------------------------------------
|
// ---------- TICKET SERVICE CONTROLLER --------------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -5702,8 +5702,8 @@ class ClientController extends AdminController
|
|||||||
// ---------- POLICY TRANSACTION CONTROLLER --------------------------------------------------------------------------------
|
// ---------- POLICY TRANSACTION CONTROLLER --------------------------------------------------------------------------------
|
||||||
|
|
||||||
$policyTransactionController = new PolicyTransactionController();
|
$policyTransactionController = new PolicyTransactionController();
|
||||||
// $res = $policyTransactionController->validateInsurerStatement(['file_id' => '60']);
|
// $res = $policyTransactionController->validateInsurerStatement(['file_id' => '62']);
|
||||||
// $res = $policyTransactionController->updateInsurerStatement(['file_id' => '22']);
|
// $res = $policyTransactionController->updateInsurerStatement(['file_id' => '62']);
|
||||||
// dd('-----', $res);
|
// dd('-----', $res);
|
||||||
|
|
||||||
// ----------EMP DATA SERVICE CONTROLLER--------------------------------------------------------------------------------
|
// ----------EMP DATA SERVICE CONTROLLER--------------------------------------------------------------------------------
|
||||||
@ -7025,177 +7025,434 @@ class ClientController extends AdminController
|
|||||||
return $combinedHrAccessData;
|
return $combinedHrAccessData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// do not remove this commented items
|
||||||
|
// public function constructHrAccessData($data, $client_id , $pre_client_id)
|
||||||
|
// {
|
||||||
|
// // print_rr($data);die;
|
||||||
|
|
||||||
|
// $preHrs = $data['pre_hr_data'];
|
||||||
|
// $postHrs = $data['post_hr_data'];
|
||||||
|
// $hrAccessTableData = $data['hr_access_table_data'];
|
||||||
|
// $merged = [];
|
||||||
|
|
||||||
|
// // Merge based on mobile and email
|
||||||
|
// foreach ($postHrs as $post) {
|
||||||
|
// $found = false;
|
||||||
|
// foreach ($preHrs as $index => $pre) {
|
||||||
|
|
||||||
|
// if ( trim($post['hr_mobile']) == trim($pre['hr_mobile']) && trim($post['hr_mail']) == trim($pre['hr_mail']) ) {
|
||||||
|
|
||||||
|
// $merged[] = [
|
||||||
|
// 'pre_hr_id' => $pre['pre_hr_id'],
|
||||||
|
// 'post_hr_id' => $post['post_hr_id'],
|
||||||
|
// 'hr_name' => $post['hr_name'],
|
||||||
|
// 'hr_mobile' => $post['hr_mobile'],
|
||||||
|
// 'hr_mail' => $post['hr_mail'],
|
||||||
|
// 'pre_branch_id' => $pre['pre_branch_id'] ?? null,
|
||||||
|
// 'post_branch_id' => $post['post_branch_id'] ?? null,
|
||||||
|
// 'post_branch_name' => $post['post_branch_name'] ?? null
|
||||||
|
// ];
|
||||||
|
// unset($preHrs[$index]); // remove matched pre_hr
|
||||||
|
// $found = true;
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if (!$found) {
|
||||||
|
// $merged[] = [
|
||||||
|
// 'pre_hr_id' => null,
|
||||||
|
// 'post_hr_id' => $post['post_hr_id'],
|
||||||
|
// 'hr_name' => $post['hr_name'],
|
||||||
|
// 'hr_mobile' => $post['hr_mobile'],
|
||||||
|
// 'hr_mail' => $post['hr_mail'],
|
||||||
|
// 'pre_branch_id' => $pre['pre_branch_id'] ?? null,
|
||||||
|
// 'post_branch_id' => $post['post_branch_id'] ?? null ,
|
||||||
|
// 'post_branch_name' => $post['post_branch_name'] ?? null
|
||||||
|
// ];
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // Remaining preHrs (not matched)
|
||||||
|
// foreach ($preHrs as $pre) {
|
||||||
|
|
||||||
|
// foreach ($merged as $value) {
|
||||||
|
// if ( trim($pre['hr_mobile']) == trim($value['hr_mobile']) && trim($pre['hr_mail']) == trim($value['hr_mail']) ) {
|
||||||
|
// continue 2; // Skip adding this pre_hr as it's already matched
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// $merged[] = [
|
||||||
|
// 'pre_hr_id' => $pre['pre_hr_id'],
|
||||||
|
// 'post_hr_id' => null,
|
||||||
|
// 'hr_name' => $pre['hr_name'],
|
||||||
|
// 'hr_mobile' => $pre['hr_mobile'],
|
||||||
|
// 'hr_mail' => $pre['hr_mail'],
|
||||||
|
// 'pre_branch_id' => $pre['pre_branch_id'] ?? null,
|
||||||
|
// 'post_branch_id' => $post['post_branch_id'] ?? null ,
|
||||||
|
// 'post_branch_name' => $post['post_branch_name'] ?? null
|
||||||
|
// ];
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // dd($merged);
|
||||||
|
|
||||||
|
// $result = [];
|
||||||
|
|
||||||
|
// if (empty($hrAccessTableData)) {
|
||||||
|
|
||||||
|
// // No access data — fill result with hr data and other fields as null
|
||||||
|
// foreach ($merged as $hr) {
|
||||||
|
// $result[] = [
|
||||||
|
// 'hr_access_table_pk' => null,
|
||||||
|
// 'post_client_id' => $client_id ?? null,
|
||||||
|
// 'pre_hr_id' => $hr['pre_hr_id'] ?? null,
|
||||||
|
// 'post_hr_id' => $hr['post_hr_id'] ?? null,
|
||||||
|
// 'allowed_pre_modules' => [],
|
||||||
|
// 'allowed_post_modules' => [],
|
||||||
|
// 'allowed_pre_policies' => [],
|
||||||
|
// 'allowed_active_policies' => [],
|
||||||
|
// 'allowed_cd' => [],
|
||||||
|
// 'hr_name' => $hr['hr_name'] ?? null,
|
||||||
|
// 'hr_mobile' => $hr['hr_mobile'] ?? null,
|
||||||
|
// 'hr_mail' => $hr['hr_mail'] ?? null,
|
||||||
|
// 'pre_branch_id' => $hr['pre_branch_id'] ?? null,
|
||||||
|
// 'post_branch_id' => $hr['post_branch_id'] ?? null ,
|
||||||
|
// 'post_branch_name' => $hr['post_branch_name'] ?? null ,
|
||||||
|
// 'pre_client_id' => $pre_client_id ?? null
|
||||||
|
// ];
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// // First create a map of HR data by post_hr_id for quick lookup
|
||||||
|
// $hrMap = [];
|
||||||
|
// foreach ($merged as $hr) {
|
||||||
|
// $hrMap[$hr['post_hr_id']] = $hr;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // Process access data first
|
||||||
|
// foreach ($hrAccessTableData as $access) {
|
||||||
|
// $post_hr_id = $access['post_hr_id'];
|
||||||
|
|
||||||
|
// // Check if this HR exists in our merged data
|
||||||
|
// if (isset($hrMap[$post_hr_id])) {
|
||||||
|
// $hr = $hrMap[$post_hr_id];
|
||||||
|
// $temp_arr_key = $hr['hr_mobile'] . $hr['hr_mail'];
|
||||||
|
|
||||||
|
// // Parse allowed modules
|
||||||
|
// $allowed_modules = json_decode($access['allowed_modules'], true) ?? null;
|
||||||
|
// $allowed_pre_modules = $allowed_modules['pre'] ?? [];
|
||||||
|
// $allowed_post_modules = $allowed_modules['post'] ?? [];
|
||||||
|
|
||||||
|
// $result[$temp_arr_key] = [
|
||||||
|
// 'hr_access_table_pk' => $access['id'] ?? null,
|
||||||
|
// 'post_client_id' => $access['post_client_id'] ?? null,
|
||||||
|
// 'pre_hr_id' => $hr['pre_hr_id'] ?? null,
|
||||||
|
// 'post_hr_id' => $hr['post_hr_id'] ?? null,
|
||||||
|
// 'allowed_pre_modules' => $allowed_pre_modules,
|
||||||
|
// 'allowed_post_modules' => $allowed_post_modules,
|
||||||
|
// 'allowed_pre_policies' => json_decode($access['allowed_pre_policies'], true) ?? [],
|
||||||
|
// 'allowed_active_policies' => json_decode($access['allowed_active_policies'], true) ?? [],
|
||||||
|
// 'allowed_cd' => json_decode($access['allowed_cd'], true) ?? [],
|
||||||
|
// 'hr_name' => $hr['hr_name'],
|
||||||
|
// 'hr_mobile' => $hr['hr_mobile'],
|
||||||
|
// 'hr_mail' => $hr['hr_mail'],
|
||||||
|
// 'pre_branch_id' => $hr['pre_branch_id'] ?? null,
|
||||||
|
// 'post_branch_id' => $hr['post_branch_id'] ?? null ,
|
||||||
|
// 'post_branch_name' => $hr['post_branch_name'] ?? null ,
|
||||||
|
// 'pre_client_id' => $pre_client_id ?? null
|
||||||
|
// ];
|
||||||
|
|
||||||
|
// // Remove from map so we know it's been processed
|
||||||
|
// unset($hrMap[$post_hr_id]);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // Now process any remaining HRs that didn't have access records
|
||||||
|
// foreach ($hrMap as $hr) {
|
||||||
|
// $temp_arr_key = $hr['hr_mobile'] . $hr['hr_mail'];
|
||||||
|
|
||||||
|
// $result[$temp_arr_key] = [
|
||||||
|
// 'hr_access_table_pk' => null,
|
||||||
|
// 'post_client_id' => $client_id ?? null,
|
||||||
|
// 'pre_hr_id' => $hr['pre_hr_id'] ?? null,
|
||||||
|
// 'post_hr_id' => $hr['post_hr_id'] ?? null,
|
||||||
|
// 'allowed_pre_modules' => [],
|
||||||
|
// 'allowed_post_modules' => [],
|
||||||
|
// 'allowed_pre_policies' => [],
|
||||||
|
// 'allowed_active_policies' => [],
|
||||||
|
// 'allowed_cd' => [],
|
||||||
|
// 'hr_name' => $hr['hr_name'] ?? null,
|
||||||
|
// 'hr_mobile' => $hr['hr_mobile'] ?? null,
|
||||||
|
// 'hr_mail' => $hr['hr_mail'] ?? null,
|
||||||
|
// 'pre_branch_id' => $hr['pre_branch_id'] ?? null,
|
||||||
|
// 'post_branch_id' => $hr['post_branch_id'] ?? null ,
|
||||||
|
// 'post_branch_name' => $hr['post_branch_name'] ?? null ,
|
||||||
|
// 'pre_client_id' => $pre_client_id ?? null
|
||||||
|
// ];
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// $resultData['hr_access_data'] = array_values($result);
|
||||||
|
// $resultData['pre_policy_data'] = $data['pre_policy_data'];
|
||||||
|
// $resultData['post_policy_data'] = $data['post_policy_data'];
|
||||||
|
// $resultData['post_cd_data'] = $data['post_cd_data'];
|
||||||
|
|
||||||
|
// return $resultData;
|
||||||
|
// }
|
||||||
|
|
||||||
public function constructHrAccessData($data, $client_id , $pre_client_id)
|
public function constructHrAccessData($data, $client_id , $pre_client_id)
|
||||||
{
|
{
|
||||||
// print_rr($data);die;
|
try{
|
||||||
|
|
||||||
$preHrs = $data['pre_hr_data'];
|
$preHrs = $data['pre_hr_data'];
|
||||||
$postHrs = $data['post_hr_data'];
|
$postHrs = $data['post_hr_data'];
|
||||||
$hrAccessTableData = $data['hr_access_table_data'];
|
$hrAccessTableData = $data['hr_access_table_data'];
|
||||||
$merged = [];
|
$merged = [];
|
||||||
|
|
||||||
// Merge based on mobile and email
|
// Merge based on mobile and email
|
||||||
foreach ($postHrs as $post) {
|
foreach ($postHrs as $post) {
|
||||||
$found = false;
|
$found = false;
|
||||||
foreach ($preHrs as $index => $pre) {
|
foreach ($preHrs as $index => $pre) {
|
||||||
|
|
||||||
if ( trim($post['hr_mobile']) == trim($pre['hr_mobile']) && trim($post['hr_mail']) == trim($pre['hr_mail']) ) {
|
if ( trim($post['hr_mobile']) == trim($pre['hr_mobile']) && trim($post['hr_mail']) == trim($pre['hr_mail']) ) {
|
||||||
|
|
||||||
|
$merged[] = [
|
||||||
|
'pre_hr_id' => $pre['pre_hr_id'],
|
||||||
|
'post_hr_id' => $post['post_hr_id'],
|
||||||
|
'hr_name' => $post['hr_name'],
|
||||||
|
'hr_mobile' => $post['hr_mobile'],
|
||||||
|
'hr_mail' => $post['hr_mail'],
|
||||||
|
'pre_branch_id' => $pre['pre_branch_id'] ?? null,
|
||||||
|
'post_branch_id' => $post['post_branch_id'] ?? null,
|
||||||
|
'post_branch_name' => $post['post_branch_name'] ?? null
|
||||||
|
];
|
||||||
|
unset($preHrs[$index]); // remove matched pre_hr
|
||||||
|
$found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$found) {
|
||||||
$merged[] = [
|
$merged[] = [
|
||||||
'pre_hr_id' => $pre['pre_hr_id'],
|
'pre_hr_id' => null,
|
||||||
'post_hr_id' => $post['post_hr_id'],
|
'post_hr_id' => $post['post_hr_id'],
|
||||||
'hr_name' => $post['hr_name'],
|
'hr_name' => $post['hr_name'],
|
||||||
'hr_mobile' => $post['hr_mobile'],
|
'hr_mobile' => $post['hr_mobile'],
|
||||||
'hr_mail' => $post['hr_mail'],
|
'hr_mail' => $post['hr_mail'],
|
||||||
'pre_branch_id' => $pre['pre_branch_id'] ?? null,
|
'pre_branch_id' => $pre['pre_branch_id'] ?? null,
|
||||||
'post_branch_id' => $post['post_branch_id'] ?? null,
|
'post_branch_id' => $post['post_branch_id'] ?? null ,
|
||||||
'post_branch_name' => $post['post_branch_name'] ?? null
|
'post_branch_name' => $post['post_branch_name'] ?? null
|
||||||
];
|
];
|
||||||
unset($preHrs[$index]); // remove matched pre_hr
|
|
||||||
$found = true;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$found) {
|
// Remaining preHrs (not matched)
|
||||||
|
foreach ($preHrs as $pre) {
|
||||||
|
|
||||||
|
foreach ($merged as $value) {
|
||||||
|
if ( trim($pre['hr_mobile']) == trim($value['hr_mobile']) && trim($pre['hr_mail']) == trim($value['hr_mail']) ) {
|
||||||
|
continue 2; // Skip adding this pre_hr as it's already matched
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$merged[] = [
|
$merged[] = [
|
||||||
'pre_hr_id' => null,
|
'pre_hr_id' => $pre['pre_hr_id'],
|
||||||
'post_hr_id' => $post['post_hr_id'],
|
'post_hr_id' => null,
|
||||||
'hr_name' => $post['hr_name'],
|
'hr_name' => $pre['hr_name'],
|
||||||
'hr_mobile' => $post['hr_mobile'],
|
'hr_mobile' => $pre['hr_mobile'],
|
||||||
'hr_mail' => $post['hr_mail'],
|
'hr_mail' => $pre['hr_mail'],
|
||||||
'pre_branch_id' => $pre['pre_branch_id'] ?? null,
|
'pre_branch_id' => $pre['pre_branch_id'] ?? null,
|
||||||
'post_branch_id' => $post['post_branch_id'] ?? null ,
|
'post_branch_id' => $post['post_branch_id'] ?? null ,
|
||||||
'post_branch_name' => $post['post_branch_name'] ?? null
|
'post_branch_name' => $post['post_branch_name'] ?? null
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Remaining preHrs (not matched)
|
$result = [];
|
||||||
foreach ($preHrs as $pre) {
|
|
||||||
|
|
||||||
foreach ($merged as $value) {
|
if (empty($hrAccessTableData)) {
|
||||||
if ( trim($pre['hr_mobile']) == trim($value['hr_mobile']) && trim($pre['hr_mail']) == trim($value['hr_mail']) ) {
|
|
||||||
continue 2; // Skip adding this pre_hr as it's already matched
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$merged[] = [
|
|
||||||
'pre_hr_id' => $pre['pre_hr_id'],
|
|
||||||
'post_hr_id' => null,
|
|
||||||
'hr_name' => $pre['hr_name'],
|
|
||||||
'hr_mobile' => $pre['hr_mobile'],
|
|
||||||
'hr_mail' => $pre['hr_mail'],
|
|
||||||
'pre_branch_id' => $pre['pre_branch_id'] ?? null,
|
|
||||||
'post_branch_id' => $post['post_branch_id'] ?? null ,
|
|
||||||
'post_branch_name' => $post['post_branch_name'] ?? null
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
// dd($merged);
|
// No access data — fill result with hr data and other fields as null
|
||||||
|
foreach ($merged as $hr) {
|
||||||
$result = [];
|
$result[] = [
|
||||||
|
'hr_access_table_pk' => null,
|
||||||
if (empty($hrAccessTableData)) {
|
'post_client_id' => $client_id ?? null,
|
||||||
|
|
||||||
// No access data — fill result with hr data and other fields as null
|
|
||||||
foreach ($merged as $hr) {
|
|
||||||
$result[] = [
|
|
||||||
'hr_access_table_pk' => null,
|
|
||||||
'post_client_id' => $client_id ?? null,
|
|
||||||
'pre_hr_id' => $hr['pre_hr_id'] ?? null,
|
|
||||||
'post_hr_id' => $hr['post_hr_id'] ?? null,
|
|
||||||
'allowed_pre_modules' => [],
|
|
||||||
'allowed_post_modules' => [],
|
|
||||||
'allowed_pre_policies' => [],
|
|
||||||
'allowed_active_policies' => [],
|
|
||||||
'allowed_cd' => [],
|
|
||||||
'hr_name' => $hr['hr_name'] ?? null,
|
|
||||||
'hr_mobile' => $hr['hr_mobile'] ?? null,
|
|
||||||
'hr_mail' => $hr['hr_mail'] ?? null,
|
|
||||||
'pre_branch_id' => $hr['pre_branch_id'] ?? null,
|
|
||||||
'post_branch_id' => $hr['post_branch_id'] ?? null ,
|
|
||||||
'post_branch_name' => $hr['post_branch_name'] ?? null ,
|
|
||||||
'pre_client_id' => $pre_client_id ?? null
|
|
||||||
];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// First create a map of HR data by post_hr_id for quick lookup
|
|
||||||
$hrMap = [];
|
|
||||||
foreach ($merged as $hr) {
|
|
||||||
$hrMap[$hr['post_hr_id']] = $hr;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Process access data first
|
|
||||||
foreach ($hrAccessTableData as $access) {
|
|
||||||
$post_hr_id = $access['post_hr_id'];
|
|
||||||
|
|
||||||
// Check if this HR exists in our merged data
|
|
||||||
if (isset($hrMap[$post_hr_id])) {
|
|
||||||
$hr = $hrMap[$post_hr_id];
|
|
||||||
$temp_arr_key = $hr['hr_mobile'] . $hr['hr_mail'];
|
|
||||||
|
|
||||||
// Parse allowed modules
|
|
||||||
$allowed_modules = json_decode($access['allowed_modules'], true) ?? null;
|
|
||||||
$allowed_pre_modules = $allowed_modules['pre'] ?? [];
|
|
||||||
$allowed_post_modules = $allowed_modules['post'] ?? [];
|
|
||||||
|
|
||||||
$result[$temp_arr_key] = [
|
|
||||||
'hr_access_table_pk' => $access['id'] ?? null,
|
|
||||||
'post_client_id' => $access['post_client_id'] ?? null,
|
|
||||||
'pre_hr_id' => $hr['pre_hr_id'] ?? null,
|
'pre_hr_id' => $hr['pre_hr_id'] ?? null,
|
||||||
'post_hr_id' => $hr['post_hr_id'] ?? null,
|
'post_hr_id' => $hr['post_hr_id'] ?? null,
|
||||||
'allowed_pre_modules' => $allowed_pre_modules,
|
'allowed_pre_modules' => [],
|
||||||
'allowed_post_modules' => $allowed_post_modules,
|
'allowed_post_modules' => [],
|
||||||
'allowed_pre_policies' => json_decode($access['allowed_pre_policies'], true) ?? [],
|
'allowed_pre_policies' => [],
|
||||||
'allowed_active_policies' => json_decode($access['allowed_active_policies'], true) ?? [],
|
'allowed_active_policies' => [],
|
||||||
'allowed_cd' => json_decode($access['allowed_cd'], true) ?? [],
|
'allowed_cd' => [],
|
||||||
'hr_name' => $hr['hr_name'],
|
'hr_name' => $hr['hr_name'] ?? null,
|
||||||
'hr_mobile' => $hr['hr_mobile'],
|
'hr_mobile' => $hr['hr_mobile'] ?? null,
|
||||||
'hr_mail' => $hr['hr_mail'],
|
'hr_mail' => $hr['hr_mail'] ?? null,
|
||||||
'pre_branch_id' => $hr['pre_branch_id'] ?? null,
|
'pre_branch_id' => $hr['pre_branch_id'] ?? null,
|
||||||
'post_branch_id' => $hr['post_branch_id'] ?? null ,
|
'post_branch_id' => $hr['post_branch_id'] ?? null ,
|
||||||
'post_branch_name' => $hr['post_branch_name'] ?? null ,
|
'post_branch_name' => $hr['post_branch_name'] ?? null ,
|
||||||
'pre_client_id' => $pre_client_id ?? null
|
'pre_client_id' => $pre_client_id ?? null
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
// Remove from map so we know it's been processed
|
} else {
|
||||||
unset($hrMap[$post_hr_id]);
|
|
||||||
|
// First create a map of HR data by post_hr_id for quick lookup
|
||||||
|
$hrMap = [];
|
||||||
|
foreach ($merged as $hr) {
|
||||||
|
if(!empty($hr['post_hr_id'])){
|
||||||
|
$hrMap['post_hr_id_' . $hr['post_hr_id']] = $hr;
|
||||||
|
}else{
|
||||||
|
$hrMap['pre_hr_id_' . $hr['pre_hr_id']] = $hr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Process access data first
|
||||||
|
foreach ($hrAccessTableData as $access) {
|
||||||
|
|
||||||
|
$post_hr_id = $access['post_hr_id'];
|
||||||
|
$pre_hr_id = $access['pre_hr_id'];
|
||||||
|
|
||||||
|
if (empty($post_hr_id) && !empty($pre_hr_id)) {
|
||||||
|
$type_of_access_data = "PRE";
|
||||||
|
} elseif (!empty($post_hr_id) && empty($pre_hr_id)) {
|
||||||
|
$type_of_access_data = "POST";
|
||||||
|
} elseif (!empty($post_hr_id) && !empty($pre_hr_id)) {
|
||||||
|
$type_of_access_data = "POST&PRE";
|
||||||
|
} else {
|
||||||
|
$type_of_access_data = "UNKNOWN";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if this HR exists in our merged data
|
||||||
|
if (isset($hrMap['post_hr_id_' . $post_hr_id])) {
|
||||||
|
|
||||||
|
$hr = $hrMap['post_hr_id_' . $post_hr_id];
|
||||||
|
$temp_arr_key = $hr['hr_mobile'] . $hr['hr_mail'] . $post_hr_id;
|
||||||
|
|
||||||
|
// Parse allowed modules
|
||||||
|
$allowed_modules = json_decode($access['allowed_modules'], true) ?? null;
|
||||||
|
$allowed_pre_modules = $allowed_modules['pre'] ?? [];
|
||||||
|
$allowed_post_modules = $allowed_modules['post'] ?? [];
|
||||||
|
|
||||||
|
$result[$temp_arr_key] = [
|
||||||
|
'hr_access_table_pk' => $access['id'] ?? null,
|
||||||
|
'post_client_id' => $access['post_client_id'] ?? null,
|
||||||
|
'pre_hr_id' => $hr['pre_hr_id'] ?? null,
|
||||||
|
'post_hr_id' => $hr['post_hr_id'] ?? null,
|
||||||
|
'allowed_pre_modules' => $allowed_pre_modules,
|
||||||
|
'allowed_post_modules' => $allowed_post_modules,
|
||||||
|
'allowed_pre_policies' => json_decode($access['allowed_pre_policies'], true) ?? [],
|
||||||
|
'allowed_active_policies' => json_decode($access['allowed_active_policies'], true) ?? [],
|
||||||
|
'allowed_cd' => json_decode($access['allowed_cd'], true) ?? [],
|
||||||
|
'hr_name' => $hr['hr_name'],
|
||||||
|
'hr_mobile' => $hr['hr_mobile'],
|
||||||
|
'hr_mail' => $hr['hr_mail'],
|
||||||
|
'pre_branch_id' => $hr['pre_branch_id'] ?? null,
|
||||||
|
'post_branch_id' => $hr['post_branch_id'] ?? null ,
|
||||||
|
'post_branch_name' => $hr['post_branch_name'] ?? null ,
|
||||||
|
'pre_client_id' => $pre_client_id ?? null,
|
||||||
|
'type_of_access_data' => $type_of_access_data ?? null
|
||||||
|
];
|
||||||
|
|
||||||
|
// Remove from map so we know it's been processed
|
||||||
|
unset($hrMap['post_hr_id_' . $post_hr_id]);
|
||||||
|
|
||||||
|
}else if (isset($hrMap['pre_hr_id_' . $pre_hr_id])){
|
||||||
|
|
||||||
|
$hr = $hrMap['pre_hr_id_' . $pre_hr_id];
|
||||||
|
$temp_arr_key = $hr['hr_mobile'] . $hr['hr_mail'] . $post_hr_id;
|
||||||
|
|
||||||
|
// Parse allowed modules
|
||||||
|
$allowed_modules = json_decode($access['allowed_modules'], true) ?? null;
|
||||||
|
$allowed_pre_modules = $allowed_modules['pre'] ?? [];
|
||||||
|
$allowed_post_modules = $allowed_modules['post'] ?? [];
|
||||||
|
|
||||||
|
$result[$temp_arr_key] = [
|
||||||
|
'hr_access_table_pk' => $access['id'] ?? null,
|
||||||
|
'post_client_id' => $access['post_client_id'] ?? null,
|
||||||
|
'pre_hr_id' => $hr['pre_hr_id'] ?? null,
|
||||||
|
'post_hr_id' => $hr['post_hr_id'] ?? null,
|
||||||
|
'allowed_pre_modules' => $allowed_pre_modules,
|
||||||
|
'allowed_post_modules' => $allowed_post_modules,
|
||||||
|
'allowed_pre_policies' => json_decode($access['allowed_pre_policies'], true) ?? [],
|
||||||
|
'allowed_active_policies' => json_decode($access['allowed_active_policies'], true) ?? [],
|
||||||
|
'allowed_cd' => json_decode($access['allowed_cd'], true) ?? [],
|
||||||
|
'hr_name' => $hr['hr_name'],
|
||||||
|
'hr_mobile' => $hr['hr_mobile'],
|
||||||
|
'hr_mail' => $hr['hr_mail'],
|
||||||
|
'pre_branch_id' => $hr['pre_branch_id'] ?? null,
|
||||||
|
'post_branch_id' => $hr['post_branch_id'] ?? null ,
|
||||||
|
'post_branch_name' => $hr['post_branch_name'] ?? null ,
|
||||||
|
'pre_client_id' => $pre_client_id ?? null,
|
||||||
|
'type_of_access_data' => $type_of_access_data ?? null
|
||||||
|
];
|
||||||
|
|
||||||
|
// Remove from map so we know it's been processed
|
||||||
|
unset($hrMap['pre_hr_id_' . $pre_hr_id]);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Now process any remaining HRs that didn't have access records
|
||||||
|
foreach ($hrMap as $hr) {
|
||||||
|
|
||||||
|
$temp_arr_key = $hr['hr_mobile'] . $hr['hr_mail'];
|
||||||
|
$post_hr_id = $hr['post_hr_id'];
|
||||||
|
$pre_hr_id = $hr['pre_hr_id'];
|
||||||
|
|
||||||
|
if (empty($post_hr_id) && !empty($pre_hr_id)) {
|
||||||
|
$type_of_access_data = "PRE";
|
||||||
|
} elseif (!empty($post_hr_id) && empty($pre_hr_id)) {
|
||||||
|
$type_of_access_data = "POST";
|
||||||
|
} elseif (!empty($post_hr_id) && !empty($pre_hr_id)) {
|
||||||
|
$type_of_access_data = "POST&PRE";
|
||||||
|
} else {
|
||||||
|
$type_of_access_data = "UNKNOWN";
|
||||||
|
}
|
||||||
|
|
||||||
|
$result[$temp_arr_key] = [
|
||||||
|
'hr_access_table_pk' => null,
|
||||||
|
'post_client_id' => $client_id ?? null,
|
||||||
|
'pre_hr_id' => $hr['pre_hr_id'] ?? null,
|
||||||
|
'post_hr_id' => $hr['post_hr_id'] ?? null,
|
||||||
|
'allowed_pre_modules' => [],
|
||||||
|
'allowed_post_modules' => [],
|
||||||
|
'allowed_pre_policies' => [],
|
||||||
|
'allowed_active_policies' => [],
|
||||||
|
'allowed_cd' => [],
|
||||||
|
'hr_name' => $hr['hr_name'] ?? null,
|
||||||
|
'hr_mobile' => $hr['hr_mobile'] ?? null,
|
||||||
|
'hr_mail' => $hr['hr_mail'] ?? null,
|
||||||
|
'pre_branch_id' => $hr['pre_branch_id'] ?? null,
|
||||||
|
'post_branch_id' => $hr['post_branch_id'] ?? null ,
|
||||||
|
'post_branch_name' => $hr['post_branch_name'] ?? null ,
|
||||||
|
'pre_client_id' => $pre_client_id ?? null,
|
||||||
|
'type_of_access_data' => $type_of_access_data ?? null
|
||||||
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now process any remaining HRs that didn't have access records
|
// dd($result);
|
||||||
foreach ($hrMap as $hr) {
|
$resultData['hr_access_data'] = array_values($result);
|
||||||
$temp_arr_key = $hr['hr_mobile'] . $hr['hr_mail'];
|
$resultData['pre_policy_data'] = $data['pre_policy_data'];
|
||||||
|
$resultData['post_policy_data'] = $data['post_policy_data'];
|
||||||
|
$resultData['post_cd_data'] = $data['post_cd_data'];
|
||||||
|
|
||||||
$result[$temp_arr_key] = [
|
return $resultData;
|
||||||
'hr_access_table_pk' => null,
|
|
||||||
'post_client_id' => $client_id ?? null,
|
} catch (\Throwable $th) {
|
||||||
'pre_hr_id' => $hr['pre_hr_id'] ?? null,
|
|
||||||
'post_hr_id' => $hr['post_hr_id'] ?? null,
|
$this->myLogger->logme("error", "REST-AUTH-CONTROLLER - updateInsurerStatement: Exception: " . $th->getMessage() . " --- Line: " . $th->getLine() . " --- Trace: " . $th->getTraceAsString());
|
||||||
'allowed_pre_modules' => [],
|
return [];
|
||||||
'allowed_post_modules' => [],
|
$errorData = [
|
||||||
'allowed_pre_policies' => [],
|
'message' => $th->getMessage(),
|
||||||
'allowed_active_policies' => [],
|
'file' => $th->getFile(),
|
||||||
'allowed_cd' => [],
|
'line' => $th->getLine(),
|
||||||
'hr_name' => $hr['hr_name'] ?? null,
|
'code' => $th->getCode(),
|
||||||
'hr_mobile' => $hr['hr_mobile'] ?? null,
|
'trace' => $th->getTraceAsString(),
|
||||||
'hr_mail' => $hr['hr_mail'] ?? null,
|
'trace_array' => $th->getTrace(), // full array version (optional)
|
||||||
'pre_branch_id' => $hr['pre_branch_id'] ?? null,
|
'function' => $th->getTrace()[0]['function'] ?? null,
|
||||||
'post_branch_id' => $hr['post_branch_id'] ?? null ,
|
'class' => $th->getTrace()[0]['class'] ?? null,
|
||||||
'post_branch_name' => $hr['post_branch_name'] ?? null ,
|
];
|
||||||
'pre_client_id' => $pre_client_id ?? null
|
return ['status' => 'failed', 'code' => 500, 'message' => $th->getMessage(), 'error_data' => $errorData];
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$resultData['hr_access_data'] = array_values($result);
|
|
||||||
$resultData['pre_policy_data'] = $data['pre_policy_data'];
|
|
||||||
$resultData['post_policy_data'] = $data['post_policy_data'];
|
|
||||||
$resultData['post_cd_data'] = $data['post_cd_data'];
|
|
||||||
|
|
||||||
return $resultData;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function saveHrAccessData()
|
public function saveHrAccessData()
|
||||||
@ -7846,7 +8103,4 @@ class ClientController extends AdminController
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1715,7 +1715,7 @@ class EmployeeRestController extends AdminController
|
|||||||
try {
|
try {
|
||||||
|
|
||||||
$client = $this->clientModel->where('id',$this->request->getGet('client_id'))->first();
|
$client = $this->clientModel->where('id',$this->request->getGet('client_id'))->first();
|
||||||
if($client) {
|
if(!empty($client)) {
|
||||||
$client['client_logo'] = base_url().'public/uploads/logo/'.$client['client_logo'];
|
$client['client_logo'] = base_url().'public/uploads/logo/'.$client['client_logo'];
|
||||||
$clientPolicy = $this->clientPolicyModel->where('client_id',$this->request->getGet('client_id'))
|
$clientPolicy = $this->clientPolicyModel->where('client_id',$this->request->getGet('client_id'))
|
||||||
->where('client_branch_id',$this->request->getGet('client_branch_id'))->findAll();
|
->where('client_branch_id',$this->request->getGet('client_branch_id'))->findAll();
|
||||||
@ -2626,19 +2626,34 @@ class EmployeeRestController extends AdminController
|
|||||||
$data['ticket_history'] = $ticketController->ticketHistory($ticket_id);
|
$data['ticket_history'] = $ticketController->ticketHistory($ticket_id);
|
||||||
$data['claims_data'] = $this->ticketMaster->getTicketDataByTicketID($ticket_id);
|
$data['claims_data'] = $this->ticketMaster->getTicketDataByTicketID($ticket_id);
|
||||||
$data['ticket_data'] = $ticketController->getMoreInfo($requestFrom = 'rest', $ticket_id);
|
$data['ticket_data'] = $ticketController->getMoreInfo($requestFrom = 'rest', $ticket_id);
|
||||||
|
$status_list = [
|
||||||
|
"DENIAL REVIEW AWAITED" => 'Denial Review Awaited',
|
||||||
|
"UNDER PROCESS - TPA" => 'Under Process',
|
||||||
|
"SETTLED" => 'Settled',
|
||||||
|
"PAYMENT INITIATED" => 'Under Process',
|
||||||
|
"APPROVED" => 'Approved',
|
||||||
|
"REJECTED" => 'Rejected',
|
||||||
|
"UNDER PROCESS - QUERY DOCUMENT RECEIVED" => 'Under Process',
|
||||||
|
"UNDER PROCESS - CLAIM NO. UPDATION" => 'Under Process' ,
|
||||||
|
"INFORMATION REQUIRED" => 'Information Required',
|
||||||
|
"CDA" => 'Claim Received',
|
||||||
|
"ID NOT GENERATED" => 'Claim Received',
|
||||||
|
"NON ID" => 'Claim Received'
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
// $data = $response['data']; // Assuming your full array is stored in $response
|
// $data = $response['data']; // Assuming your full array is stored in $response
|
||||||
// $ticketData = $data['ticket_data'];
|
// $ticketData = $data['ticket_data'];
|
||||||
// $ticketHistory = $data['ticket_history'];
|
// $ticketHistory = $data['ticket_history'];
|
||||||
|
$data['ticket_data'] = array_fill_keys(array_keys($data['ticket_data']), []);
|
||||||
|
|
||||||
// Loop through ticket_data
|
// Loop through ticket_data
|
||||||
foreach ($data['ticket_data'] as $status => &$fields) {
|
foreach ($data['ticket_data'] as $status => &$fields) {
|
||||||
// Search ticket_history for matching old_status_value
|
// Search ticket_history for matching old_status_value
|
||||||
foreach ($data['ticket_history'] as $history) {
|
foreach ($data['ticket_history'] as $history) {
|
||||||
|
|
||||||
if ($history['old_status_value'] === $status) {
|
if ($history['old_status_value'] === $status) {
|
||||||
// Attach modified_by and created_at
|
// Attach modified_by and created_at
|
||||||
$fields['modified_by'] = $history['modified_by'];
|
// $fields['modified_by'] = $history['modified_by'];
|
||||||
$fields['modified_at'] = date('d-m-Y h:i A', strtotime($history['created_at']));
|
$fields['modified_at'] = date('d-m-Y h:i A', strtotime($history['created_at']));
|
||||||
// Break after first match (assuming latest entry is enough)
|
// Break after first match (assuming latest entry is enough)
|
||||||
break;
|
break;
|
||||||
@ -2646,6 +2661,25 @@ class EmployeeRestController extends AdminController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$new_ticket_data = [];
|
||||||
|
|
||||||
|
foreach ($data['ticket_data'] as $oldKey => $value) {
|
||||||
|
|
||||||
|
// Only process if key exists in status_list
|
||||||
|
if (!isset($status_list[$oldKey])) {
|
||||||
|
continue; // skip and do NOT add to new array
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get new key based on mapping
|
||||||
|
$newKey = $status_list[$oldKey];
|
||||||
|
|
||||||
|
// Avoid duplicates
|
||||||
|
if (!isset($new_ticket_data[$newKey])) {
|
||||||
|
$new_ticket_data[$newKey] = $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$data['ticket_data'] = $new_ticket_data;
|
||||||
|
|
||||||
$ticketMesssageModel = new TicketMessageModel();
|
$ticketMesssageModel = new TicketMessageModel();
|
||||||
$ticket_message = $ticketMesssageModel
|
$ticket_message = $ticketMesssageModel
|
||||||
@ -3818,15 +3852,25 @@ class EmployeeRestController extends AdminController
|
|||||||
|
|
||||||
if (!empty($ticket_data)) {
|
if (!empty($ticket_data)) {
|
||||||
|
|
||||||
|
// $client_claim_status = [
|
||||||
|
// 'Received' => [1, 2, 3, 4, 15, 16, 17, 18, 25, 26, 27, 28, 35, 36, 37, 38],
|
||||||
|
// 'Rejected' => [8, 49, 55, 60],
|
||||||
|
// 'Cancelled' => [13, 47, 53, 58],
|
||||||
|
// 'Returned' => [14, 48, 54, 59],
|
||||||
|
// 'Closed' => [12, 22, 32, 42],
|
||||||
|
// 'Approved' => [9, 20, 30, 40],
|
||||||
|
// 'Settled' => [11, 24, 34],
|
||||||
|
// 'Under Process' => [5, 6, 7, 10, 19, 23, 45, 50, 29, 33, 51, 39, 43, 56],
|
||||||
|
// ];
|
||||||
|
|
||||||
$client_claim_status = [
|
$client_claim_status = [
|
||||||
'Received' => [1, 2, 3, 4, 15, 16, 17, 18, 25, 26, 27, 28, 35, 36, 37, 38],
|
'Claim Received' => [1, 2, 3, 15, 16, 17, 18, 25, 26, 27, 28, 35, 36, 37, 38],
|
||||||
'Rejected' => [8, 49, 55, 60],
|
'Under Process' => [5, 6, 7, 10, 19, 23, 45, 50, 29, 33, 51, 39, 43, 56],
|
||||||
'Cancelled' => [13, 47, 53, 58],
|
'Information Required' => [ 4 ],
|
||||||
'Returned' => [14, 48, 54, 59],
|
|
||||||
'Closed' => [12, 22, 32, 42],
|
|
||||||
'Approved' => [9, 20, 30, 40],
|
'Approved' => [9, 20, 30, 40],
|
||||||
'Settled' => [11, 24, 34],
|
'Settled' => [11, 24, 34],
|
||||||
'Under Process' => [5, 6, 7, 10, 19, 23, 45, 50, 29, 33, 51, 39, 43, 56],
|
'Denial Review Awaited' => [66],
|
||||||
|
'Rejected' => [8, 49, 55, 60],
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach ($ticket_data as $key => $value) {
|
foreach ($ticket_data as $key => $value) {
|
||||||
@ -3836,6 +3880,7 @@ class EmployeeRestController extends AdminController
|
|||||||
$ticket_data[$key]['claim_status'] = $claim_key ?? null; // Assign back to the main array
|
$ticket_data[$key]['claim_status'] = $claim_key ?? null; // Assign back to the main array
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$ticket_data[$key]['priority_type'] = $priorityType[$value['priority']] ?? null;
|
$ticket_data[$key]['priority_type'] = $priorityType[$value['priority']] ?? null;
|
||||||
$ticket_data[$key]['mode_of_intimate_type'] = $modeOFIntimate[$value['mode_of_intimation']] ?? null;
|
$ticket_data[$key]['mode_of_intimate_type'] = $modeOFIntimate[$value['mode_of_intimation']] ?? null;
|
||||||
$ticket_data[$key]['relationship_type'] = ucfirst($value['relationship']) ?? null;
|
$ticket_data[$key]['relationship_type'] = ucfirst($value['relationship']) ?? null;
|
||||||
@ -3875,90 +3920,6 @@ class EmployeeRestController extends AdminController
|
|||||||
return $this->response->setJSON(['ticket_data' => $ticket_data])->setStatusCode(200);
|
return $this->response->setJSON(['ticket_data' => $ticket_data])->setStatusCode(200);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getWellnessUrl()
|
|
||||||
{
|
|
||||||
|
|
||||||
$emp_id = $this->request->getGet('emp_id');
|
|
||||||
|
|
||||||
$db = \Config\Database::connect();
|
|
||||||
$data = $db->table('employees e')
|
|
||||||
->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,
|
|
||||||
cp.policy_no as policyNumber, cp.policy_no as employeeId, cp.policy_start_date as policyStartDate, cp.policy_end_date as policyEndDate')
|
|
||||||
->join('employee_polices ep', 'e.id = ep.employee_id')
|
|
||||||
->join('client_policy cp', 'ep.client_policy_id = cp.id')
|
|
||||||
->join('policy_type pt', 'cp.policy_type_id = pt.id')
|
|
||||||
->where('e.id', $emp_id)
|
|
||||||
->where('e.emp_status', 'active')
|
|
||||||
->where('ep.status', 'active')
|
|
||||||
->where('e.is_active', 1)
|
|
||||||
->where('ep.is_active', 1)
|
|
||||||
->get()
|
|
||||||
->getResultArray();
|
|
||||||
|
|
||||||
// print_r($db->getLastQuery());die();
|
|
||||||
// print_r($data);die();
|
|
||||||
// Loop through $data and check for policy_type = GMC
|
|
||||||
$userParams = [];
|
|
||||||
foreach ($data as $row) {
|
|
||||||
// if ($row['policy_type'] === 'GMC') {
|
|
||||||
$userParams['name'] = $row['name'];
|
|
||||||
$userParams['email'] = $row['email'];
|
|
||||||
$userParams['phone'] = $row['phone'];
|
|
||||||
$userParams['memberId'] = $row['memberId'];
|
|
||||||
$userParams['gender'] = $row['gender'];
|
|
||||||
$userParams['dob'] = $row['dob'];
|
|
||||||
$userParams['relation'] = $row['relation'];
|
|
||||||
$userParams['policyNumber'] = $row['policyNumber'];
|
|
||||||
$userParams['employeeId'] = $row['employeeId'];
|
|
||||||
$userParams['policyStartDate']= $row['policyStartDate'];
|
|
||||||
$userParams['policyEndDate'] = $row['policyEndDate'];
|
|
||||||
// $userParams['policyName'] = 'Nhance ' . $row['policy_type'];
|
|
||||||
// $userParams['planId'] = 'NHANCE-PLAN-' . $row['policy_type'];
|
|
||||||
$userParams['policyName'] = $row['policy_type'];
|
|
||||||
$userParams['planId'] = env('VISIT_PLAN_ID');
|
|
||||||
|
|
||||||
$userParams['moduleName'] = 'home';
|
|
||||||
break; // stop after first GMC match
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
if (empty($userParams)) {
|
|
||||||
return $this->respond(['status' => 'failed','message' => 'Coming soon........!'], 200);
|
|
||||||
}
|
|
||||||
|
|
||||||
// echo 'coming';die();
|
|
||||||
// Derive 32-byte key from SHA256
|
|
||||||
$derivedKey = hash('sha256', env('VISIT_SECRET_KEY'), true);
|
|
||||||
|
|
||||||
// Build query string like Node.js
|
|
||||||
$plainText = '';
|
|
||||||
foreach ($userParams as $k => $v) {
|
|
||||||
$plainText .= "&{$k}={$v}";
|
|
||||||
}
|
|
||||||
$plainText = ltrim($plainText, '&');
|
|
||||||
|
|
||||||
// Encrypt
|
|
||||||
$algorithm = "aes-256-cbc";
|
|
||||||
$encrypted = openssl_encrypt($plainText, $algorithm, $derivedKey, OPENSSL_RAW_DATA, env('VISIT_IV'));
|
|
||||||
|
|
||||||
// Base64URL encode (same as Node.js output)
|
|
||||||
$output = rtrim(strtr(base64_encode($encrypted), '+/', '-_'), '=');
|
|
||||||
|
|
||||||
$baseURL = env('VISIT_BASE_URL');
|
|
||||||
$clientId = env('VISIT_CLIENT_ID');
|
|
||||||
$finalUrl = $baseURL . '/sso?userParams=' . $output . '&clientId=' . $clientId;
|
|
||||||
|
|
||||||
if (!empty($finalUrl)) {
|
|
||||||
log_message('error', 'VISIT SSO | emp_id: '.$emp_id.' | URL: '.$finalUrl);
|
|
||||||
return $this->respond(['status' => 'success','data' => $finalUrl], 200);
|
|
||||||
} else {
|
|
||||||
return $this->respond(['status' => 'failed','message' => 'Coming soon........!'], 200);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// not in use did for testing
|
// not in use did for testing
|
||||||
function encrypt_for_sso(): string {
|
function encrypt_for_sso(): string {
|
||||||
|
|
||||||
|
|||||||
@ -2471,7 +2471,7 @@ class EmployeeServiceController extends AdminController
|
|||||||
$member_data_count = count($member_data);
|
$member_data_count = count($member_data);
|
||||||
|
|
||||||
if ($inception_data_count !== $member_data_count) {
|
if ($inception_data_count !== $member_data_count) {
|
||||||
$result['error_summary'][] = 15;
|
$result['error_summary'][] = 101;
|
||||||
$result['error_message'] = "
|
$result['error_message'] = "
|
||||||
<strong>Inception Data Count:</strong>
|
<strong>Inception Data Count:</strong>
|
||||||
<span class='badge badge-danger'>{$inception_data_count}</span>
|
<span class='badge badge-danger'>{$inception_data_count}</span>
|
||||||
@ -2504,7 +2504,7 @@ class EmployeeServiceController extends AdminController
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!$match_found) {
|
if (!$match_found) {
|
||||||
array_push($result['error_summary'], 14);
|
array_push($result['error_summary'], 100);
|
||||||
$result['error_data'][$inception_key]['sno']['error'][] = "This inception row was not found in the member data list.";
|
$result['error_data'][$inception_key]['sno']['error'][] = "This inception row was not found in the member data list.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2510,89 +2510,105 @@
|
|||||||
// check policy no,insurer and etc in DB for this month
|
// check policy no,insurer and etc in DB for this month
|
||||||
// if all good return true, otherwise return false with messssage
|
// if all good return true, otherwise return false with messssage
|
||||||
$data_to_update = [];
|
$data_to_update = [];
|
||||||
foreach ($excel_data as $excel_key => $excel_row) {
|
try{
|
||||||
$is_row_empty = check_row_is_empty_or_null($excel_row);
|
foreach ($excel_data as $excel_key => $excel_row) {
|
||||||
if (!$is_row_empty) {
|
$is_row_empty = check_row_is_empty_or_null($excel_row);
|
||||||
|
if (!$is_row_empty) {
|
||||||
|
|
||||||
$is_source_found = 0;
|
$is_source_found = 0;
|
||||||
// $policy_start_date = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[4]); //policy_start_date from excel
|
// $policy_start_date = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[4]); //policy_start_date from excel
|
||||||
// $policy_end_date = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[5]); //policy_end_date from excel
|
// $policy_end_date = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[5]); //policy_end_date from excel
|
||||||
$policy_no = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[1]); //policy_end_date from excel
|
$policy_no = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[1]); //policy_end_date from excel
|
||||||
$policy_no = preg_replace('/[\x{200C}\x{200B}]/u', '', $excel_row[1]); //
|
$policy_no = preg_replace('/[\x{200C}\x{200B}]/u', '', $excel_row[1]); //
|
||||||
// $client_name = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[3]); //clientname from excel
|
// $client_name = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[3]); //clientname from excel
|
||||||
$endorsement_no = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[2]); //policy_end_date from excel
|
$endorsement_no = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[2]); //policy_end_date from excel
|
||||||
|
|
||||||
foreach ($source_data as $source_key => $source_row) {
|
foreach ($source_data as $source_key => $source_row) {
|
||||||
// Kint::dump(change_date_format($excel_row[3],'d-m-Y','Y-m-d'));
|
// Kint::dump(change_date_format($excel_row[3],'d-m-Y','Y-m-d'));
|
||||||
$source_endorsement_no = $source_row['endorsement_no'] !== null ? $source_row['endorsement_no'] : null;
|
$source_endorsement_no = $source_row['endorsement_no'] !== null ? $source_row['endorsement_no'] : null;
|
||||||
// if (($policy_no == $source_row['policy_no']) && $endorsement_no == $source_endorsement_no && change_date_format($policy_start_date, 'd-m-Y', 'Y-m-d') == $source_row['policy_start_date'] && change_date_format($policy_end_date, 'd-m-Y', 'Y-m-d') == $source_row['policy_end_date'] && $client_name == $source_row['client_name']) {
|
// if (($policy_no == $source_row['policy_no']) && $endorsement_no == $source_endorsement_no && change_date_format($policy_start_date, 'd-m-Y', 'Y-m-d') == $source_row['policy_start_date'] && change_date_format($policy_end_date, 'd-m-Y', 'Y-m-d') == $source_row['policy_end_date'] && $client_name == $source_row['client_name']) {
|
||||||
if (($policy_no == $source_row['policy_no']) && $endorsement_no == $source_endorsement_no) {
|
if (($policy_no == $source_row['policy_no']) && $endorsement_no == $source_endorsement_no) {
|
||||||
$is_source_found = 1;
|
$is_source_found = 1;
|
||||||
|
|
||||||
//calculate percentage first
|
//calculate percentage first
|
||||||
$total_amt = 0;
|
$total_amt = 0;
|
||||||
|
|
||||||
// $actual_bp_per = trim($excel_row[9]); //commented becoz this filed removed tfrom excel file
|
// $actual_bp_per = trim($excel_row[9]); //commented becoz this filed removed tfrom excel file
|
||||||
$actual_bp_per = 0; //set default value 0 for maintaining existing code flow
|
$actual_bp_per = 0; //set default value 0 for maintaining existing code flow
|
||||||
$actual_bp_brokerage = trim($excel_row[5]);
|
$actual_bp_brokerage = (int) trim($excel_row[5]);
|
||||||
$actual_bp_amt = trim($excel_row[3]);
|
$actual_bp_amt = (int) trim($excel_row[3]);
|
||||||
|
|
||||||
if (($actual_bp_brokerage && $actual_bp_brokerage != 0 && $actual_bp_brokerage != "")) {
|
if (($actual_bp_brokerage && $actual_bp_brokerage != 0 && $actual_bp_brokerage != "")) {
|
||||||
$total_amt += $actual_bp_brokerage;
|
$total_amt += $actual_bp_brokerage;
|
||||||
//percentage reverse calculation
|
//percentage reverse calculation
|
||||||
if (($actual_bp_per == 0 || $actual_bp_per == 0) && !empty($actual_bp_amt)) {
|
if (($actual_bp_per == 0 || $actual_bp_per == 0) && !empty($actual_bp_amt)) {
|
||||||
$actual_bp_per = round(($actual_bp_brokerage / $actual_bp_amt) * 100, 2);
|
$actual_bp_per = (int) round(($actual_bp_brokerage / $actual_bp_amt) * 100, 2);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$actual_bp_brokerage = $actual_bp_amt * ($actual_bp_per / 100);
|
||||||
|
$total_amt += $actual_bp_brokerage;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
$actual_bp_brokerage = $actual_bp_amt * ($actual_bp_per / 100);
|
|
||||||
$total_amt += $actual_bp_brokerage;
|
|
||||||
}
|
|
||||||
|
|
||||||
// $actual_tp_per = trim($excel_row[10]);//commented becoz this filed removed tfrom excel file
|
// $actual_tp_per = trim($excel_row[10]);//commented becoz this filed removed tfrom excel file
|
||||||
$actual_tp_per = 0;//set default value 0 for maintaining existing code flow
|
$actual_tp_per = 0;//set default value 0 for maintaining existing code flow
|
||||||
$actual_tp_brokerage = trim($excel_row[6]);
|
$actual_tp_brokerage = (int) trim($excel_row[6]);
|
||||||
$actual_tp_amt = trim($excel_row[4]);
|
$actual_tp_amt = (int) trim($excel_row[4]);
|
||||||
|
|
||||||
if ($actual_tp_brokerage && $actual_tp_brokerage != 0 && $actual_tp_brokerage != "") {
|
if ($actual_tp_brokerage && $actual_tp_brokerage != 0 && $actual_tp_brokerage != "") {
|
||||||
$total_amt += $actual_tp_brokerage;
|
$total_amt += $actual_tp_brokerage;
|
||||||
//percentage reverse calculation
|
//percentage reverse calculation
|
||||||
if (($actual_tp_per == 0 || $actual_tp_per == "") && !empty($actual_tp_amt)) {
|
if (($actual_tp_per == 0 || $actual_tp_per == "") && !empty($actual_tp_amt)) {
|
||||||
$actual_tp_per = ($actual_tp_brokerage / $actual_tp_amt) * 100;
|
$actual_tp_per = (int) round(($actual_tp_brokerage / $actual_tp_amt) * 100, 2);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$actual_tp_brokerage = $actual_tp_amt * ($actual_tp_per / 100);
|
||||||
|
$total_amt += $actual_tp_brokerage;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
$actual_tp_brokerage = $actual_tp_amt * ($actual_tp_per / 100);
|
|
||||||
$total_amt += $actual_tp_brokerage;
|
|
||||||
}
|
|
||||||
|
|
||||||
// $actual_tep_per = trim($excel_row[11]);
|
// $actual_tep_per = trim($excel_row[11]);
|
||||||
// $actual_tep_brokerage = trim($excel_row[14]);
|
// $actual_tep_brokerage = trim($excel_row[14]);
|
||||||
// $actual_tep_amt = trim($excel_row[8]);
|
// $actual_tep_amt = trim($excel_row[8]);
|
||||||
|
|
||||||
$actual_tep_per = 0;
|
$actual_tep_per = 0;
|
||||||
$actual_tep_brokerage = 0;
|
$actual_tep_brokerage = 0;
|
||||||
$actual_tep_amt = 0;
|
$actual_tep_amt = 0;
|
||||||
|
|
||||||
if ($actual_tep_brokerage && $actual_tep_brokerage != 0 && $actual_tep_brokerage != "") {
|
if ($actual_tep_brokerage && $actual_tep_brokerage != 0 && $actual_tep_brokerage != "") {
|
||||||
$total_amt += $actual_tep_brokerage;
|
$total_amt += $actual_tep_brokerage;
|
||||||
//percentage reverse calculation
|
//percentage reverse calculation
|
||||||
if (($actual_tep_per == 0 || $actual_tep_per == "") && !empty($actual_tep_amt)) {
|
if (($actual_tep_per == 0 || $actual_tep_per == "") && !empty($actual_tep_amt)) {
|
||||||
$actual_tep_per = ($actual_tep_brokerage / $actual_tep_amt) * 100;
|
$actual_tep_per = ($actual_tep_brokerage / $actual_tep_amt) * 100;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$actual_tep_brokerage = $actual_tep_amt * ($actual_tep_per / 100);
|
||||||
|
$total_amt += $actual_tep_brokerage;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
$actual_tep_brokerage = $actual_tep_amt * ($actual_tep_per / 100);
|
//find variance
|
||||||
$total_amt += $actual_tep_brokerage;
|
$variance_amt = $source_row['exp_amt'] - $total_amt;
|
||||||
|
|
||||||
|
$data_to_update[] = ['co_share_id' => $source_row['id'], 'actual_bp_amt' => $actual_bp_amt, 'actual_tp_amt' => $actual_tp_amt, 'actual_tep_amt' => $actual_tep_amt, 'actual_bp_per' => $actual_bp_per, 'actual_tp_per' => $actual_tp_per, 'actual_tep_per' => $actual_tep_per, 'variance' => $variance_amt, 'actual_tep_brokerage_amt' => $actual_tep_brokerage, 'actual_tp_brokerage_amt' => $actual_tp_brokerage, 'actual_bp_brokerage_amt' => $actual_bp_brokerage, 'reward' => trim($excel_row[7]), 'statement_id' => $file_id];
|
||||||
|
|
||||||
|
unset($source_data[$source_key]);
|
||||||
|
continue 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
//find variance
|
|
||||||
$variance_amt = $source_row['exp_amt'] - $total_amt;
|
|
||||||
|
|
||||||
$data_to_update[] = ['co_share_id' => $source_row['id'], 'actual_bp_amt' => $actual_bp_amt, 'actual_tp_amt' => $actual_tp_amt, 'actual_tep_amt' => $actual_tep_amt, 'actual_bp_per' => $actual_bp_per, 'actual_tp_per' => $actual_tp_per, 'actual_tep_per' => $actual_tep_per, 'variance' => $variance_amt, 'actual_tep_brokerage_amt' => $actual_tep_brokerage, 'actual_tp_brokerage_amt' => $actual_tp_brokerage, 'actual_bp_brokerage_amt' => $actual_bp_brokerage, 'reward' => trim($excel_row[7]), 'statement_id' => $file_id];
|
|
||||||
|
|
||||||
unset($source_data[$source_key]);
|
|
||||||
continue 2;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}catch (\Throwable $th) {
|
||||||
|
|
||||||
|
$this->myLogger->logme("error", "REST-AUTH-CONTROLLER - updateInsurerStatement: Exception: " . $th->getMessage() . " --- Line: " . $th->getLine() . " --- Trace: " . $th->getTraceAsString());
|
||||||
|
$errorData = [
|
||||||
|
'message' => $th->getMessage(),
|
||||||
|
'file' => $th->getFile(),
|
||||||
|
'line' => $th->getLine(),
|
||||||
|
'code' => $th->getCode(),
|
||||||
|
'trace' => $th->getTraceAsString(),
|
||||||
|
'trace_array' => $th->getTrace(), // full array version (optional)
|
||||||
|
'function' => $th->getTrace()[0]['function'] ?? null,
|
||||||
|
'class' => $th->getTrace()[0]['class'] ?? null,
|
||||||
|
];
|
||||||
|
return ['status' => 'failed', 'code' => 500, 'message' => $th->getMessage(), 'error_data' => $errorData];
|
||||||
}
|
}
|
||||||
// dd($data_to_update);
|
// dd($data_to_update);
|
||||||
$this->coShareStmtDetailsModel->insertBatch($data_to_update, 'id');
|
$this->coShareStmtDetailsModel->insertBatch($data_to_update, 'id');
|
||||||
@ -2795,6 +2811,20 @@
|
|||||||
$this->loadLayout('dms_search', $data);
|
$this->loadLayout('dms_search', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function payouts()
|
||||||
|
{
|
||||||
|
|
||||||
|
$data['tab_name'] = 'Payouts';
|
||||||
|
$data['page_name'] = 'Payouts';
|
||||||
|
$data['payouts'] = [];
|
||||||
|
$data['agents'] = [ 1 => "Agent 1", 2 => "Agent 2", 3 => "Agent 3", 4 => "Agent 4", 5 => "Agent 5", 6 => "Agent 6", 7 => "Agent 7", 8 => "Agent 8"];
|
||||||
|
$data['brokers'] = [];
|
||||||
|
|
||||||
|
if ($this->request->is('post')) {}
|
||||||
|
if ($this->request->is('get')) {}
|
||||||
|
|
||||||
|
$this->loadLayout('policy_transaction_payouts', $data);
|
||||||
|
}
|
||||||
//---------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
public function getCoShareStatementDetails($pt_id)
|
public function getCoShareStatementDetails($pt_id)
|
||||||
|
|||||||
@ -1518,12 +1518,7 @@ class RestAuthenticationController extends AdminController
|
|||||||
|
|
||||||
public function savePassword()
|
public function savePassword()
|
||||||
{
|
{
|
||||||
log_message('error', ' ');
|
|
||||||
log_message('error', ' ************************************* POST START **************************************** ');
|
|
||||||
log_message('error', ' ');
|
|
||||||
$this->myLogger->logme("error", "REST-AUTH-CONTROLLER - savePassword: Function called");
|
|
||||||
$this->myLogger->logme("error", "REST-AUTH-CONTROLLER - savePassword: Received payload = " . json_encode($this->request->getJSON() ?? []));
|
$this->myLogger->logme("error", "REST-AUTH-CONTROLLER - savePassword: Received payload = " . json_encode($this->request->getJSON() ?? []));
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
$payload = $this->request->getJSON();
|
$payload = $this->request->getJSON();
|
||||||
@ -1681,8 +1676,7 @@ class RestAuthenticationController extends AdminController
|
|||||||
if ($employeeData && password_verify($old_password, $employeeData['password'])) {
|
if ($employeeData && password_verify($old_password, $employeeData['password'])) {
|
||||||
|
|
||||||
// Hash new password
|
// Hash new password
|
||||||
// $newHashedPassword = password_hash($new_password, PASSWORD_DEFAULT);
|
$newHashedPassword = password_hash($new_password, PASSWORD_DEFAULT);
|
||||||
$newHashedPassword = $new_password;
|
|
||||||
|
|
||||||
// Update password and clear OTP
|
// Update password and clear OTP
|
||||||
$updated = $this->employeeModel->update($employeeData['id'], [
|
$updated = $this->employeeModel->update($employeeData['id'], [
|
||||||
|
|||||||
@ -2011,6 +2011,7 @@ class TicketController extends BaseController
|
|||||||
{
|
{
|
||||||
$received_data = $this->request->getPost();
|
$received_data = $this->request->getPost();
|
||||||
$ticket_type_id = $this->request->getPost('ticket_type_id') ?? null;
|
$ticket_type_id = $this->request->getPost('ticket_type_id') ?? null;
|
||||||
|
$client_id = $this->request->getPost('client_id') ?? null;
|
||||||
$emp_id = $received_data['emp_id'];
|
$emp_id = $received_data['emp_id'];
|
||||||
|
|
||||||
// Get all client policy IDs for the given employee
|
// Get all client policy IDs for the given employee
|
||||||
@ -2027,6 +2028,9 @@ class TicketController extends BaseController
|
|||||||
$builder->where('e.is_active', 1);
|
$builder->where('e.is_active', 1);
|
||||||
$builder->where('ep.is_active', 1);
|
$builder->where('ep.is_active', 1);
|
||||||
$builder->where('e.emp_code', $self_data['emp_code']);
|
$builder->where('e.emp_code', $self_data['emp_code']);
|
||||||
|
if(!empty($client_id)){
|
||||||
|
$builder->where('e.client_id', $client_id);
|
||||||
|
}
|
||||||
$builder->groupBy('client_policy_id');
|
$builder->groupBy('client_policy_id');
|
||||||
|
|
||||||
$query = $builder->get();
|
$query = $builder->get();
|
||||||
|
|||||||
@ -12,6 +12,209 @@ class VidalApiController extends BaseController
|
|||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function fileUploadToVidal()
|
||||||
|
{
|
||||||
|
$apiUrl = "https://devapigw.vidalhealthtpa.com/partner-integration/api/files/upload-url";
|
||||||
|
$subscriptionKey = getenv('VIDAL_API_SUBSCRIPTION_KEY');
|
||||||
|
|
||||||
|
// Step 1: Get signed URL from Vidal API
|
||||||
|
$filePath = '/opt/lampp/htdocs/nhance/writable/uploads/claim_files/1760013019_73d94af7b96ddc2e3d51.png';
|
||||||
|
$payload = json_encode(["scope" => 'document type' , 'fileName' => '1760013019_73d94af7b96ddc2e3d51.png']);
|
||||||
|
$headers = [
|
||||||
|
"Content-Type: application/json",
|
||||||
|
"Ocp-Apim-Subscription-Key: $subscriptionKey"
|
||||||
|
];
|
||||||
|
|
||||||
|
$ch = curl_init($apiUrl);
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
curl_setopt($ch, CURLOPT_POST, true);
|
||||||
|
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
|
||||||
|
|
||||||
|
$response = curl_exec($ch);
|
||||||
|
if (curl_errno($ch)) {
|
||||||
|
die("Curl error while requesting signed URL: " . curl_error($ch));
|
||||||
|
}
|
||||||
|
curl_close($ch);
|
||||||
|
|
||||||
|
$responseData = json_decode($response, true);
|
||||||
|
|
||||||
|
if (!isset($responseData['data']['signedUrl'])) {
|
||||||
|
die("Failed to get signed URL. Response: " . $response);
|
||||||
|
}
|
||||||
|
|
||||||
|
$signedUrl = $responseData['data']['signedUrl'];
|
||||||
|
$fileId = $responseData['data']['fileId'];
|
||||||
|
|
||||||
|
// Step 2: Upload file to signed URL using PUT (Azure Blob)
|
||||||
|
$fileSize = filesize($filePath);
|
||||||
|
$fileContent = fopen($filePath, 'r');
|
||||||
|
|
||||||
|
$ch2 = curl_init($signedUrl);
|
||||||
|
curl_setopt($ch2, CURLOPT_PUT, true);
|
||||||
|
curl_setopt($ch2, CURLOPT_INFILE, $fileContent);
|
||||||
|
curl_setopt($ch2, CURLOPT_INFILESIZE, $fileSize);
|
||||||
|
curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
curl_setopt($ch2, CURLOPT_HTTPHEADER, [
|
||||||
|
"x-ms-blob-type: BlockBlob",
|
||||||
|
"Content-Length: $fileSize"
|
||||||
|
]);
|
||||||
|
|
||||||
|
$uploadResponse = curl_exec($ch2);
|
||||||
|
|
||||||
|
$httpCode = curl_getinfo($ch2, CURLINFO_HTTP_CODE);
|
||||||
|
if (curl_errno($ch2)) {
|
||||||
|
die("Curl error while uploading file: " . curl_error($ch2));
|
||||||
|
}
|
||||||
|
fclose($fileContent);
|
||||||
|
curl_close($ch2);
|
||||||
|
|
||||||
|
if ($httpCode !== 201 && $httpCode !== 200) {
|
||||||
|
die("File upload failed. HTTP Code: $httpCode\nResponse: $uploadResponse");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Step 3: Return File ID for reference
|
||||||
|
return $this->response->setJSON( [
|
||||||
|
"status" => true,
|
||||||
|
"message" => "File uploaded successfully",
|
||||||
|
"fileId" => $fileId,
|
||||||
|
"signedUrl" => $signedUrl,
|
||||||
|
"uploadResponse" => json_decode($uploadResponse, true)
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function fileUpload()
|
||||||
|
{
|
||||||
|
|
||||||
|
helper('api');
|
||||||
|
$url = getenv('VIDAL_API_BASE_URL') . '/files/upload-url';
|
||||||
|
$method = 'POST';
|
||||||
|
|
||||||
|
$headers = [
|
||||||
|
'Content-Type: application/json',
|
||||||
|
'x-ms-blob-type: BlockBlob',
|
||||||
|
'Ocp-Apim-Subscription-Key:' .getenv('VIDAL_API_SUBSCRIPTION_KEY').'',
|
||||||
|
];
|
||||||
|
|
||||||
|
$body = [
|
||||||
|
'scope' => 'application/pdf',
|
||||||
|
'fileName' => '1760013019_73d94af7b96ddc2e3d51.png',
|
||||||
|
'file' => '/opt/lampp/htdocs/nhance/writable/uploads/claim_files/1760013019_73d94af7b96ddc2e3d51.png',
|
||||||
|
];
|
||||||
|
|
||||||
|
$response = call_third_party_api($url, $method, $headers, $body);
|
||||||
|
|
||||||
|
if($response['status'] != true){
|
||||||
|
return $this->response->setJSON([
|
||||||
|
'status' => false,
|
||||||
|
'message' => 'failed.',
|
||||||
|
'data' => $response
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->response->setJSON($response);
|
||||||
|
|
||||||
|
// {
|
||||||
|
// "status": true,
|
||||||
|
// "data": {
|
||||||
|
// "status": "SUCCESS",
|
||||||
|
// "data": {
|
||||||
|
// "signedUrl": "https://devapigw.vidalhealthtpa.com/doc-storage/api/deeplink/6912d37a9f09fc3f6be4cd9c/56fb8e76-39a4-4e4b-99f2-4748e224e4a7?se=2025-11-18T06:11:06.304Z",
|
||||||
|
// "expiresAt": "2025-11-18T06:11:06.304Z",
|
||||||
|
// "fileId": "https://devapigw.vidalhealthtpa.com/doc-storage/api/private/6912d37a9f09fc3f6be4cd9c"
|
||||||
|
// },
|
||||||
|
// "trace": "T_ID_a09327df-ea34-4874-9e3f-05ac5c0a2c68",
|
||||||
|
// "successful": true
|
||||||
|
// },
|
||||||
|
// "code": 200
|
||||||
|
// }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function SubmitClaim ($claimId = null)
|
||||||
|
{
|
||||||
|
helper('api');
|
||||||
|
|
||||||
|
$url = getenv('VIDAL_API_BASE_URL').'/claims/submit';
|
||||||
|
$method = 'POST';
|
||||||
|
|
||||||
|
$headers = [
|
||||||
|
'Content-Type: application/json',
|
||||||
|
'Ocp-Apim-Subscription-Key:' .getenv('VIDAL_API_SUBSCRIPTION_KEY').'',
|
||||||
|
];
|
||||||
|
|
||||||
|
$body = [
|
||||||
|
'policyNo' => "351500/D0534/PP/20-20/PC",
|
||||||
|
'enrollmentId' => "BLR-NC-D0534-004-0000033-A",
|
||||||
|
'typeOfClaim' => "Main hospitalization claim",
|
||||||
|
'claimSubType' => "Hospitalization",
|
||||||
|
'requestedAmount' => "3500",
|
||||||
|
'ailmentType' => "Non covid",
|
||||||
|
'admissionDate' => "20-07-2023",
|
||||||
|
'dischargeDate' => "23-07-2023",
|
||||||
|
'hospitalName' => "DELL HOSPITAL PVT LTD",
|
||||||
|
'empanelmentNo' => "HOS-BLR-021280",
|
||||||
|
'documentType' => "Claim",
|
||||||
|
'ailmentName' => "Cold",
|
||||||
|
'hospitalAddress' => "abc",
|
||||||
|
'hospitalState' => "karnataka",
|
||||||
|
'hospitalCity' => "bangalore",
|
||||||
|
'hospitalPinCode' => "560036",
|
||||||
|
'hospitalPhoneNo' => "7656879899",
|
||||||
|
'fileId' => "https://devapigw.vidalhealthtpa.com/doc-storage/api/private/69130dfad1414b35a775480f",
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$response = call_third_party_api($url, $method, $headers, $body);
|
||||||
|
|
||||||
|
if($response['status'] != true){
|
||||||
|
return $this->response->setJSON([
|
||||||
|
'status' => false,
|
||||||
|
'message' => 'failed.',
|
||||||
|
'data' => $response
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->response->setJSON($response);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function claimStatus ($claimId = null)
|
||||||
|
{
|
||||||
|
helper('api');
|
||||||
|
|
||||||
|
$url = getenv('VIDAL_API_BASE_URL').'/claims/claim-dependent-info';
|
||||||
|
$method = 'POST';
|
||||||
|
|
||||||
|
$headers = [
|
||||||
|
'Content-Type: application/json',
|
||||||
|
'Ocp-Apim-Subscription-Key:' .getenv('VIDAL_API_SUBSCRIPTION_KEY').'',
|
||||||
|
];
|
||||||
|
|
||||||
|
$body = [
|
||||||
|
'empNO' => "",
|
||||||
|
'tpaCardID' => "",
|
||||||
|
'claimID' => "BLR-0284-CL-9349459",
|
||||||
|
'emailID' => "",
|
||||||
|
'mobileNO' => "",
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$response = call_third_party_api($url, $method, $headers, $body);
|
||||||
|
|
||||||
|
if($response['status'] != true){
|
||||||
|
return $this->response->setJSON([
|
||||||
|
'status' => false,
|
||||||
|
'message' => 'failed.',
|
||||||
|
'data' => $response
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->response->setJSON($response);
|
||||||
|
}
|
||||||
|
|
||||||
public function hospitalNetwork(){
|
public function hospitalNetwork(){
|
||||||
|
|
||||||
$postData = $this->request->getJSON(true);
|
$postData = $this->request->getJSON(true);
|
||||||
@ -123,74 +326,6 @@ class VidalApiController extends BaseController
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function newClaim()
|
|
||||||
{
|
|
||||||
$postData = $this->request->getPost();
|
|
||||||
|
|
||||||
if (empty($postData)) {
|
|
||||||
return $this->response->setJSON([
|
|
||||||
'status' => false,
|
|
||||||
'message' => 'Empty Data Given.',
|
|
||||||
'data' => $postData
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
helper('api');
|
|
||||||
|
|
||||||
$url = getenv('VIDAL_API_BASE_URL') . '/submitClaim';
|
|
||||||
$method = 'POST';
|
|
||||||
|
|
||||||
$headers = [
|
|
||||||
'Content-Type: multipart/form-data',
|
|
||||||
'Authorization:' .getenv('VIDAL_API_KEY').'',
|
|
||||||
];
|
|
||||||
|
|
||||||
$body = [
|
|
||||||
'username' => getenv('VIDAL_API_USERNAME'),
|
|
||||||
'password' => getenv('VIDAL_API_PASSWORD'),
|
|
||||||
'policyNo' => $postData['policyNo'] ?? '',
|
|
||||||
'enrollmentId' => $postData['enrollmentId'] ?? '',
|
|
||||||
'typeOfClaim' => $postData['typeOfClaim'] ?? '',
|
|
||||||
'claimSubType' => $postData['claimSubType'] ?? '',
|
|
||||||
'requestedAmount' => $postData['requestedAmount'] ?? '',
|
|
||||||
'ailmentType' => $postData['ailmentType'] ?? '',
|
|
||||||
'admissionDate' => $postData['admissionDate'] ?? '',
|
|
||||||
'dischargeDate' => $postData['dischargeDate'] ?? '',
|
|
||||||
'hospitalName' => $postData['hospitalName'] ?? '',
|
|
||||||
'empanelmentNo' => $postData['empanelmentNo'] ?? '',
|
|
||||||
'documentType' => $postData['documentType'] ?? '',
|
|
||||||
'ailmentName' => $postData['ailmentName'] ?? '',
|
|
||||||
'hospitalAddress' => $postData['hospitalAddress'] ?? '',
|
|
||||||
'hospitalState' => $postData['hospitalState'] ?? '',
|
|
||||||
'hospitalCity' => $postData['hospitalCity'] ?? '',
|
|
||||||
'hospitalPinCode' => $postData['hospitalPinCode'] ?? '',
|
|
||||||
'hospitalPhoneNo' => $postData['hospitalPhoneNo'] ?? '',
|
|
||||||
];
|
|
||||||
|
|
||||||
// ✅ Handle file upload
|
|
||||||
if ($file = $this->request->getFile('File')) {
|
|
||||||
if ($file->isValid() && !$file->hasMoved()) {
|
|
||||||
$filePath = $file->getTempName();
|
|
||||||
$originalName = $file->getClientName();
|
|
||||||
$mimeType = $file->getMimeType();
|
|
||||||
|
|
||||||
$body['File'] = new \CURLFile($filePath, $mimeType, $originalName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$response = call_third_party_api($url, $method, $headers, $body);
|
|
||||||
|
|
||||||
if($response['status'] != true){
|
|
||||||
return $this->response->setJSON([
|
|
||||||
'status' => false,
|
|
||||||
'message' => 'Token generation failed.',
|
|
||||||
'data' => $response
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->response->setJSON($response);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function enrollment()
|
public function enrollment()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@ -935,6 +935,7 @@ table.dataTable tbody td {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
extend: 'excel',
|
extend: 'excel',
|
||||||
|
sheetName: 'Users',
|
||||||
text: '<i class="mdi mdi-file-excel"></i><span class="btn-custom"> EXCEL </span>',
|
text: '<i class="mdi mdi-file-excel"></i><span class="btn-custom"> EXCEL </span>',
|
||||||
exportOptions: { orthogonal: 'sort' },
|
exportOptions: { orthogonal: 'sort' },
|
||||||
className: 'app-btn-primary',
|
className: 'app-btn-primary',
|
||||||
@ -948,12 +949,16 @@ table.dataTable tbody td {
|
|||||||
paging: true,
|
paging: true,
|
||||||
pageLength: 10,
|
pageLength: 10,
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
</div>`,
|
</div>`,
|
||||||
searchPlaceholder: "Search"
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
initComplete: function () {
|
initComplete: function () {
|
||||||
$(".dt-buttons").prepend(`
|
$(".dt-buttons").prepend(`
|
||||||
|
|||||||
@ -53,7 +53,7 @@ table.dataTable thead th {
|
|||||||
<div class="btn-group dropdown">
|
<div class="btn-group dropdown">
|
||||||
<a href="javascript: void(0);" class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown"aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>
|
<a href="javascript: void(0);" class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown"aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>
|
||||||
<div class="dropdown-menu dropdown-menu-right">
|
<div class="dropdown-menu dropdown-menu-right">
|
||||||
<a class="dropdown-item advertise_image_edit" href="#" data-toggle="modal" data-id="<?php echo $row['id']; ?>" data-target="#bike_make_login-modal"><i class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit</a>
|
<a class="dropdown-item advertise_image_edit" href="#" data-toggle="modal" data-id="<?php echo $row['id']; ?>" data-name="<?php echo $row['name']; ?>" data-target="#bike_make_login-modal"><i class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit</a>
|
||||||
<a class="dropdown-item" data-id="<?= $row['id'];?>" onclick="removeClient(this)"><i class="mdi mdi-delete mr-2 text-muted font-18 vertical-middle"></i>Delete</a>
|
<a class="dropdown-item" data-id="<?= $row['id'];?>" onclick="removeClient(this)"><i class="mdi mdi-delete mr-2 text-muted font-18 vertical-middle"></i>Delete</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -82,17 +82,15 @@ table.dataTable thead th {
|
|||||||
<h4 id="advertise_add_edit">Add Advertise Image </h4>
|
<h4 id="advertise_add_edit">Add Advertise Image </h4>
|
||||||
</div>
|
</div>
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||||
<form id="model_form_data" class="px-4">
|
<form id="model_form_data" class="px-4" enctype="multipart/form-data">
|
||||||
|
<input type="hidden" name="add_image_id" id="add_image_id" value="0">
|
||||||
<input type="text" name="add_image_id" id="add_image_id" value="0" hidden>
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="branchname">Upload Image</label>
|
<label for="branchname">Upload Image</label>
|
||||||
<div class="input-icon">
|
<div class="input-icon">
|
||||||
<input type="file" class="form-control" name="advertise_image" id="advertise_image"
|
<input type="file" class="form-control" name="advertise_image" id="advertise_image" accept="image/*" onchange="PreviewImage();" required>
|
||||||
accept="image/*" onchange="PreviewImage();" required="">
|
|
||||||
<i class="mdi mdi-upload additional-icon"></i>
|
<i class="mdi mdi-upload additional-icon"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -101,8 +99,9 @@ table.dataTable thead th {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group text-center">
|
<div class="form-group text-center">
|
||||||
<button class="btn btn-rounded btn-primary" type="submit" onclick="submitBranch(this)">Submit</button>
|
<button type="button" class="btn btn-primary" onclick="submitBranch()">Submit</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@ -113,68 +112,69 @@ table.dataTable thead th {
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
var table;
|
|
||||||
$(document).ready(function()
|
|
||||||
{
|
|
||||||
table = $('#tickets-table').DataTable({
|
|
||||||
dom: "<'row'<'col-sm-1'f><'col-sm-11 text-right'B>>" + // Filter left, buttons right
|
|
||||||
"<'row'<'col-sm-12'tr>>" +
|
|
||||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
|
||||||
buttons: [
|
|
||||||
{
|
|
||||||
text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Add </span>',
|
|
||||||
className: 'btn app-btn-primary',
|
|
||||||
action: function (e, dt, node, config) {
|
|
||||||
// your previous click logic here
|
|
||||||
$('#add_image_id').val(0);
|
|
||||||
$('#advertise_add_edit').html('Add Advertise Image');
|
|
||||||
$('#uploadPreview').attr('src', '<?= base_url()."public/assets/images/avatar_2x.png" ?>');
|
|
||||||
$('#bike_make_login-modal').modal('show');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
language: {
|
|
||||||
search: `
|
|
||||||
<div class="datatable-search-wrapper">
|
|
||||||
_INPUT_
|
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
|
||||||
</div>`,
|
|
||||||
searchPlaceholder: "Search",
|
|
||||||
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
|
||||||
},
|
|
||||||
paging: true ,
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
function submitBranch(params) {
|
function submitBranch() {
|
||||||
|
const fileInput = $('#advertise_image')[0].files[0]; // get actual file object
|
||||||
|
const imageId = $('#add_image_id').val();
|
||||||
|
|
||||||
// if ($('#add_image_id').val()) {
|
if (!fileInput) {
|
||||||
// var url = '<?= base_url("edit_advertise_image/"); ?>'+$('#add_image_id').val();
|
toastr.warning('Please upload an image before submitting', 'Warning');
|
||||||
// }else{
|
$('#advertise_image').focus();
|
||||||
var url = '<?= base_url("add_advertise_image"); ?>';
|
return;
|
||||||
// }
|
}
|
||||||
|
|
||||||
var formData = new FormData($('#model_form_data')[0]);
|
|
||||||
|
|
||||||
|
var url = '<?= base_url("add_advertise_image") ?>';
|
||||||
|
var formData = new FormData();
|
||||||
|
formData.append('advertise_image', fileInput);
|
||||||
|
formData.append('add_image_id', imageId);
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: url,
|
url: url,
|
||||||
data: formData,
|
data: formData,
|
||||||
dataType: 'json',
|
|
||||||
processData: false,
|
processData: false,
|
||||||
contentType: false,
|
contentType: false,
|
||||||
|
dataType: 'json',
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
console.log(response);
|
console.log(response);
|
||||||
$('#bike_model_login-modal').modal('hide');
|
if (response.status) {
|
||||||
$('#bike_make_name').val('');
|
$('#bike_make_login-modal').modal('hide');
|
||||||
|
$('#advertise_image').val('');
|
||||||
window.location.reload();
|
$('#uploadPreview').attr('src', '<?= base_url('public/assets/images/avatar_2x.png') ?>');
|
||||||
|
toastr.success('Image uploaded successfully!');
|
||||||
|
window.location.reload();
|
||||||
|
} else {
|
||||||
|
toastr.error(response.message || 'Something went wrong.');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
error: function(xhr, status, error) {
|
error: function(xhr, status, error) {
|
||||||
// Handle error response here
|
|
||||||
console.error(xhr.responseText);
|
console.error(xhr.responseText);
|
||||||
|
console.error('Status:', status);
|
||||||
|
console.error('Error:', error);
|
||||||
|
|
||||||
|
let msg = 'Something went wrong. Please try again later.';
|
||||||
|
|
||||||
|
switch (xhr.status) {
|
||||||
|
case 400:
|
||||||
|
msg = xhr.responseJSON?.message || 'Bad Request — Invalid input.';
|
||||||
|
break;
|
||||||
|
case 401:
|
||||||
|
msg = 'Unauthorized — Please log in again.';
|
||||||
|
break;
|
||||||
|
case 403:
|
||||||
|
msg = 'Forbidden — You do not have permission.';
|
||||||
|
break;
|
||||||
|
case 404:
|
||||||
|
msg = 'Not Found — Requested URL or resource not found.';
|
||||||
|
break;
|
||||||
|
case 500:
|
||||||
|
console.log('Internal Server Error — Please contact support.');
|
||||||
|
msg = xhr.responseJSON?.message || xhr.responseText || msg;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
msg = xhr.responseJSON?.message || xhr.responseText || msg;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -218,6 +218,49 @@ $(document).ready(function()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var table;
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
table = $('#tickets-table').DataTable({
|
||||||
|
dom: "<'row'<'col-sm-1'f><'col-sm-11 text-right'B>>" + // Filter left, button right
|
||||||
|
"<'row'<'col-sm-12'tr>>" +
|
||||||
|
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
text: '<i class="mdi mdi-plus"></i> <span class="btn-custom">Add</span>',
|
||||||
|
className: 'btn app-btn-primary',
|
||||||
|
action: function (e, dt, node, config) {
|
||||||
|
// ✅ Call your modal logic
|
||||||
|
callmodal();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
language: {
|
||||||
|
search: `
|
||||||
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
|
_INPUT_
|
||||||
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
|
},
|
||||||
|
paging: true
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// ✅ Define your modal function separately
|
||||||
|
function callmodal() {
|
||||||
|
$('#add_image_id').val(0);
|
||||||
|
$('#advertise_add_edit').html('Add Advertise Image');
|
||||||
|
$('#uploadPreview').attr('src', '<?= base_url()."public/assets/images/avatar_2x.png" ?>');
|
||||||
|
$('#bike_model_login-modal').modal('show'); // ✅ this shows the modal
|
||||||
|
var myModal = new bootstrap.Modal(document.getElementById('bike_make_login-modal'));
|
||||||
|
myModal.show();
|
||||||
|
}
|
||||||
|
|
||||||
// $('#btnAdd').click(function () {
|
// $('#btnAdd').click(function () {
|
||||||
// $('#add_image_id').val(0);
|
// $('#add_image_id').val(0);
|
||||||
// $('#advertise_add_edit').html('Add Advertise Image');
|
// $('#advertise_add_edit').html('Add Advertise Image');
|
||||||
@ -225,28 +268,52 @@ $(document).ready(function()
|
|||||||
|
|
||||||
// })
|
// })
|
||||||
|
|
||||||
$('.advertise_image_edit').click(function (params) {
|
// $('.advertise_image_edit').click(function (params) {
|
||||||
// console.log($(this).data('id'));
|
// // console.log($(this).data('id'));
|
||||||
$('#add_image_id').val($(this).data('id'));
|
// $('#add_image_id').val($(this).data('id'));
|
||||||
var url = '<?= base_url("getAdvertiseImage/"); ?>'+$(this).data('id') ;
|
// var url = '<?= base_url("getAdvertiseImage/"); ?>'+$(this).data('id') ;
|
||||||
$.ajax({
|
// $.ajax({
|
||||||
type: 'GET',
|
// type: 'GET',
|
||||||
url: url,
|
// url: url,
|
||||||
success: function (response) {
|
// success: function (response) {
|
||||||
console.log(response);
|
// console.log(response);
|
||||||
$('#advertise_add_edit').html('Edit Advertise Image');
|
// $('#advertise_add_edit').html('Edit Advertise Image');
|
||||||
$('#uploadPreview').attr('src', '<?= base_url() . "public/uploads/advertiseImage/"?>' + response)
|
// $('#uploadPreview').attr('src', '<?= base_url() . "public/uploads/advertiseImage/"?>' + response)
|
||||||
.on('error', function() {
|
// .on('error', function() {
|
||||||
$(this).attr('src', '<?= base_url()."public/assets/images/avatar_2x.png" ?>');
|
// $(this).attr('src', '<?= base_url()."public/assets/images/avatar_2x.png" ?>');
|
||||||
});
|
// });
|
||||||
|
|
||||||
|
|
||||||
},
|
// },
|
||||||
error: function (xhr, status, error) {
|
// error: function (xhr, status, error) {
|
||||||
console.error(xhr.responseText);
|
// console.error(xhr.responseText);
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
$(document).on('click', '.advertise_image_edit', function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
|
|
||||||
|
const id = $(this).data('id');
|
||||||
|
const name = $(this).data('name');
|
||||||
|
console.log('Clicked ID:', id);
|
||||||
|
console.log('<?= base_url(); ?>');
|
||||||
|
|
||||||
|
$('#add_image_id').val(id);
|
||||||
|
$('#advertise_image').val(name);
|
||||||
|
$('#advertise_add_edit').html('Edit Advertise Image');
|
||||||
|
const imgUrl = '<?= base_url("showAdvertiseImage/"); ?>' + name;
|
||||||
|
|
||||||
|
$('#uploadPreview').attr('src', imgUrl)
|
||||||
|
.on('error', function() {
|
||||||
|
$(this).attr('src', '<?= base_url()."public/assets/images/avatar_2x.png" ?>');
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@ -254,12 +254,16 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
</div>`,
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
searchPlaceholder: "Search"
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
paging: true
|
paging: true
|
||||||
});
|
});
|
||||||
|
|||||||
@ -107,17 +107,22 @@
|
|||||||
extend: 'excel',
|
extend: 'excel',
|
||||||
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
||||||
title: 'BDS TAT BAND WISE DATA',
|
title: 'BDS TAT BAND WISE DATA',
|
||||||
|
sheetName: 'BDS TAT BAND WISE DATA',
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
</div>`,
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
searchPlaceholder: "Search"
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
paging: true,
|
paging: true,
|
||||||
pageLength: 10,
|
pageLength: 10,
|
||||||
|
|||||||
@ -134,6 +134,7 @@ $(document).ready(function() {
|
|||||||
extend: 'excel',
|
extend: 'excel',
|
||||||
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
||||||
title: 'Renewal-List',
|
title: 'Renewal-List',
|
||||||
|
sheetName: 'Renewal-List',
|
||||||
exportOptions: {
|
exportOptions: {
|
||||||
orthogonal: 'sort'
|
orthogonal: 'sort'
|
||||||
},
|
},
|
||||||
@ -142,12 +143,16 @@ $(document).ready(function() {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
</div>`,
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
searchPlaceholder: "Search"
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
paging: true, // Enable pagination
|
paging: true, // Enable pagination
|
||||||
pageLength: 20, // Set default number of rows per page (optional)
|
pageLength: 20, // Set default number of rows per page (optional)
|
||||||
@ -161,14 +166,17 @@ $(document).ready(function() {
|
|||||||
// Global DataTables defaults
|
// Global DataTables defaults
|
||||||
$.extend(true, $.fn.dataTable.defaults, {
|
$.extend(true, $.fn.dataTable.defaults, {
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
</div>`,
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
searchPlaceholder: "Search"
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
|
|
||||||
paging: true,
|
paging: true,
|
||||||
pageLength: 10,
|
pageLength: 10,
|
||||||
ordering: false
|
ordering: false
|
||||||
|
|||||||
@ -94,6 +94,7 @@ table.dataTable tbody td {
|
|||||||
extend: 'excel',
|
extend: 'excel',
|
||||||
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
||||||
title: 'Insurer-Wise-Report-List',
|
title: 'Insurer-Wise-Report-List',
|
||||||
|
sheetName: 'Insurer-Wise-Report-List',
|
||||||
exportOptions: {
|
exportOptions: {
|
||||||
orthogonal: 'sort'
|
orthogonal: 'sort'
|
||||||
},
|
},
|
||||||
@ -104,12 +105,16 @@ table.dataTable tbody td {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
</div>`,
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
searchPlaceholder: "Search"
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
paging: true, // Enable pagination
|
paging: true, // Enable pagination
|
||||||
pageLength: 10, // Set default number of rows per page (optional)
|
pageLength: 10, // Set default number of rows per page (optional)
|
||||||
|
|||||||
@ -100,18 +100,23 @@ table.dataTable tbody td {
|
|||||||
},
|
},
|
||||||
className: 'app-btn-primary ',
|
className: 'app-btn-primary ',
|
||||||
title: 'Bap-Wise-Report-List',
|
title: 'Bap-Wise-Report-List',
|
||||||
|
sheetName: 'Bap-Wise-Report-List',
|
||||||
footer: true
|
footer: true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
</div>`,
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
searchPlaceholder: "Search"
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
paging: true, // Enable pagination
|
paging: true, // Enable pagination
|
||||||
pageLength: 10, // Set default number of rows per page (optional)
|
pageLength: 10, // Set default number of rows per page (optional)
|
||||||
|
|||||||
@ -123,18 +123,23 @@
|
|||||||
extend: 'excel',
|
extend: 'excel',
|
||||||
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
||||||
title: 'BDS TAT BAND WISE DATA',
|
title: 'BDS TAT BAND WISE DATA',
|
||||||
|
sheetName: 'BDS TAT BAND WISE DATA',
|
||||||
className: 'app-btn-primary ',
|
className: 'app-btn-primary ',
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
</div>`,
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
searchPlaceholder: "Search"
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
paging: true,
|
paging: true,
|
||||||
pageLength: 10,
|
pageLength: 10,
|
||||||
|
|||||||
@ -385,13 +385,16 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
</div>`,
|
</div>`,
|
||||||
searchPlaceholder: "Search",
|
searchPlaceholder: "Search",
|
||||||
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
paging: true,
|
paging: true,
|
||||||
pageLength: 10,
|
pageLength: 10,
|
||||||
|
|||||||
@ -243,6 +243,7 @@ table.dataTable thead th {
|
|||||||
{
|
{
|
||||||
extend: 'excel',
|
extend: 'excel',
|
||||||
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
||||||
|
sheetName: 'CD-Master-List',
|
||||||
exportOptions: {
|
exportOptions: {
|
||||||
orthogonal: 'sort'
|
orthogonal: 'sort'
|
||||||
},
|
},
|
||||||
@ -252,12 +253,16 @@ table.dataTable thead th {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
</div>`,
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
searchPlaceholder: "Search"
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
paging: true,
|
paging: true,
|
||||||
pageLength: 10,
|
pageLength: 10,
|
||||||
|
|||||||
@ -297,12 +297,16 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
</div>`,
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
searchPlaceholder: "Search"
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
paging: true, // Enable pagination
|
paging: true, // Enable pagination
|
||||||
pageLength: 15, // Set default number of rows per page (optional)
|
pageLength: 15, // Set default number of rows per page (optional)
|
||||||
|
|||||||
@ -94,17 +94,21 @@
|
|||||||
className: 'btn app-btn-secondary ',
|
className: 'btn app-btn-secondary ',
|
||||||
buttons: [
|
buttons: [
|
||||||
{ extend: 'csv', text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>', title: 'Insurer-Wise-Report-List', className: 'app-btn-primary ' },
|
{ extend: 'csv', text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>', title: 'Insurer-Wise-Report-List', className: 'app-btn-primary ' },
|
||||||
{ extend: 'excel', text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>', title: 'Insurer-Wise-Report-List', className: 'app-btn-primary ', exportOptions: { orthogonal: 'sort' } }
|
{ extend: 'excel', text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>', title: 'Insurer-Wise-Report-List', className: 'app-btn-primary ', sheetName: 'Insurer-Wise-Report-List', exportOptions: { orthogonal: 'sort' } }
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
</div>`,
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
searchPlaceholder: "Search"
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
paging: true,
|
paging: true,
|
||||||
pageLength: 10,
|
pageLength: 10,
|
||||||
|
|||||||
@ -92,17 +92,21 @@
|
|||||||
className: 'btn app-btn-secondary ',
|
className: 'btn app-btn-secondary ',
|
||||||
buttons: [
|
buttons: [
|
||||||
{ extend: 'csv', text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>', title: 'Insurer-Wise-Report-List',className: 'app-btn-primary ' },
|
{ extend: 'csv', text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>', title: 'Insurer-Wise-Report-List',className: 'app-btn-primary ' },
|
||||||
{ extend: 'excel', text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>', title: 'Insurer-Wise-Report-List',className: 'app-btn-primary ', exportOptions: { orthogonal: 'sort' } }
|
{ extend: 'excel', text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>', title: 'Insurer-Wise-Report-List',className: 'app-btn-primary ', sheetName: 'Insurer-Wise-Report-List', exportOptions: { orthogonal: 'sort' } }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
</div>`,
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
searchPlaceholder: "Search"
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
paging: true,
|
paging: true,
|
||||||
pageLength: 10,
|
pageLength: 10,
|
||||||
|
|||||||
@ -436,6 +436,7 @@ $("#branch_form").submit(function(event) {
|
|||||||
toastr.error(res.message, 'Error');
|
toastr.error(res.message, 'Error');
|
||||||
}else{
|
}else{
|
||||||
toastr.success(res.message, 'Success');
|
toastr.success(res.message, 'Success');
|
||||||
|
newBranchSavedPeaseCallTheHrAccessFormApi = true;
|
||||||
}
|
}
|
||||||
// var message = (branch_PrimaryKey === '') ?
|
// var message = (branch_PrimaryKey === '') ?
|
||||||
// 'Client Branch Created successfully' :
|
// 'Client Branch Created successfully' :
|
||||||
|
|||||||
@ -99,13 +99,17 @@ $(document).ready(function() {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
</div>`,
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
searchPlaceholder: "Search"
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
},
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
|
},
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -340,13 +340,16 @@ $(document).ready(function()
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
</div>`,
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
searchPlaceholder: "Search",
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
paging: true ,
|
paging: true ,
|
||||||
// pagingType: 'full_numbers'
|
// pagingType: 'full_numbers'
|
||||||
|
|||||||
@ -456,6 +456,7 @@
|
|||||||
<script>
|
<script>
|
||||||
let hrAccessControlHtmlAppended = false;
|
let hrAccessControlHtmlAppended = false;
|
||||||
let hrActivityHistoryHtmlAppended = false;
|
let hrActivityHistoryHtmlAppended = false;
|
||||||
|
let newBranchSavedPeaseCallTheHrAccessFormApi = false;
|
||||||
|
|
||||||
function client_kyc_docs() {
|
function client_kyc_docs() {
|
||||||
var check_client_id = $('#general_PrimaryKey');
|
var check_client_id = $('#general_PrimaryKey');
|
||||||
@ -566,6 +567,7 @@
|
|||||||
|
|
||||||
//HR Access Controll also know as "Client Access Control"
|
//HR Access Controll also know as "Client Access Control"
|
||||||
function appendHrAccessControllHtml(input) {
|
function appendHrAccessControllHtml(input) {
|
||||||
|
|
||||||
console.log(input.id);
|
console.log(input.id);
|
||||||
let client_id = $('#general_PrimaryKey').val();
|
let client_id = $('#general_PrimaryKey').val();
|
||||||
console.log('client_id ', client_id);
|
console.log('client_id ', client_id);
|
||||||
@ -575,7 +577,8 @@
|
|||||||
client_id: client_id
|
client_id: client_id
|
||||||
};
|
};
|
||||||
|
|
||||||
if (hrAccessControlHtmlAppended == false) {
|
console.log({hrActivityHistoryHtmlAppended, newBranchSavedPeaseCallTheHrAccessFormApi});
|
||||||
|
if (hrAccessControlHtmlAppended == false || newBranchSavedPeaseCallTheHrAccessFormApi == true) {
|
||||||
sendAjaxRequestForGlobal(url, 'GET', requestData, function(response) {
|
sendAjaxRequestForGlobal(url, 'GET', requestData, function(response) {
|
||||||
console.log('Data fetched successfully:', response);
|
console.log('Data fetched successfully:', response);
|
||||||
|
|
||||||
|
|||||||
@ -51,23 +51,24 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
width: 50px;
|
width: 50px;
|
||||||
height: 25px;
|
height: 25px;
|
||||||
background-color: #fff;
|
background-color: #cccccc;
|
||||||
border-radius: 25px;
|
border-radius: 25px;
|
||||||
box-shadow: 0 0 5px rgba(0,0,0,0.2);
|
box-shadow: 0 0 5px rgba(0,0,0,0.2);
|
||||||
transition: 0.3s;
|
transition: 0.3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.slider::before ,
|
/* Round knob (always white) */
|
||||||
|
.slider::before,
|
||||||
.slider_blue::before {
|
.slider_blue::before {
|
||||||
content: "";
|
content: "";
|
||||||
position: absolute;
|
position: absolute;
|
||||||
height: 19px;
|
height: 19px;
|
||||||
width: 19px;
|
width: 19px;
|
||||||
left: 3px;
|
left: 3px;
|
||||||
top: 3px;
|
top: 3px;
|
||||||
background-color: #ccc;
|
background-color: #fff; /* always white */
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
transition: 0.3s;
|
transition: 0.3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
input:checked + .slider {
|
input:checked + .slider {
|
||||||
|
|||||||
@ -354,24 +354,29 @@
|
|||||||
extend: 'csv',
|
extend: 'csv',
|
||||||
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
|
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
|
||||||
className: 'app-btn-primary ',
|
className: 'app-btn-primary ',
|
||||||
title: 'Member-List',
|
title: 'Members',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
extend: 'excel',
|
extend: 'excel',
|
||||||
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
||||||
className: 'app-btn-primary ',
|
className: 'app-btn-primary ',
|
||||||
title: 'Member-List',
|
title: 'Members',
|
||||||
|
sheetName: 'Members'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
</div>`,
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
searchPlaceholder: "Search"
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
paging: true, // Enable pagination
|
paging: true, // Enable pagination
|
||||||
pageLength: 25 // Set default number of rows per page (optional)
|
pageLength: 25 // Set default number of rows per page (optional)
|
||||||
|
|||||||
@ -548,14 +548,14 @@ function fetchFileError(file_id) {
|
|||||||
"<strong>Rule conflict: Twofold relationship found within family</strong> <span class='badge badge-danger float-right'>" +
|
"<strong>Rule conflict: Twofold relationship found within family</strong> <span class='badge badge-danger float-right'>" +
|
||||||
err_count + "</span>";
|
err_count + "</span>";
|
||||||
break;
|
break;
|
||||||
case 14:
|
case 100:
|
||||||
hasError14 = true;
|
hasError14 = true;
|
||||||
error_code = 14;
|
error_code = 14;
|
||||||
file_error_html +=
|
file_error_html +=
|
||||||
"<strong>This inception row was not found in the member data list.</strong> <span class='badge badge-danger float-right'>" +
|
"<strong>This inception row was not found in the member data list.</strong> <span class='badge badge-danger float-right'>" +
|
||||||
err_count + "</span>";
|
err_count + "</span>";
|
||||||
break;
|
break;
|
||||||
case 15:
|
case 101:
|
||||||
hasError15 = true;
|
hasError15 = true;
|
||||||
error_code = 15;
|
error_code = 15;
|
||||||
file_error_html +=
|
file_error_html +=
|
||||||
|
|||||||
@ -620,6 +620,7 @@
|
|||||||
orthogonal: 'sort'
|
orthogonal: 'sort'
|
||||||
},
|
},
|
||||||
className: 'app-btn-primary ',
|
className: 'app-btn-primary ',
|
||||||
|
sheetName: 'Endorsements'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -649,12 +650,16 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
</div>`,
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
searchPlaceholder: "Search"
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
paging: true,
|
paging: true,
|
||||||
// pagingType: 'full_numbers'
|
// pagingType: 'full_numbers'
|
||||||
|
|||||||
@ -485,12 +485,16 @@ $(document).ready(function() {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
</div>`,
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
searchPlaceholder: "Search"
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
// "buttons": [{
|
// "buttons": [{
|
||||||
// "extend": 'csv',
|
// "extend": 'csv',
|
||||||
|
|||||||
@ -385,12 +385,16 @@ $(document).ready(function () {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
</div>`,
|
</div>`,
|
||||||
searchPlaceholder: "Search"
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
paging: true,
|
paging: true,
|
||||||
pageLength: 10,
|
pageLength: 10,
|
||||||
|
|||||||
@ -60,7 +60,6 @@
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
<div class="container-fluid-min">
|
<div class="container-fluid-min">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
@ -135,14 +134,18 @@
|
|||||||
<?php foreach ($pre_policy_data as $key1 => $policies) {
|
<?php foreach ($pre_policy_data as $key1 => $policies) {
|
||||||
$statusText = $policies['policy_status'] == 1 ? 'Active' : 'In-Active';
|
$statusText = $policies['policy_status'] == 1 ? 'Active' : 'In-Active';
|
||||||
$statusClass = $policies['policy_status'] == 1 ? 'active' : 'inactive';
|
$statusClass = $policies['policy_status'] == 1 ? 'active' : 'inactive';
|
||||||
if (
|
// if (
|
||||||
in_array($policies['branch_id'].'-'.$policies['policy_no'], $listed_pre)
|
// in_array($policies['branch_id'].'-'.$policies['policy_no'], $listed_pre)
|
||||||
&&
|
// &&
|
||||||
$value['pre_branch_id'] != $policies['branch_id']
|
// $value['pre_branch_id'] != $policies['branch_id']
|
||||||
) {
|
// ) {
|
||||||
|
// continue;
|
||||||
|
// } else {
|
||||||
|
// $listed_pre[] = $policies['branch_id'].'-'.$policies['policy_no'];
|
||||||
|
// }
|
||||||
|
|
||||||
|
if(empty($value['pre_hr_id']) || $value['pre_branch_id'] !== $policies['branch_id']){
|
||||||
continue;
|
continue;
|
||||||
} else {
|
|
||||||
$listed_pre[] = $policies['branch_id'].'-'.$policies['policy_no'];
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div class="checkbox-item">
|
<div class="checkbox-item">
|
||||||
@ -196,17 +199,21 @@
|
|||||||
<?php foreach ($post_policy_data as $key2 => $policies) {
|
<?php foreach ($post_policy_data as $key2 => $policies) {
|
||||||
$statusText = $policies['policy_status'] == 1 ? 'Active' : 'In-Active';
|
$statusText = $policies['policy_status'] == 1 ? 'Active' : 'In-Active';
|
||||||
$statusClass = $policies['policy_status'] == 1 ? 'active' : 'inactive';
|
$statusClass = $policies['policy_status'] == 1 ? 'active' : 'inactive';
|
||||||
if(
|
// if(
|
||||||
in_array($policies['branch_id'].'-'.$policies['policy_no'] , $listed_post)
|
// in_array($policies['branch_id'].'-'.$policies['policy_no'] , $listed_post)
|
||||||
&&
|
// &&
|
||||||
$value['post_branch_id'] != $policies['branch_id']
|
// $value['post_branch_id'] != $policies['branch_id']
|
||||||
)
|
// )
|
||||||
{
|
// {
|
||||||
|
// continue;
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// $listed_post[] = $policies['branch_id'].'-'.$policies['policy_no'];
|
||||||
|
// }
|
||||||
|
|
||||||
|
if(empty($value['post_hr_id']) || $value['post_branch_id'] !== $policies['branch_id']){
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$listed_post[] = $policies['branch_id'].'-'.$policies['policy_no'];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -377,12 +377,16 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
</div>`,
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
searchPlaceholder: "Search"
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
paging: true,
|
paging: true,
|
||||||
});
|
});
|
||||||
|
|||||||
@ -211,12 +211,16 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
</div>`,
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
searchPlaceholder: "Search"
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
paging: true,
|
paging: true,
|
||||||
});
|
});
|
||||||
|
|||||||
@ -226,6 +226,7 @@ $(document).ready(function() {
|
|||||||
extend: 'excel',
|
extend: 'excel',
|
||||||
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
||||||
title: 'IRDA-BAP-CLIENT-List',
|
title: 'IRDA-BAP-CLIENT-List',
|
||||||
|
sheetName: 'IRDA-BAP-CLIENT-List',
|
||||||
exportOptions: {
|
exportOptions: {
|
||||||
orthogonal: 'sort'
|
orthogonal: 'sort'
|
||||||
},
|
},
|
||||||
@ -236,12 +237,16 @@ $(document).ready(function() {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
</div>`,
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
searchPlaceholder: "Search"
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
paging: true, // Enable pagination
|
paging: true, // Enable pagination
|
||||||
pageLength: 20, // Set default number of rows per page (optional)
|
pageLength: 20, // Set default number of rows per page (optional)
|
||||||
|
|||||||
@ -314,6 +314,7 @@ $(document).ready(function() {
|
|||||||
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
||||||
className: 'app-btn-primary ',
|
className: 'app-btn-primary ',
|
||||||
title: 'IRDA-BAP-INSURER-List',
|
title: 'IRDA-BAP-INSURER-List',
|
||||||
|
sheetName: 'IRDA-BAP-INSURER-List',
|
||||||
customize: function(xlsx) {
|
customize: function(xlsx) {
|
||||||
var sheet = xlsx.xl.worksheets['sheet1.xml'];
|
var sheet = xlsx.xl.worksheets['sheet1.xml'];
|
||||||
var total = 0;
|
var total = 0;
|
||||||
@ -360,12 +361,16 @@ $(document).ready(function() {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
</div>`,
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
searchPlaceholder: "Search"
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
paging: true, // Enable pagination
|
paging: true, // Enable pagination
|
||||||
pageLength: 20, // Set default number of rows per page (optional)
|
pageLength: 20, // Set default number of rows per page (optional)
|
||||||
|
|||||||
@ -147,6 +147,7 @@ $(document).ready(function() {
|
|||||||
extend: 'excel',
|
extend: 'excel',
|
||||||
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
||||||
title: 'IRDA-BAP-CLIENT-List',
|
title: 'IRDA-BAP-CLIENT-List',
|
||||||
|
sheetName: 'IRDA-BAP-CLIENT-List',
|
||||||
className: 'app-btn-primary ',
|
className: 'app-btn-primary ',
|
||||||
customize: function(xlsx) {
|
customize: function(xlsx) {
|
||||||
var sheet = xlsx.xl.worksheets['sheet1.xml'];
|
var sheet = xlsx.xl.worksheets['sheet1.xml'];
|
||||||
@ -194,12 +195,16 @@ $(document).ready(function() {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
</div>`,
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
searchPlaceholder: "Search"
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
paging: true, // Enable pagination
|
paging: true, // Enable pagination
|
||||||
pageLength: 10, // Set default number of rows per page (optional)
|
pageLength: 10, // Set default number of rows per page (optional)
|
||||||
|
|||||||
@ -207,12 +207,16 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
</div>`,
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
searchPlaceholder: "Search"
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
paging: true ,
|
paging: true ,
|
||||||
});
|
});
|
||||||
|
|||||||
@ -1210,6 +1210,30 @@ $(function(){
|
|||||||
$(object).select2();
|
$(object).select2();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SVR asked - Add padding to input so text doesn’t merge with icon
|
||||||
|
$(document).on('init.dt', function () {
|
||||||
|
$('.dataTables_filter input[type="search"]').css('padding-right', '30px');
|
||||||
|
});
|
||||||
|
|
||||||
|
// SVR asked - Toggle icons
|
||||||
|
$(document).on('input', '.dataTables_filter input', function() {
|
||||||
|
const wrapper = $(this).closest('.datatable-search-wrapper');
|
||||||
|
if ($(this).val()) {
|
||||||
|
wrapper.find('.datatable-search-icon').hide();
|
||||||
|
wrapper.find('.datatable-clear-icon').show();
|
||||||
|
} else {
|
||||||
|
wrapper.find('.datatable-search-icon').show();
|
||||||
|
wrapper.find('.datatable-clear-icon').hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// SVR asked - Clear search
|
||||||
|
$(document).on('click', '.datatable-clear-icon', function() {
|
||||||
|
const input = $(this).closest('.datatable-search-wrapper').find('input');
|
||||||
|
input.val('').trigger('input');
|
||||||
|
table.search('').draw();
|
||||||
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1660,6 +1660,12 @@
|
|||||||
.right-btn {
|
.right-btn {
|
||||||
right: 0;
|
right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input[type="search"]::-webkit-search-cancel-button {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
appearance: none;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
@ -2011,6 +2017,12 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
<li>
|
||||||
|
<a href="<?= base_url('/payouts') ?>">
|
||||||
|
<i class="ri-book-open-line"></i>
|
||||||
|
<span> Payouts</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@ -487,12 +487,16 @@ table.dataTable tbody td {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
</div>`,
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
searchPlaceholder: "Search"
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
paging: true, // Enable pagination
|
paging: true, // Enable pagination
|
||||||
pageLength: 10, // Set default number of rows per page (optional)
|
pageLength: 10, // Set default number of rows per page (optional)
|
||||||
|
|||||||
@ -124,11 +124,15 @@
|
|||||||
],
|
],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
</div>`,
|
</div>`,
|
||||||
searchPlaceholder: "Search"
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
paging: true, // Enable pagination
|
paging: true, // Enable pagination
|
||||||
pageLength: 10, // Set default number of rows per page (optional)
|
pageLength: 10, // Set default number of rows per page (optional)
|
||||||
|
|||||||
@ -215,6 +215,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
window.scrollTo({ top: 0, behavior: 'smooth' });
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
$('.loader').fadeOut();
|
$('.loader').fadeOut();
|
||||||
$('.loader-mask').delay(350).fadeOut('slow');
|
$('.loader-mask').delay(350).fadeOut('slow');
|
||||||
@ -749,8 +750,8 @@
|
|||||||
<input style="width: 128%;" value="${data ? data : ''}" type="text" name="multiple_sum_insured[]" class="form-control multiple_sum_insured" onkeypress="return onlyNumbers(event)" onkeyup="formatNumber(this); numtowordinkeyup(this)">
|
<input style="width: 128%;" value="${data ? data : ''}" type="text" name="multiple_sum_insured[]" class="form-control multiple_sum_insured" onkeypress="return onlyNumbers(event)" onkeyup="formatNumber(this); numtowordinkeyup(this)">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2" style="position: relative;left: 88px;">
|
<div class="col-md-2" style="position: relative;left: 88px;">
|
||||||
<button type="button" class="btn btn-danger si-remove-multi" onclick="removeGMCAdditionalSI(this)">x</button>
|
|
||||||
<button type="button" class="btn btn-primary si-add-more" onclick="appendOtherSIAddMore()">+</button>
|
<button type="button" class="btn btn-primary si-add-more" onclick="appendOtherSIAddMore()">+</button>
|
||||||
|
<button type="button" class="btn btn-danger si-remove-multi" onclick="removeGMCAdditionalSI(this)">x</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -194,6 +194,7 @@
|
|||||||
extend: 'excel',
|
extend: 'excel',
|
||||||
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
||||||
title: 'Outstanding Report',
|
title: 'Outstanding Report',
|
||||||
|
sheetName: 'Outstanding Report',
|
||||||
customize: function(xlsx) {
|
customize: function(xlsx) {
|
||||||
var sheet = xlsx.xl.worksheets['sheet1.xml'];
|
var sheet = xlsx.xl.worksheets['sheet1.xml'];
|
||||||
var total = 0;
|
var total = 0;
|
||||||
@ -225,12 +226,16 @@
|
|||||||
]
|
]
|
||||||
}],
|
}],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
</div>`,
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
searchPlaceholder: "Search"
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
paging: true, // Enable pagination
|
paging: true, // Enable pagination
|
||||||
pageLength: 25 // Set default number of rows per page (optional)
|
pageLength: 25 // Set default number of rows per page (optional)
|
||||||
|
|||||||
@ -1052,6 +1052,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
window.scrollTo({ top: 0, behavior: 'smooth' });
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
|
|
||||||
$('.loader').fadeOut();
|
$('.loader').fadeOut();
|
||||||
@ -1761,15 +1762,14 @@
|
|||||||
value="${data == null || data == undefined || data == "" ? '' : data}" type="text" name="multiple_sum_insured[]"
|
value="${data == null || data == undefined || data == "" ? '' : data}" type="text" name="multiple_sum_insured[]"
|
||||||
class="form-control multiple_sum_insured mr-2" onkeypress="return onlyNumbers(event)"
|
class="form-control multiple_sum_insured mr-2" onkeypress="return onlyNumbers(event)"
|
||||||
onkeyup="formatNumber(this); numtowordinkeyup(this)">
|
onkeyup="formatNumber(this); numtowordinkeyup(this)">
|
||||||
|
<button type="button" class="btn btn-primary si-add-more mr-2" onclick="appendGMCSIAddMore()"
|
||||||
|
style="background-color: #e26728; border:1px solid #e26728;">
|
||||||
|
<i class="mdi mdi-plus"></i>
|
||||||
|
</button>
|
||||||
<button type="button" class="btn btn-danger si-remove-multi mr-2" onclick="removeGMCAdditionalSI(this)"
|
<button type="button" class="btn btn-danger si-remove-multi mr-2" onclick="removeGMCAdditionalSI(this)"
|
||||||
style="background-color: #BD0707;border:1px solid #BD0707">
|
style="background-color: #BD0707;border:1px solid #BD0707">
|
||||||
<i class="mdi mdi-delete"></i>
|
<i class="mdi mdi-delete"></i>
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn btn-primary si-add-more mr-2" onclick="appendGMCSIAddMore()"
|
|
||||||
style="background-color: #e26728; border:1px solid #e26728;"
|
|
||||||
>
|
|
||||||
<i class="mdi mdi-plus"></i>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<div id='numberToWordSumInsured' class="text-danger-2 mr-2"></div>
|
<div id='numberToWordSumInsured' class="text-danger-2 mr-2"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -499,6 +499,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
window.scrollTo({ top: 0, behavior: 'smooth' });
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
|
|
||||||
$('.loader').fadeOut();
|
$('.loader').fadeOut();
|
||||||
@ -927,14 +928,14 @@
|
|||||||
style="max-width:200px;"
|
style="max-width:200px;"
|
||||||
value="${data == null || data == undefined || data == "" ? '' : data}" type="text" name="multiple_sum_insured[]"
|
value="${data == null || data == undefined || data == "" ? '' : data}" type="text" name="multiple_sum_insured[]"
|
||||||
class="form-control multiple_sum_insured mr-2" onkeypress="return onlyNumbers(event)" onkeyup="formatNumber(this); numtowordinkeyup(this)">
|
class="form-control multiple_sum_insured mr-2" onkeypress="return onlyNumbers(event)" onkeyup="formatNumber(this); numtowordinkeyup(this)">
|
||||||
<button type="button" class="btn btn-danger si-remove-multi mr-2" onclick="removeGMCAdditionalSI(this)"
|
|
||||||
style="background-color: #BD0707;border:1px solid #BD0707">
|
|
||||||
<i class="mdi mdi-delete"></i>
|
|
||||||
</button>
|
|
||||||
<button type="button" class="btn btn-primary si-add-more mr-2" onclick="appendGPASIAddMore()"
|
<button type="button" class="btn btn-primary si-add-more mr-2" onclick="appendGPASIAddMore()"
|
||||||
style="background-color: #e26728; border:1px solid #e26728;" >
|
style="background-color: #e26728; border:1px solid #e26728;" >
|
||||||
<i class="mdi mdi-plus"></i>
|
<i class="mdi mdi-plus"></i>
|
||||||
</button>
|
</button>
|
||||||
|
<button type="button" class="btn btn-danger si-remove-multi mr-2" onclick="removeGMCAdditionalSI(this)"
|
||||||
|
style="background-color: #BD0707;border:1px solid #BD0707">
|
||||||
|
<i class="mdi mdi-delete"></i>
|
||||||
|
</button>
|
||||||
<div id='numberToWordSumInsured' class="text-danger-2 "></div>
|
<div id='numberToWordSumInsured' class="text-danger-2 "></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -458,7 +458,7 @@
|
|||||||
|
|
||||||
<?php if (in_array(get_role_id(), [1,5]) || in_array(MANAGEMENT_TEAM_ID, user_team()) || in_array(FINANCE_TEAM_ID, user_team())) { ?>
|
<?php if (in_array(get_role_id(), [1,5]) || in_array(MANAGEMENT_TEAM_ID, user_team()) || in_array(FINANCE_TEAM_ID, user_team())) { ?>
|
||||||
|
|
||||||
<tr id="table_tr_17" <?= in_array(FINANCE_TEAM_ID, user_team()) ? 'style="display:none"' : '' ?>>
|
<tr id="table_tr_17">
|
||||||
<td>Agreed Amount</td>
|
<td>Agreed Amount</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@ -1346,6 +1346,41 @@
|
|||||||
// $('#co_premium_' + input).val(cop.toFixed(2));
|
// $('#co_premium_' + input).val(cop.toFixed(2));
|
||||||
// $('#co_tp_premium_' + input).val(cotp.toFixed(2));
|
// $('#co_tp_premium_' + input).val(cotp.toFixed(2));
|
||||||
// $('#co_ter_premium_' + input).val(cotep.toFixed(2));
|
// $('#co_ter_premium_' + input).val(cotep.toFixed(2));
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Apply Deletion (Negative) Values
|
||||||
|
// function applyDeletionSymbolsToFields(input, isDeletion) {
|
||||||
|
// console.log('========== APPLYING DELETION SYMBOLS ==========');
|
||||||
|
|
||||||
|
// if (!isDeletion) return;
|
||||||
|
|
||||||
|
// const fieldIds = [
|
||||||
|
// 'base_premium',
|
||||||
|
// 'tp_premium',
|
||||||
|
// 'ter_premium',
|
||||||
|
// 'co_premium',
|
||||||
|
// 'co_tp_premium',
|
||||||
|
// 'co_ter_premium',
|
||||||
|
// 'gst_amount',
|
||||||
|
// 'agreed_amount',
|
||||||
|
// 'non_comm_per_amt',
|
||||||
|
// 'total_amt',
|
||||||
|
// 'exp_amt'
|
||||||
|
// ];
|
||||||
|
|
||||||
|
// fieldIds.forEach(field => {
|
||||||
|
// const $el = $('#' + field + '_' + input);
|
||||||
|
// console.log('$el', '#' + field + '_' + input);
|
||||||
|
// console.log('$el', $el);
|
||||||
|
// let val = $el.val()?.trim();
|
||||||
|
// console.log('$val', val);
|
||||||
|
// if (!val || val.startsWith('-')) return;
|
||||||
|
|
||||||
|
// let num = parseFloat(val);
|
||||||
|
// if (!isNaN(num) && num > 0) $el.val(-num);
|
||||||
|
// });
|
||||||
|
|
||||||
|
// console.log('========== COMPLETED DELETION SYMBOL APPLICATION ==========');
|
||||||
// }
|
// }
|
||||||
|
|
||||||
function checkAndDistributeTax(input){
|
function checkAndDistributeTax(input){
|
||||||
@ -1432,9 +1467,9 @@
|
|||||||
let bap = selectedOption.data('bap') || '';
|
let bap = selectedOption.data('bap') || '';
|
||||||
let allocg = selectedOption.data('allocg') || '';
|
let allocg = selectedOption.data('allocg') || '';
|
||||||
let endorsement_type = $('#action_type').val();
|
let endorsement_type = $('#action_type').val();
|
||||||
let isDeletion = endorsement_type === "deletion";
|
let isDeletion = false;
|
||||||
|
// let isDeletion = endorsement_type === "deletion" || endorsement_type === "policy_cancellation";
|
||||||
console.log("bap:", bap, "allocg:", allocg, "isDeletion:", isDeletion);
|
console.log({bap, allocg, isDeletion});
|
||||||
|
|
||||||
const event = window.event || {};
|
const event = window.event || {};
|
||||||
|
|
||||||
@ -1458,7 +1493,20 @@
|
|||||||
let cotp = (allocg !== 'EB') ? absNum('co_tp_premium') : 0;
|
let cotp = (allocg !== 'EB') ? absNum('co_tp_premium') : 0;
|
||||||
let cotep = (['Fire', 'Marine Cargo', 'Marine Hull'].includes(bap)) ? absNum('co_ter_premium') : 0;
|
let cotep = (['Fire', 'Marine Cargo', 'Marine Hull'].includes(bap)) ? absNum('co_ter_premium') : 0;
|
||||||
|
|
||||||
console.log({ bp, tp, tep, cop, cotp, cotep, ncpa });
|
console.log('premiums :', { bp, tp, tep, cop, cotp, cotep, ncpa });
|
||||||
|
|
||||||
|
let bp_raw_val = parseFloat($('#base_premium_' + input).val());
|
||||||
|
console.log('bp_raw_val', bp_raw_val);
|
||||||
|
|
||||||
|
// handel the positive(+), negative(-) symbole add the value
|
||||||
|
if(endorsement_type === "addition" || endorsement_type === "baby_addition" || endorsement_type === "addition_inception"){
|
||||||
|
isDeletion = false
|
||||||
|
}else if(endorsement_type === "deletion" || endorsement_type === "policy_cancellation"){
|
||||||
|
isDeletion = true
|
||||||
|
}else if(bp_raw_val < 0){
|
||||||
|
isDeletion = true;
|
||||||
|
console.log('Value is negative:', bp_raw_val);
|
||||||
|
}
|
||||||
|
|
||||||
let co_share_type_val = numVal('co_share_type');
|
let co_share_type_val = numVal('co_share_type');
|
||||||
console.log('co_share_type_val :', co_share_type_val);
|
console.log('co_share_type_val :', co_share_type_val);
|
||||||
@ -1532,18 +1580,17 @@
|
|||||||
setCoPremiums(input);
|
setCoPremiums(input);
|
||||||
|
|
||||||
// ✅ Apply deletion symbols last (safely);
|
// ✅ Apply deletion symbols last (safely);
|
||||||
if (isDeletion) {
|
// if (isDeletion) {
|
||||||
applyDeletionSymbolsToFields(input, true);
|
applyDeletionSymbolsToFields(input, isDeletion);
|
||||||
}
|
// }
|
||||||
|
|
||||||
console.log('############################## END AMOUNT CALCULATION ############################################');
|
console.log('############################## END AMOUNT CALCULATION ############################################');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apply Deletion (Negative) Values
|
// Apply Deletion (Negative) Values
|
||||||
function applyDeletionSymbolsToFields(input, isDeletion) {
|
function applyDeletionSymbolsToFields(input, isDeletion) {
|
||||||
console.log('========== APPLYING DELETION SYMBOLS ==========');
|
|
||||||
|
|
||||||
if (!isDeletion) return;
|
console.log('========== APPLYING DELETION SYMBOLS ==========');
|
||||||
|
|
||||||
const fieldIds = [
|
const fieldIds = [
|
||||||
'base_premium',
|
'base_premium',
|
||||||
@ -1561,14 +1608,20 @@
|
|||||||
|
|
||||||
fieldIds.forEach(field => {
|
fieldIds.forEach(field => {
|
||||||
const $el = $('#' + field + '_' + input);
|
const $el = $('#' + field + '_' + input);
|
||||||
console.log('$el', '#' + field + '_' + input);
|
|
||||||
console.log('$el', $el);
|
|
||||||
let val = $el.val()?.trim();
|
let val = $el.val()?.trim();
|
||||||
console.log('$val', val);
|
if (!val) return;
|
||||||
if (!val || val.startsWith('-')) return;
|
|
||||||
|
|
||||||
let num = parseFloat(val);
|
let num = parseFloat(val.replace(/^-/, '')); // remove any existing minus first
|
||||||
if (!isNaN(num) && num > 0) $el.val(-num);
|
console.log('num', num);
|
||||||
|
if (isNaN(num)) return;
|
||||||
|
|
||||||
|
if (isDeletion) {
|
||||||
|
// Apply minus sign
|
||||||
|
if (num > 0) $el.val(-num);
|
||||||
|
} else {
|
||||||
|
// Remove minus sign
|
||||||
|
$el.val(num);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log('========== COMPLETED DELETION SYMBOL APPLICATION ==========');
|
console.log('========== COMPLETED DELETION SYMBOL APPLICATION ==========');
|
||||||
|
|||||||
@ -519,12 +519,16 @@ table.dataTable thead th {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
</div>`,
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
searchPlaceholder: "Search"
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
paging: true, // Enable pagination
|
paging: true, // Enable pagination
|
||||||
pageLength: 10, // Set default number of rows per page (optional)
|
pageLength: 10, // Set default number of rows per page (optional)
|
||||||
|
|||||||
@ -883,7 +883,7 @@
|
|||||||
|
|
||||||
<?php if (in_array(get_role_id(), [1,5]) || in_array(MANAGEMENT_TEAM_ID, user_team()) || in_array(FINANCE_TEAM_ID, user_team())) { ?>
|
<?php if (in_array(get_role_id(), [1,5]) || in_array(MANAGEMENT_TEAM_ID, user_team()) || in_array(FINANCE_TEAM_ID, user_team())) { ?>
|
||||||
|
|
||||||
<tr id="table_tr_17" <?= in_array(FINANCE_TEAM_ID, user_team()) ? 'style="display:none"' : '' ?>>
|
<tr id="table_tr_17">
|
||||||
<td>Agreed Amount</td>
|
<td>Agreed Amount</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|||||||
@ -591,12 +591,16 @@ $(document).ready(function() {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
</div>`,
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
searchPlaceholder: "Search"
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
paging: true, // Enable pagination
|
paging: true, // Enable pagination
|
||||||
pageLength: 10, // Set default number of rows per page (optional)
|
pageLength: 10, // Set default number of rows per page (optional)
|
||||||
|
|||||||
0
app/Views/policy_transaction_payouts.php
Normal file
0
app/Views/policy_transaction_payouts.php
Normal file
@ -250,12 +250,16 @@
|
|||||||
],
|
],
|
||||||
|
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
</div>`,
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
searchPlaceholder: "Search"
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
paging: true ,
|
paging: true ,
|
||||||
|
|
||||||
|
|||||||
@ -103,8 +103,8 @@ table.dataTable tbody td {
|
|||||||
<th style="display: none;">Premium <br> (without GST)</th>
|
<th style="display: none;">Premium <br> (without GST)</th>
|
||||||
<!-- <th style="display: none;">GST @ 18%</th> -->
|
<!-- <th style="display: none;">GST @ 18%</th> -->
|
||||||
<th>Total Premium</th>
|
<th>Total Premium</th>
|
||||||
<th>BP %</th>
|
<th>BP%</th>
|
||||||
<th>TP/Ter %</th>
|
<th>TP/Ter%</th>
|
||||||
<th style="display: none;">Rewards</th>
|
<th style="display: none;">Rewards</th>
|
||||||
<th>Agreed Amount</th>
|
<th>Agreed Amount</th>
|
||||||
<th>Invoiced Amount</th>
|
<th>Invoiced Amount</th>
|
||||||
@ -147,8 +147,8 @@ table.dataTable tbody td {
|
|||||||
<td class="right-align-input" style="display: none;"><?php echo $row['premium_wo_gst']; ?></td>
|
<td class="right-align-input" style="display: none;"><?php echo $row['premium_wo_gst']; ?></td>
|
||||||
<!-- <td class="right-align-input" style="display: none;"><?php echo $row['gst_amount']; ?></td> -->
|
<!-- <td class="right-align-input" style="display: none;"><?php echo $row['gst_amount']; ?></td> -->
|
||||||
<td class="right-align-input"><?php echo $row['total_premium'] ?: '0.00'; ?></td>
|
<td class="right-align-input"><?php echo $row['total_premium'] ?: '0.00'; ?></td>
|
||||||
<td class="right-align-input"><?php echo $row['agreed_bp_per'] ?: '0.00'; ?> %</td>
|
<td class="right-align-input"><?php echo $row['agreed_bp_per'] ?: '0.00'; ?>%</td>
|
||||||
<td class="right-align-input"><?php echo $row['agreed_tp_or_ter_per'] ?: '0.00';?> %</td>
|
<td class="right-align-input"><?php echo $row['agreed_tp_or_ter_per'] ?: '0.00';?>%</td>
|
||||||
<td class="right-align-input" style="display: none;"><?php echo isset($row['reward']) ? $row['reward'] : '0.00'; ?></td>
|
<td class="right-align-input" style="display: none;"><?php echo isset($row['reward']) ? $row['reward'] : '0.00'; ?></td>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
@ -161,8 +161,10 @@ table.dataTable tbody td {
|
|||||||
// Date : 6/11/25 12:50
|
// Date : 6/11/25 12:50
|
||||||
$irda_amt = isset($row['total_irda_amt']) && $row['total_irda_amt'] !== '' ? (float)$row['total_irda_amt'] : 0;
|
$irda_amt = isset($row['total_irda_amt']) && $row['total_irda_amt'] !== '' ? (float)$row['total_irda_amt'] : 0;
|
||||||
$exp_amt = isset($row['exp_amt']) && $row['exp_amt'] !== '' ? (float)$row['exp_amt'] : 0;
|
$exp_amt = isset($row['exp_amt']) && $row['exp_amt'] !== '' ? (float)$row['exp_amt'] : 0;
|
||||||
$max_amount = max($irda_amt, $exp_amt);
|
// $max_amount = max($irda_amt, $exp_amt);
|
||||||
$total_irda_amt = number_format($max_amount, 2, '.', ''); ?>
|
// $total_irda_amt = number_format($max_amount, 2, '.', '');
|
||||||
|
$total_irda_amt = empty($row['total_irda_amt']) ? $row['exp_amt'] : $row['total_irda_amt'];
|
||||||
|
?>
|
||||||
<td class="right-align-input" onclick="showCoShareStatementDetails(this)" data-id="<?= $row['pt_id'] ?>"><?php echo $total_irda_amt; ?></td>
|
<td class="right-align-input" onclick="showCoShareStatementDetails(this)" data-id="<?= $row['pt_id'] ?>"><?php echo $total_irda_amt; ?></td>
|
||||||
<td class="right-align-input"><?php echo empty($row['billed_amt']) ? '0.00' : $row['billed_amt'] ?></td>
|
<td class="right-align-input"><?php echo empty($row['billed_amt']) ? '0.00' : $row['billed_amt'] ?></td>
|
||||||
<!-- <td class="right-align-input"><?php echo empty($row['unbilled_amt']) ? '0.00' : $row['unbilled_amt']?></td> -->
|
<!-- <td class="right-align-input"><?php echo empty($row['unbilled_amt']) ? '0.00' : $row['unbilled_amt']?></td> -->
|
||||||
@ -340,6 +342,7 @@ $(document).ready(function() {
|
|||||||
{
|
{
|
||||||
extend: 'excel',
|
extend: 'excel',
|
||||||
title: 'Policy-Tranction-BDS-List',
|
title: 'Policy-Tranction-BDS-List',
|
||||||
|
sheetName: 'Policy-Tranction-BDS-List',
|
||||||
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
||||||
className: 'app-btn-primary ',
|
className: 'app-btn-primary ',
|
||||||
// customize: function (xlsx) {
|
// customize: function (xlsx) {
|
||||||
@ -453,12 +456,16 @@ $(document).ready(function() {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
</div>`,
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
searchPlaceholder: "Search"
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
paging: true, // Enable pagination
|
paging: true, // Enable pagination
|
||||||
pageLength: 10, // Set default number of rows per page (optional)
|
pageLength: 10, // Set default number of rows per page (optional)
|
||||||
|
|||||||
@ -385,6 +385,7 @@
|
|||||||
{
|
{
|
||||||
extend: 'excel',
|
extend: 'excel',
|
||||||
title: 'Policy-Tranction-BDS-List',
|
title: 'Policy-Tranction-BDS-List',
|
||||||
|
sheetName: 'Policy-Tranction-BDS-List',
|
||||||
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
||||||
className: 'app-btn-primary ',
|
className: 'app-btn-primary ',
|
||||||
// customize: function (xlsx) {
|
// customize: function (xlsx) {
|
||||||
@ -499,12 +500,16 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
</div>`,
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
searchPlaceholder: "Search"
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
paging: true, // Enable pagination
|
paging: true, // Enable pagination
|
||||||
pageLength: 10, // Set default number of rows per page (optional)
|
pageLength: 10, // Set default number of rows per page (optional)
|
||||||
|
|||||||
@ -189,8 +189,16 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
],
|
],
|
||||||
language: {
|
language: {
|
||||||
search: "_INPUT_",
|
search: `
|
||||||
searchPlaceholder: "Search..."
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
|
_INPUT_
|
||||||
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
paging: true, // Enable pagination
|
paging: true, // Enable pagination
|
||||||
pageLength: 10, // Set default number of rows per page (optional)
|
pageLength: 10, // Set default number of rows per page (optional)
|
||||||
|
|||||||
@ -391,12 +391,16 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
</div>`,
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
searchPlaceholder: "Search"
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
paging: true,
|
paging: true,
|
||||||
// pagingType: 'full_numbers'
|
// pagingType: 'full_numbers'
|
||||||
|
|||||||
@ -147,11 +147,15 @@
|
|||||||
],
|
],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
</div>`,
|
</div>`,
|
||||||
searchPlaceholder: "Search"
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
paging: true, // Enable pagination
|
paging: true, // Enable pagination
|
||||||
pageLength: 10, // Set default number of rows per page (optional)
|
pageLength: 10, // Set default number of rows per page (optional)
|
||||||
|
|||||||
@ -128,17 +128,22 @@
|
|||||||
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
||||||
className: 'app-btn-primary ',
|
className: 'app-btn-primary ',
|
||||||
title: 'TAT BAND WISE DATA',
|
title: 'TAT BAND WISE DATA',
|
||||||
|
sheetName: 'TAT BAND WISE DATA',
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
</div>`,
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
searchPlaceholder: "Search"
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
paging: true, // Enable pagination
|
paging: true, // Enable pagination
|
||||||
pageLength: 10, // Set default number of rows per page (optional)
|
pageLength: 10, // Set default number of rows per page (optional)
|
||||||
|
|||||||
@ -557,12 +557,16 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
className:"unmapEmployees"
|
className:"unmapEmployees"
|
||||||
}],
|
}],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
</div>`,
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
searchPlaceholder: "Search"
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
paging: true, // Enable pagination
|
paging: true, // Enable pagination
|
||||||
pageLength: 25 // Set default number of rows per page (optional)
|
pageLength: 25 // Set default number of rows per page (optional)
|
||||||
|
|||||||
@ -350,17 +350,22 @@ table.dataTable tbody td {
|
|||||||
},
|
},
|
||||||
className: 'app-btn-primary ',
|
className: 'app-btn-primary ',
|
||||||
title: 'Tickets'
|
title: 'Tickets'
|
||||||
|
sheetName: 'Tickets',
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
</div>`,
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
searchPlaceholder: "Search"
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
paging: true,
|
paging: true,
|
||||||
pageLength: 10,
|
pageLength: 10,
|
||||||
|
|||||||
@ -131,19 +131,24 @@ $(document).ready(function() {
|
|||||||
orthogonal: 'sort'
|
orthogonal: 'sort'
|
||||||
},
|
},
|
||||||
title: 'claim-List',
|
title: 'claim-List',
|
||||||
|
sheetName: 'claim-List',
|
||||||
className: 'app-btn-primary ',
|
className: 'app-btn-primary ',
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
</div>`,
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
searchPlaceholder: "Search"
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
},
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
|
},
|
||||||
paging: true, // Enable pagination
|
paging: true, // Enable pagination
|
||||||
pageLength: 10, // Set default number of rows per page (optional)
|
pageLength: 10, // Set default number of rows per page (optional)
|
||||||
ordering: false,
|
ordering: false,
|
||||||
|
|||||||
@ -948,16 +948,21 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
function getClientPolicy() {
|
function getClientPolicy() {
|
||||||
|
|
||||||
console.log("get policy function called");
|
console.log("get policy function called");
|
||||||
hiddenData = $("#empIDHidden").val();
|
hiddenData = $("#empIDHidden").val();
|
||||||
hiddenData = JSON.parse(hiddenData);
|
hiddenData = JSON.parse(hiddenData);
|
||||||
console.log('employee id ', hiddenData['emp_id']);
|
console.log('employee id ', hiddenData['emp_id']);
|
||||||
let ticket_type_id = $('#ticket_type_id').val();
|
let ticket_type_id = $('#ticket_type_id').val();
|
||||||
console.log("ticket_type_id", ticket_type_id);
|
let client_id = $('#mobile_emp_client_data_list').val();
|
||||||
|
console.log({ticket_type_id, client_id});
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
emp_id: hiddenData['emp_id'],
|
emp_id: hiddenData['emp_id'],
|
||||||
ticket_type_id: ticket_type_id,
|
ticket_type_id: ticket_type_id,
|
||||||
|
client_id: client_id,
|
||||||
}
|
}
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '<?= base_url("/ticket/getPoliciesbyEmpID") ?>',
|
url: '<?= base_url("/ticket/getPoliciesbyEmpID") ?>',
|
||||||
type: "POST",
|
type: "POST",
|
||||||
|
|||||||
@ -60,13 +60,17 @@ if (ticketsTable.length) {
|
|||||||
|
|
||||||
// ],
|
// ],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
</div>`,
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
searchPlaceholder: "Search"
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
},
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
|
},
|
||||||
paging: true, // Enable pagination
|
paging: true, // Enable pagination
|
||||||
pageLength: 10, // Set default number of rows per page (optional)
|
pageLength: 10, // Set default number of rows per page (optional)
|
||||||
ordering: false,
|
ordering: false,
|
||||||
|
|||||||
@ -315,6 +315,7 @@ $(document).ready(function() {
|
|||||||
extend: 'excel',
|
extend: 'excel',
|
||||||
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
||||||
title: 'claim-List',
|
title: 'claim-List',
|
||||||
|
sheetName: 'claim-List',
|
||||||
exportOptions: {
|
exportOptions: {
|
||||||
orthogonal: 'sort'
|
orthogonal: 'sort'
|
||||||
},
|
},
|
||||||
@ -324,12 +325,16 @@ $(document).ready(function() {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
</div>`,
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
searchPlaceholder: "Search"
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
paging: true, // Enable pagination
|
paging: true, // Enable pagination
|
||||||
pageLength: 10, // Set default number of rows per page (optional)
|
pageLength: 10, // Set default number of rows per page (optional)
|
||||||
|
|||||||
@ -265,12 +265,16 @@
|
|||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
</div>`,
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
searchPlaceholder: "Search"
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
paging: true, // Enable pagination
|
paging: true, // Enable pagination
|
||||||
pageLength: 10, // Set default number of rows per page (optional)
|
pageLength: 10, // Set default number of rows per page (optional)
|
||||||
|
|||||||
@ -208,13 +208,17 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
</div>`,
|
</div>`,
|
||||||
searchPlaceholder: "Search"
|
searchPlaceholder: "Search",
|
||||||
},
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
|
},
|
||||||
paging: true,
|
paging: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -236,7 +236,8 @@
|
|||||||
{
|
{
|
||||||
extend: 'excel',
|
extend: 'excel',
|
||||||
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
||||||
title: 'Variance-Report-List',
|
title: 'Variance-Report-List',
|
||||||
|
sheetName: 'Variance-Report-List', // Sheet name
|
||||||
customize: function(xlsx) {
|
customize: function(xlsx) {
|
||||||
var sheet = xlsx.xl.worksheets['sheet1.xml'];
|
var sheet = xlsx.xl.worksheets['sheet1.xml'];
|
||||||
var total = 0;
|
var total = 0;
|
||||||
@ -267,13 +268,17 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}],
|
}],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
</div>`,
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
searchPlaceholder: "Search"
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
paging: true, // Enable pagination
|
paging: true, // Enable pagination
|
||||||
pageLength: 25 // Set default number of rows per page (optional)
|
pageLength: 25 // Set default number of rows per page (optional)
|
||||||
|
|||||||
@ -499,6 +499,7 @@ $(document).ready(function() {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
extend: 'excel',
|
extend: 'excel',
|
||||||
|
sheetName: 'Vehicle-Master',
|
||||||
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
||||||
exportOptions: {
|
exportOptions: {
|
||||||
orthogonal: 'sort'
|
orthogonal: 'sort'
|
||||||
@ -509,13 +510,17 @@ $(document).ready(function() {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
</div>`,
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
searchPlaceholder: "Search"
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
},
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
|
},
|
||||||
paging: true,
|
paging: true,
|
||||||
pageLength: 10,
|
pageLength: 10,
|
||||||
order: [[0, 'desc']]
|
order: [[0, 'desc']]
|
||||||
|
|||||||
@ -845,6 +845,7 @@
|
|||||||
text: '<i class="mdi mdi-file-excel"></i><span class="btn-custom"> EXCEL </span>',
|
text: '<i class="mdi mdi-file-excel"></i><span class="btn-custom"> EXCEL </span>',
|
||||||
exportOptions: { orthogonal: 'sort' },
|
exportOptions: { orthogonal: 'sort' },
|
||||||
className: 'app-btn-primary',
|
className: 'app-btn-primary',
|
||||||
|
sheetName: 'Vehicle-Type',
|
||||||
exportOptions: {
|
exportOptions: {
|
||||||
columns: ':not(:last-child)'
|
columns: ':not(:last-child)'
|
||||||
}
|
}
|
||||||
@ -855,13 +856,17 @@
|
|||||||
paging: true,
|
paging: true,
|
||||||
pageLength: 10,
|
pageLength: 10,
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
</div>`,
|
</div>`,
|
||||||
searchPlaceholder: "Search"
|
searchPlaceholder: "Search",
|
||||||
},
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
|
},
|
||||||
initComplete: function () {
|
initComplete: function () {
|
||||||
$(".dt-buttons").prepend(`
|
$(".dt-buttons").prepend(`
|
||||||
<div class="tab-button mr-2" id="toggleButton" style="float:left;">
|
<div class="tab-button mr-2" id="toggleButton" style="float:left;">
|
||||||
|
|||||||
@ -124,12 +124,16 @@
|
|||||||
],
|
],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
</div>`,
|
</div>`,
|
||||||
searchPlaceholder: "Search"
|
searchPlaceholder: "Search",
|
||||||
},
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
|
},
|
||||||
paging: true, // Enable pagination
|
paging: true, // Enable pagination
|
||||||
pageLength: 10, // Set default number of rows per page (optional)
|
pageLength: 10, // Set default number of rows per page (optional)
|
||||||
// ordering: false,
|
// ordering: false,
|
||||||
|
|||||||
@ -347,12 +347,16 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: {
|
language: {
|
||||||
search: `
|
search: `
|
||||||
<div class="datatable-search-wrapper">
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||||
_INPUT_
|
_INPUT_
|
||||||
<i class="mdi mdi-magnify datatable-search-icon"></i>
|
<i class="mdi mdi-magnify datatable-search-icon"
|
||||||
</div>`,
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||||
searchPlaceholder: "Search"
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||||
|
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
|
||||||
|
</div>`,
|
||||||
|
searchPlaceholder: "Search",
|
||||||
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||||
},
|
},
|
||||||
ordering: false,
|
ordering: false,
|
||||||
paging: true
|
paging: true
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user