Merge branch 'dev' of bitbucket.org:jubilian/nhance into dev
This commit is contained in:
commit
fa95e29a07
@ -16,6 +16,8 @@ $routes->get("testing", "ClientController::Testing");
|
|||||||
$routes->get("update-policy-terms-for-corrections", "ClientController::updatePolicyTermsForCorrections");
|
$routes->get("update-policy-terms-for-corrections", "ClientController::updatePolicyTermsForCorrections");
|
||||||
$routes->get("update_rack_rate_json", "ClientController::updateRackRateJson");
|
$routes->get("update_rack_rate_json", "ClientController::updateRackRateJson");
|
||||||
$routes->get("updatajson", "EmpDataServiceController::updatajson");
|
$routes->get("updatajson", "EmpDataServiceController::updatajson");
|
||||||
|
$routes->get("view", "EmployeeController::viewECard/$1");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$routes->post("add_advertise_image", "AppContentManagementController::add_advertise_image");
|
$routes->post("add_advertise_image", "AppContentManagementController::add_advertise_image");
|
||||||
@ -109,6 +111,7 @@ $routes->group("/client", ["filter" => "authMVC"], function ($routes) {
|
|||||||
$routes->get("list/(:any)", "ClientController::getClientPolicyById/$1");
|
$routes->get("list/(:any)", "ClientController::getClientPolicyById/$1");
|
||||||
$routes->post("policyGMCTerms", "ClientController::policyGMCTerms");
|
$routes->post("policyGMCTerms", "ClientController::policyGMCTerms");
|
||||||
$routes->get("getterms", "ClientController::getterms");
|
$routes->get("getterms", "ClientController::getterms");
|
||||||
|
$routes->get("remove/(:any)", "ClientController::removePolicy/$1");
|
||||||
});
|
});
|
||||||
|
|
||||||
$routes->group("kyc", ["filter" => "authMVC"], function ($routes) {
|
$routes->group("kyc", ["filter" => "authMVC"], function ($routes) {
|
||||||
@ -138,7 +141,7 @@ $routes->group("/employee", ["filter" => "authMVC"], function ($routes) {
|
|||||||
$routes->post("upload", "EmployeeController::employeesUplodWithEvents");
|
$routes->post("upload", "EmployeeController::employeesUplodWithEvents");
|
||||||
$routes->get("excel_error/(:any)", "EmployeeController::getExcelFileErrors/$1");
|
$routes->get("excel_error/(:any)", "EmployeeController::getExcelFileErrors/$1");
|
||||||
$routes->get("endorsement-list", "EmployeeController::endorsementList");
|
$routes->get("endorsement-list", "EmployeeController::endorsementList");
|
||||||
$routes->get("enrollment-list", "EmployeeController::enrollmentClientList");
|
$routes->match(['get','post'],'enrollment-list','EmployeeController::enrollmentClientList');
|
||||||
$routes->get("empby_client_clientbranch/(:any)/(:any)", "EmployeeController::empby_client_clientbranch/$1/$2");
|
$routes->get("empby_client_clientbranch/(:any)/(:any)", "EmployeeController::empby_client_clientbranch/$1/$2");
|
||||||
$routes->get("truncate/(:any)", "EmployeeController::truncateFileData/$1");
|
$routes->get("truncate/(:any)", "EmployeeController::truncateFileData/$1");
|
||||||
$routes->get("test-rack-rate", "EmployeeController::testRackRate");
|
$routes->get("test-rack-rate", "EmployeeController::testRackRate");
|
||||||
@ -252,7 +255,6 @@ $routes->group("/util", ["filter" => "authMVC"], function ($routes) {
|
|||||||
$routes->get("fetch-emp-count/(:any)", "EmployeeController::getEmpCount/$1");
|
$routes->get("fetch-emp-count/(:any)", "EmployeeController::getEmpCount/$1");
|
||||||
$routes->get("init-Emp-onboard/(:any)", "EmployeeController::initiateManualEmployeesOnboardProcess/$1");
|
$routes->get("init-Emp-onboard/(:any)", "EmployeeController::initiateManualEmployeesOnboardProcess/$1");
|
||||||
$routes->get("full-excel-error-file/(:any)", "EmployeeController::downloadFullExcelErrorFile/$1");
|
$routes->get("full-excel-error-file/(:any)", "EmployeeController::downloadFullExcelErrorFile/$1");
|
||||||
$routes->get("id-card", "EmployeeController::viewECard/$1");
|
|
||||||
$routes->get("preview-card/(:any)", "EmployeeController::previewTemplate/$1");
|
$routes->get("preview-card/(:any)", "EmployeeController::previewTemplate/$1");
|
||||||
$routes->get("export-import-error-list/(:any)", "EmployeeController::errorListExportImport/$1");
|
$routes->get("export-import-error-list/(:any)", "EmployeeController::errorListExportImport/$1");
|
||||||
$routes->get("has_policy_config_completed/(:any)", "EmployeeController::hasPolicyConfigCompleted/$1");
|
$routes->get("has_policy_config_completed/(:any)", "EmployeeController::hasPolicyConfigCompleted/$1");
|
||||||
@ -268,10 +270,12 @@ $routes->group("/util", ["filter" => "authMVC"], function ($routes) {
|
|||||||
$routes->get("check_addition_premium_JSON/(:any)", "ClientController::checkAdditionPremiumJSON/$1");
|
$routes->get("check_addition_premium_JSON/(:any)", "ClientController::checkAdditionPremiumJSON/$1");
|
||||||
$routes->get("get_policy_type_for_base_policy/(:any)", "ClientController::getPolicyTypeForBasePolicy/$1");
|
$routes->get("get_policy_type_for_base_policy/(:any)", "ClientController::getPolicyTypeForBasePolicy/$1");
|
||||||
$routes->get("get_client_details/(:any)", "ClientController::getClientDetails/$1");
|
$routes->get("get_client_details/(:any)", "ClientController::getClientDetails/$1");
|
||||||
|
$routes->get("featch_dashboard_data/(:any)", "DashboardController::featch_dashboard_data/$1");
|
||||||
});
|
});
|
||||||
|
|
||||||
$routes->cli('cli/processjob', 'JobWorker::processJob');
|
$routes->cli('cli/processjob', 'JobWorker::processJob');
|
||||||
$routes->cli('cli/processjobs', 'JobWorker::processJobs');
|
$routes->cli('cli/processjobs', 'JobWorker::processJobs');
|
||||||
|
$routes->cli('cli/enrollment_status', 'JobWorker::enrollment_status');
|
||||||
$routes->get("processjob", "JobWorker::processJob");
|
$routes->get("processjob", "JobWorker::processJob");
|
||||||
|
|
||||||
|
|
||||||
@ -292,9 +296,9 @@ $routes->group("/api", ["filter" => "authJWT"], function ($routes) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
$routes->get("getEmployeeActiveOrInactivePolicy", "EmployeeRestController::getEmployeeActiveOrInactivePolicy");
|
|
||||||
|
|
||||||
$routes->get("getChatResponse", "ChatBotController::getChatResponse");
|
|
||||||
|
|
||||||
$routes->group("employeeRest", ["filter" => "authJWT"], function ($routes) {
|
$routes->group("employeeRest", ["filter" => "authJWT"], function ($routes) {
|
||||||
$routes->post("storeFireBase", "EmployeeRestController::storeFireBase");
|
$routes->post("storeFireBase", "EmployeeRestController::storeFireBase");
|
||||||
$routes->post("saveMpin", "RestAuthenticationController::saveMpin");
|
$routes->post("saveMpin", "RestAuthenticationController::saveMpin");
|
||||||
|
|||||||
@ -229,15 +229,24 @@ class ClientController extends AdminController
|
|||||||
public function removeClient($id = null)
|
public function removeClient($id = null)
|
||||||
{
|
{
|
||||||
$this->myLogger->logme('error','Client Remove function called');
|
$this->myLogger->logme('error','Client Remove function called');
|
||||||
// $data = $this->request->getPost();
|
|
||||||
$data['updated_by'] = get_session_userid();
|
$client_policy_data = $this->clientPolicyModel
|
||||||
$data['is_active'] = 0;
|
->where('policy_status', 1)
|
||||||
$update = $this->clientModel->update($id,$data);
|
->where('Is_active', 1)
|
||||||
if($update){
|
->where('client_id', $id)
|
||||||
|
->countAllResults();
|
||||||
|
if($client_policy_data == 0){
|
||||||
|
|
||||||
|
$data['updated_by'] = get_session_userid();
|
||||||
|
$data['is_active'] = 0;
|
||||||
|
$update = $this->clientModel->update($id,$data);
|
||||||
return $this->respond(['status' => true,'code' => 200], 200);
|
return $this->respond(['status' => true,'code' => 200], 200);
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
return $this->respond(['status' => false,'code' => 404], 200);
|
|
||||||
|
return $this->respond(['status' => false,'code' => 404, 'message' => 'The Client has active policy'], 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function removeClientBranch($id = null)
|
public function removeClientBranch($id = null)
|
||||||
@ -319,6 +328,7 @@ class ClientController extends AdminController
|
|||||||
5 => 'Non EB',
|
5 => 'Non EB',
|
||||||
6 => 'Refund By Insurer',
|
6 => 'Refund By Insurer',
|
||||||
7 => 'Opening Amount',
|
7 => 'Opening Amount',
|
||||||
|
8 => 'Truncated',
|
||||||
];
|
];
|
||||||
|
|
||||||
$data['subTypeOptions'] = $subTypeOptions;
|
$data['subTypeOptions'] = $subTypeOptions;
|
||||||
@ -409,6 +419,7 @@ class ClientController extends AdminController
|
|||||||
}
|
}
|
||||||
|
|
||||||
$editData['client_policy'] = $clientPoliceData;
|
$editData['client_policy'] = $clientPoliceData;
|
||||||
|
$editData['client_policy']['role'] = get_role_id();
|
||||||
$editData['notification'] =$this->notificationModel->select('template_name,enabled')->where('client_id',$id)->findAll();
|
$editData['notification'] =$this->notificationModel->select('template_name,enabled')->where('client_id',$id)->findAll();
|
||||||
$editData['placeHolders'] = ['member_name','nhance_logo','tpa_id','ecard_download_link', 'client_logo', 'policy_no', 'member_summary', 'app_link', 'post_enrollment_app_link', 'client_name'];
|
$editData['placeHolders'] = ['member_name','nhance_logo','tpa_id','ecard_download_link', 'client_logo', 'policy_no', 'member_summary', 'app_link', 'post_enrollment_app_link', 'client_name'];
|
||||||
|
|
||||||
@ -729,7 +740,7 @@ class ClientController extends AdminController
|
|||||||
$base_policy = $this->request->getPost('base_policy');
|
$base_policy = $this->request->getPost('base_policy');
|
||||||
|
|
||||||
|
|
||||||
$insurerValue = (string) $this->request->getPost('insurer');
|
$insurerValue = (string) $this->request->getPost('insurer');
|
||||||
list($insurerBranchId, $insurerId) = explode('-', $insurerValue);
|
list($insurerBranchId, $insurerId) = explode('-', $insurerValue);
|
||||||
|
|
||||||
|
|
||||||
@ -814,13 +825,23 @@ class ClientController extends AdminController
|
|||||||
|
|
||||||
|
|
||||||
$data['policy_no'] = $this->request->getPost('policy_no');
|
$data['policy_no'] = $this->request->getPost('policy_no');
|
||||||
$data['policy_start_date'] = change_date_format($this->request->getPost('policy_start_date'), 'd-m-Y', 'Y-m-d');
|
if($data['inception_type'] == 2){
|
||||||
$data['policy_end_date'] = change_date_format($this->request->getPost('policy_end_date'), 'd-m-Y', 'Y-m-d');
|
$data['policy_start_date'] = change_date_format($this->request->getPost('policy_start_date'), 'd-m-Y', 'Y-m-d');
|
||||||
|
$data['policy_end_date'] = change_date_format($this->request->getPost('policy_end_date'), 'd-m-Y', 'Y-m-d');
|
||||||
|
$data['reminder_date'] = change_date_format($this->request->getPost('reminder_date'), 'd-m-Y', 'Y-m-d');
|
||||||
|
|
||||||
|
}else{
|
||||||
|
$data['policy_start_date'] = null;
|
||||||
|
$data['policy_end_date'] = null;
|
||||||
|
$data['reminder_date'] = null;
|
||||||
|
}
|
||||||
|
|
||||||
$data['created_by'] = get_session_userid();
|
$data['created_by'] = get_session_userid();
|
||||||
|
|
||||||
$insert = $this->clientPolicyModel->insert($data);
|
$insert = $this->clientPolicyModel->insert($data);
|
||||||
if($insert){
|
if($insert){
|
||||||
$clientPoliceData = $this->clientPolicyModel->getClientPolicyByClientId($this->request->getPost('client_id'));
|
$clientPoliceData = $this->clientPolicyModel->getClientPolicyByClientId($this->request->getPost('client_id'));
|
||||||
|
$clientPoliceData['role'] = get_role_id();
|
||||||
return $this->respond(['status' => true,'code' => 200,'data' => $clientPoliceData, 'method' => 'CERATE', 'post_data' => $data], 200);
|
return $this->respond(['status' => true,'code' => 200,'data' => $clientPoliceData, 'method' => 'CERATE', 'post_data' => $data], 200);
|
||||||
}else{
|
}else{
|
||||||
return $this->respond(['status' => false,'code' => 404, 'message' => 'no data found'], 200);
|
return $this->respond(['status' => false,'code' => 404, 'message' => 'no data found'], 200);
|
||||||
@ -851,8 +872,8 @@ class ClientController extends AdminController
|
|||||||
$data['tpa_id'] = $tpaId;
|
$data['tpa_id'] = $tpaId;
|
||||||
$data['policy_type_id'] = $this->request->getPost('policy_type_id');
|
$data['policy_type_id'] = $this->request->getPost('policy_type_id');
|
||||||
$data['policy_no'] = $this->request->getPost('policy_no');
|
$data['policy_no'] = $this->request->getPost('policy_no');
|
||||||
$data['policy_start_date'] = change_date_format($this->request->getPost('policy_start_date'), 'd-m-Y', 'Y-m-d');
|
// $data['policy_start_date'] = change_date_format($this->request->getPost('policy_start_date'), 'd-m-Y', 'Y-m-d');
|
||||||
$data['policy_end_date'] = change_date_format($this->request->getPost('policy_end_date'), 'd-m-Y', 'Y-m-d');
|
// $data['policy_end_date'] = change_date_format($this->request->getPost('policy_end_date'), 'd-m-Y', 'Y-m-d');
|
||||||
|
|
||||||
$data['insured'] = $this->request->getPost('insured');
|
$data['insured'] = $this->request->getPost('insured');
|
||||||
$data['no_of_lives'] = $this->request->getPost('no_of_lives');
|
$data['no_of_lives'] = $this->request->getPost('no_of_lives');
|
||||||
@ -874,6 +895,16 @@ class ClientController extends AdminController
|
|||||||
$data['cd_ac_no'] = $this->request->getPost('cd_ac_no');
|
$data['cd_ac_no'] = $this->request->getPost('cd_ac_no');
|
||||||
$data['gst'] = $this->request->getPost('gst');
|
$data['gst'] = $this->request->getPost('gst');
|
||||||
|
|
||||||
|
if($data['inception_type'] == 2){
|
||||||
|
$data['policy_start_date'] = change_date_format($this->request->getPost('policy_start_date'), 'd-m-Y', 'Y-m-d');
|
||||||
|
$data['policy_end_date'] = change_date_format($this->request->getPost('policy_end_date'), 'd-m-Y', 'Y-m-d');
|
||||||
|
$data['reminder_date'] = change_date_format($this->request->getPost('reminder_date'), 'd-m-Y', 'Y-m-d');
|
||||||
|
}else{
|
||||||
|
$data['policy_start_date'] = null;
|
||||||
|
$data['policy_end_date'] = null;
|
||||||
|
$data['reminder_date'] = null;
|
||||||
|
}
|
||||||
|
|
||||||
if($policy_type_id == 1 || $policy_type_id == 2 || $policy_type_id == 3 || $policy_type_id == 6 || $policy_type_id == 7){
|
if($policy_type_id == 1 || $policy_type_id == 2 || $policy_type_id == 3 || $policy_type_id == 6 || $policy_type_id == 7){
|
||||||
|
|
||||||
$data['is_addon'] = 1;
|
$data['is_addon'] = 1;
|
||||||
@ -922,7 +953,7 @@ class ClientController extends AdminController
|
|||||||
|
|
||||||
if($insert){
|
if($insert){
|
||||||
$clientPoliceData = $this->clientPolicyModel->getClientPolicyByClientId($client_id);
|
$clientPoliceData = $this->clientPolicyModel->getClientPolicyByClientId($client_id);
|
||||||
|
$clientPoliceData['role'] = get_role_id();
|
||||||
// foreach ($clientPoliceData as $key => $value) {
|
// foreach ($clientPoliceData as $key => $value) {
|
||||||
|
|
||||||
// $clientPoliceData[$key]->policy_start_date = date('d-M-Y', strtotime($value->policy_start_date));
|
// $clientPoliceData[$key]->policy_start_date = date('d-M-Y', strtotime($value->policy_start_date));
|
||||||
@ -934,6 +965,41 @@ class ClientController extends AdminController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function removePolicy($id = null)
|
||||||
|
{
|
||||||
|
$this->myLogger->logme('error', 'Client Policy Remove function called');
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'updated_by' => get_session_userid(),
|
||||||
|
'is_active' => 0
|
||||||
|
];
|
||||||
|
|
||||||
|
$emp_details = $this->employeePolicyModel
|
||||||
|
->join('employees', 'employees.id = employee_polices.employee_id')
|
||||||
|
->where('client_policy_id', $id)
|
||||||
|
->where('employee_polices.status', 'active')
|
||||||
|
->where('employee_polices.is_active', 1)
|
||||||
|
->where('employees.emp_status', 'active')
|
||||||
|
->where('employees.is_active', 1)
|
||||||
|
->countAllResults();
|
||||||
|
if($emp_details == 0){
|
||||||
|
|
||||||
|
$update = $this->clientPolicyModel->where('id', $id)->set($data)->update();
|
||||||
|
|
||||||
|
if ($update) {
|
||||||
|
return $this->respond(['status' => true, 'code' => 200], 200);
|
||||||
|
} else {
|
||||||
|
return $this->respond(['status' => false, 'code' => 404, 'message' => 'Failed to remove policy'], 200);
|
||||||
|
}
|
||||||
|
|
||||||
|
}else{
|
||||||
|
|
||||||
|
return $this->respond(['status' => false, 'code' => 404, 'message' => 'The policy has active employees'], 200);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public function createClientPolicyPremium()
|
public function createClientPolicyPremium()
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -1691,10 +1757,12 @@ class ClientController extends AdminController
|
|||||||
$data['family_floaters']['parents-in-law'] =2;
|
$data['family_floaters']['parents-in-law'] =2;
|
||||||
$data['family_floaters']['either-parents-pil'] =0;
|
$data['family_floaters']['either-parents-pil'] =0;
|
||||||
}else if($temp_family_floaters[$value] == '2EPORPIL'){
|
}else if($temp_family_floaters[$value] == '2EPORPIL'){
|
||||||
|
//Parents or PIL (Any two of Father, Mother, MIl, FIL)
|
||||||
$data['family_floaters']['parents'] =0;
|
$data['family_floaters']['parents'] =0;
|
||||||
$data['family_floaters']['parents-in-law'] =0;
|
$data['family_floaters']['parents-in-law'] =0;
|
||||||
$data['family_floaters']['either-parents-pil'] =2;
|
$data['family_floaters']['either-parents-pil'] =2;
|
||||||
}else if($temp_family_floaters[$value] == 'EPORPIL'){
|
}else if($temp_family_floaters[$value] == 'EPORPIL'){
|
||||||
|
//Either Parents or PIL (Parents or Parents In Law)
|
||||||
$data['family_floaters']['parents'] =0;
|
$data['family_floaters']['parents'] =0;
|
||||||
$data['family_floaters']['parents-in-law'] =0;
|
$data['family_floaters']['parents-in-law'] =0;
|
||||||
$data['family_floaters']['either-parents-pil'] =1;
|
$data['family_floaters']['either-parents-pil'] =1;
|
||||||
@ -2101,8 +2169,6 @@ class ClientController extends AdminController
|
|||||||
->findAll();
|
->findAll();
|
||||||
|
|
||||||
return $this->respond(['status' => true,'code' => 200, 'data' => $branchs], 200);
|
return $this->respond(['status' => true,'code' => 200, 'data' => $branchs], 200);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getClientAllDetailsByUsingClientID($client_id)
|
public function getClientAllDetailsByUsingClientID($client_id)
|
||||||
@ -2112,7 +2178,7 @@ class ClientController extends AdminController
|
|||||||
|
|
||||||
$builder = $db->table('clients');
|
$builder = $db->table('clients');
|
||||||
$builder->select('
|
$builder->select('
|
||||||
policies.name as policy_name,
|
|
||||||
policy_type.policy_type,
|
policy_type.policy_type,
|
||||||
insurers.name as insurer_name,
|
insurers.name as insurer_name,
|
||||||
insurers.short_name as insurer_short_name,
|
insurers.short_name as insurer_short_name,
|
||||||
@ -2126,9 +2192,9 @@ class ClientController extends AdminController
|
|||||||
CASE
|
CASE
|
||||||
WHEN client_policy.base_policy IS NULL THEN "Not Appear"
|
WHEN client_policy.base_policy IS NULL THEN "Not Appear"
|
||||||
WHEN client_policy.base_policy = 0 THEN "Not Appear"
|
WHEN client_policy.base_policy = 0 THEN "Not Appear"
|
||||||
ELSE (SELECT policies.name
|
ELSE (SELECT policy_type.policy_type
|
||||||
FROM client_policy AS base_client_policy
|
FROM client_policy AS base_client_policy
|
||||||
JOIN policies ON policies.id = base_client_policy.policy_id
|
JOIN policy_type ON policy_type.id = base_client_policy.policy_type_id
|
||||||
WHERE base_client_policy.id = client_policy.base_policy)
|
WHERE base_client_policy.id = client_policy.base_policy)
|
||||||
END as base_policy_name,
|
END as base_policy_name,
|
||||||
|
|
||||||
@ -2161,13 +2227,11 @@ class ClientController extends AdminController
|
|||||||
', false);
|
', false);
|
||||||
$builder->join('client_policy', 'client_policy.client_id = clients.id');
|
$builder->join('client_policy', 'client_policy.client_id = clients.id');
|
||||||
$builder->join('client_branch', 'client_policy.client_branch_id = client_branch.id');
|
$builder->join('client_branch', 'client_policy.client_branch_id = client_branch.id');
|
||||||
$builder->join('policies', 'policies.id = client_policy.policy_id');
|
$builder->join('policy_type', 'policy_type.id = client_policy.policy_type_id');
|
||||||
$builder->join('policy_type', 'policy_type.id = policies.policy_type_id');
|
|
||||||
$builder->join('insurers', 'insurers.id = client_policy.insurer_id');
|
$builder->join('insurers', 'insurers.id = client_policy.insurer_id');
|
||||||
$builder->join('tpa', 'tpa.id = client_policy.tpa_id');
|
$builder->join('tpa', 'tpa.id = client_policy.tpa_id');
|
||||||
$builder->where('clients.is_active', 1);
|
$builder->where('clients.is_active', 1);
|
||||||
$builder->where('client_policy.is_active', 1);
|
$builder->where('client_policy.is_active', 1);
|
||||||
$builder->where('policies.is_active', 1);
|
|
||||||
$builder->where('policy_type.is_active', 1);
|
$builder->where('policy_type.is_active', 1);
|
||||||
$builder->where('client_policy.policy_status', 1);
|
$builder->where('client_policy.policy_status', 1);
|
||||||
$builder->where('clients.id', $client_id);
|
$builder->where('clients.id', $client_id);
|
||||||
@ -2257,8 +2321,6 @@ class ClientController extends AdminController
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$data['client_policy'] = $client_policy;
|
$data['client_policy'] = $client_policy;
|
||||||
$data['client_branch'] = $this->clientModel
|
$data['client_branch'] = $this->clientModel
|
||||||
|
|
||||||
@ -2282,10 +2344,7 @@ class ClientController extends AdminController
|
|||||||
->get()->getResultArray();
|
->get()->getResultArray();
|
||||||
|
|
||||||
|
|
||||||
$data['client'] = $this->clientModel
|
$data['client'] = $this->clientModel->where('clients.id', $client_id)->first();
|
||||||
->select('clients.*, states.state as state')
|
|
||||||
->join('states', 'states.id = clients.state')
|
|
||||||
->where('clients.id', $client_id)->first();
|
|
||||||
|
|
||||||
|
|
||||||
$client_rm = $this->clientRMModel
|
$client_rm = $this->clientRMModel
|
||||||
@ -2313,7 +2372,7 @@ class ClientController extends AdminController
|
|||||||
$data['heads'] = $heads;
|
$data['heads'] = $heads;
|
||||||
|
|
||||||
// dd($data);
|
// dd($data);
|
||||||
//$this->loadLayout('client_info', $data);
|
// $this->loadLayout('client_info', $data);
|
||||||
|
|
||||||
|
|
||||||
$html = view('client_info', $data);
|
$html = view('client_info', $data);
|
||||||
@ -2621,7 +2680,7 @@ class ClientController extends AdminController
|
|||||||
|
|
||||||
public function updateRackRateJson()
|
public function updateRackRateJson()
|
||||||
{
|
{
|
||||||
// $client_policy_id = 13;
|
// $client_policy_id = 12;
|
||||||
|
|
||||||
$results = $this->policyPremium2Model
|
$results = $this->policyPremium2Model
|
||||||
->select('*')
|
->select('*')
|
||||||
@ -2640,6 +2699,7 @@ class ClientController extends AdminController
|
|||||||
->get()
|
->get()
|
||||||
->getResultArray();
|
->getResultArray();
|
||||||
|
|
||||||
|
// dd($results, $results2);
|
||||||
|
|
||||||
$client_policy_ids = [];
|
$client_policy_ids = [];
|
||||||
$json = [];
|
$json = [];
|
||||||
@ -2716,7 +2776,9 @@ class ClientController extends AdminController
|
|||||||
$client_policy_id = $result['client_policy_id'];
|
$client_policy_id = $result['client_policy_id'];
|
||||||
$client_policy_data = $this->clientPolicyModel->where('id', $client_policy_id)->first();
|
$client_policy_data = $this->clientPolicyModel->where('id', $client_policy_id)->first();
|
||||||
|
|
||||||
if($client_policy_data['policy_terms']){
|
// dd($client_policy_data);
|
||||||
|
|
||||||
|
if(isset($client_policy_data) && $client_policy_data['policy_terms']){
|
||||||
|
|
||||||
$self = 1;
|
$self = 1;
|
||||||
$spouse = 'NA';
|
$spouse = 'NA';
|
||||||
|
|||||||
@ -13,15 +13,17 @@ use App\Models\MessageModel;
|
|||||||
use App\Models\UserMessageModel;
|
use App\Models\UserMessageModel;
|
||||||
use App\Models\ClientModel;
|
use App\Models\ClientModel;
|
||||||
|
|
||||||
|
use App\Controllers\PendingActionsContrller;
|
||||||
|
|
||||||
class DashboardController extends AdminController
|
class DashboardController extends AdminController
|
||||||
{
|
{
|
||||||
|
|
||||||
use ResponseTrait;
|
use ResponseTrait;
|
||||||
protected $messageModel;
|
protected $messageModel;
|
||||||
protected $clientModel;
|
protected $clientModel;
|
||||||
protected $userMessageModel;
|
protected $userMessageModel;
|
||||||
protected $myLogger;
|
protected $myLogger;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
set_session_context('Dashboard');
|
set_session_context('Dashboard');
|
||||||
@ -35,17 +37,19 @@ class DashboardController extends AdminController
|
|||||||
{
|
{
|
||||||
$data = [];
|
$data = [];
|
||||||
|
|
||||||
|
$pendingActionsController = new PendingActionsController;
|
||||||
|
$pendingActionsData = $pendingActionsController->getPendingActionsForDashBoard();
|
||||||
|
|
||||||
$results = $this->clientModel->select('clients.id as client_id, clients.client_name, clients.short_name,
|
$results = $this->clientModel->select('clients.id as client_id, clients.client_name, clients.short_name,
|
||||||
client_branch.id as client_branch_id, client_branch.branch_name,
|
client_branch.id as client_branch_id, client_branch.branch_name,
|
||||||
client_branch.branch_code, employees.id as employee_id,
|
client_branch.branch_code, employees.id as employee_id,
|
||||||
employees.name as employee_name, employees.relationship,
|
employees.name as employee_name, employees.relationship,
|
||||||
employees.emp_code, employees.emp_status, auth_history.user_type')
|
employees.emp_code, employees.emp_status, auth_history.user_type')
|
||||||
->join('client_branch','clients.id = client_branch.client_id', 'left')
|
->join('client_branch', 'clients.id = client_branch.client_id', 'left')
|
||||||
->join('employees','client_branch.id = employees.client_branch_id', 'left')
|
->join('employees', 'client_branch.id = employees.client_branch_id', 'left')
|
||||||
->join('auth_history', 'employees.id = auth_history.user_id AND "employee" = auth_history.user_type', 'left')
|
->join('auth_history', 'employees.id = auth_history.user_id AND "employee" = auth_history.user_type', 'left')
|
||||||
->findAll();
|
->findAll();
|
||||||
|
|
||||||
$groupedData = [];
|
$groupedData = [];
|
||||||
$employeeId = '';
|
$employeeId = '';
|
||||||
foreach ($results as $row) {
|
foreach ($results as $row) {
|
||||||
@ -55,17 +59,17 @@ class DashboardController extends AdminController
|
|||||||
$branchId = $row['client_branch_id'];
|
$branchId = $row['client_branch_id'];
|
||||||
$branchName = $row['branch_name'];
|
$branchName = $row['branch_name'];
|
||||||
$branchCode = $row['branch_code'];
|
$branchCode = $row['branch_code'];
|
||||||
if($employeeId != $row['employee_id']){
|
if ($employeeId != $row['employee_id']) {
|
||||||
$employeeId = $row['employee_id'];
|
$employeeId = $row['employee_id'];
|
||||||
}else{
|
} else {
|
||||||
$employeeId = null;
|
$employeeId = null;
|
||||||
}
|
}
|
||||||
$employeeName = $row['employee_name'] ;
|
$employeeName = $row['employee_name'];
|
||||||
$employeeRelationship = $row['relationship'] ;
|
$employeeRelationship = $row['relationship'];
|
||||||
$employeeEmpCode = $row['emp_code'] ;
|
$employeeEmpCode = $row['emp_code'];
|
||||||
$employeeEmpStatus = $row['emp_status'];
|
$employeeEmpStatus = $row['emp_status'];
|
||||||
$employeeUserType = $row['user_type'];
|
$employeeUserType = $row['user_type'];
|
||||||
|
|
||||||
// Initialize the client entry if it doesn't exist
|
// Initialize the client entry if it doesn't exist
|
||||||
if (!isset($groupedData[$clientId])) {
|
if (!isset($groupedData[$clientId])) {
|
||||||
$groupedData[$clientId] = [
|
$groupedData[$clientId] = [
|
||||||
@ -75,7 +79,7 @@ class DashboardController extends AdminController
|
|||||||
'branches' => []
|
'branches' => []
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the branch entry if it doesn't exist
|
// Initialize the branch entry if it doesn't exist
|
||||||
if (!isset($groupedData[$clientId]['branches'][$branchId])) {
|
if (!isset($groupedData[$clientId]['branches'][$branchId])) {
|
||||||
$groupedData[$clientId]['branches'][$branchId] = [
|
$groupedData[$clientId]['branches'][$branchId] = [
|
||||||
@ -100,7 +104,7 @@ class DashboardController extends AdminController
|
|||||||
if (!empty($employeeUserType)) {
|
if (!empty($employeeUserType)) {
|
||||||
$groupedData[$clientId]['branches'][$branchId]['emp_login']++;
|
$groupedData[$clientId]['branches'][$branchId]['emp_login']++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Increment emp_enroll if emp_status is not 'draft'
|
// Increment emp_enroll if emp_status is not 'draft'
|
||||||
if ($employeeEmpStatus !== 'draft') {
|
if ($employeeEmpStatus !== 'draft') {
|
||||||
$groupedData[$clientId]['branches'][$branchId]['emp_enroll']++;
|
$groupedData[$clientId]['branches'][$branchId]['emp_enroll']++;
|
||||||
@ -108,13 +112,14 @@ class DashboardController extends AdminController
|
|||||||
}
|
}
|
||||||
$employeeId = $row['employee_id'];
|
$employeeId = $row['employee_id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Re-index the arrays to match the expected structure
|
// Re-index the arrays to match the expected structure
|
||||||
foreach ($groupedData as &$client) {
|
foreach ($groupedData as &$client) {
|
||||||
$client['branches'] = array_values($client['branches']);
|
$client['branches'] = array_values($client['branches']);
|
||||||
}
|
}
|
||||||
// echo "<pre>";
|
// echo "<pre>";
|
||||||
$data['client_branch_emp_list'] = $groupedData;
|
$data['client_branch_emp_list'] = $groupedData;
|
||||||
|
$data['pendingActionsData'] = $pendingActionsData;
|
||||||
// print_r($data);die;
|
// print_r($data);die;
|
||||||
|
|
||||||
echo view('layout/header');
|
echo view('layout/header');
|
||||||
@ -128,7 +133,7 @@ class DashboardController extends AdminController
|
|||||||
$userId = get_session_userid();
|
$userId = get_session_userid();
|
||||||
$roleId = 5;
|
$roleId = 5;
|
||||||
$teamId = 1;
|
$teamId = 1;
|
||||||
|
|
||||||
if ($userId != null && $roleId != null && $teamId != null) {
|
if ($userId != null && $roleId != null && $teamId != null) {
|
||||||
$messages = $this->messageModel->getMessagesForUser($userId, $roleId, $teamId);
|
$messages = $this->messageModel->getMessagesForUser($userId, $roleId, $teamId);
|
||||||
return $this->respond(['status' => true, 'code' => 200, 'message' => $messages], 200);
|
return $this->respond(['status' => true, 'code' => 200, 'message' => $messages], 200);
|
||||||
@ -137,7 +142,7 @@ class DashboardController extends AdminController
|
|||||||
return $this->respond(['status' => false, 'code' => 404, 'message' => 'No data found'], 200);
|
return $this->respond(['status' => false, 'code' => 404, 'message' => 'No data found'], 200);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function acknowledgeMessage($messageId)
|
public function acknowledgeMessage($messageId)
|
||||||
{
|
{
|
||||||
@ -149,4 +154,41 @@ class DashboardController extends AdminController
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function featch_dashboard_data($type)
|
||||||
|
{
|
||||||
|
$pendingActionsController = new PendingActionsController;
|
||||||
|
$pendingActionsData = $pendingActionsController->getPendingActionsForClientData();
|
||||||
|
|
||||||
|
$data = [];
|
||||||
|
|
||||||
|
if($type == 'insurer'){
|
||||||
|
|
||||||
|
$data = $pendingActionsData['uhid'];
|
||||||
|
|
||||||
|
}else if($type == 'TPA'){
|
||||||
|
$data = $pendingActionsData['tpa'];
|
||||||
|
|
||||||
|
}else if($type == 'I'){
|
||||||
|
$data = $pendingActionsData['inception'];
|
||||||
|
|
||||||
|
}else if($type == 'D'){
|
||||||
|
$data = $pendingActionsData['deletion'];
|
||||||
|
|
||||||
|
}else if($type == 'C'){
|
||||||
|
$data = $pendingActionsData['correction'];
|
||||||
|
|
||||||
|
}else if($type == 'SI'){
|
||||||
|
$data = $pendingActionsData['si_enhancement'];
|
||||||
|
|
||||||
|
}else if($type == 'policy'){
|
||||||
|
$data = $pendingActionsData['policy'];
|
||||||
|
|
||||||
|
}else if($type == 'ticket'){
|
||||||
|
$data = $pendingActionsData['uhid'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->respond(['status' => true, 'data' => $data], 200);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,6 +26,7 @@ use App\Models\MessageModel;
|
|||||||
use App\Models\UserMessageModel;
|
use App\Models\UserMessageModel;
|
||||||
use App\Models\CDMasterModel;
|
use App\Models\CDMasterModel;
|
||||||
use App\Models\InsurerExcelExportTemplateModel;
|
use App\Models\InsurerExcelExportTemplateModel;
|
||||||
|
use App\Models\ClientBranchModel;
|
||||||
|
|
||||||
use App\Controllers\Jobs;
|
use App\Controllers\Jobs;
|
||||||
use App\Controllers\JobWorker;
|
use App\Controllers\JobWorker;
|
||||||
@ -56,6 +57,7 @@ class EmpDataServiceController extends BaseController
|
|||||||
protected $userMessageModel;
|
protected $userMessageModel;
|
||||||
protected $CDMasterModel;
|
protected $CDMasterModel;
|
||||||
protected $excelExportTemplateModel;
|
protected $excelExportTemplateModel;
|
||||||
|
protected $clientBranchModel;
|
||||||
|
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
@ -77,6 +79,7 @@ class EmpDataServiceController extends BaseController
|
|||||||
$this->userMessageModel = new UserMessageModel();
|
$this->userMessageModel = new UserMessageModel();
|
||||||
$this->CDMasterModel = new CDMasterModel();
|
$this->CDMasterModel = new CDMasterModel();
|
||||||
$this->excelExportTemplateModel = new InsurerExcelExportTemplateModel();
|
$this->excelExportTemplateModel = new InsurerExcelExportTemplateModel();
|
||||||
|
$this->clientBranchModel = new ClientBranchModel();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1785,7 +1788,7 @@ class EmpDataServiceController extends BaseController
|
|||||||
'endorsement_no' => null,
|
'endorsement_no' => null,
|
||||||
'client_branch_id' => $client_branch_id,
|
'client_branch_id' => $client_branch_id,
|
||||||
'count' => $emp_count,
|
'count' => $emp_count,
|
||||||
'event' => $file['event_type'],
|
'event_name' => $file['event_type'],
|
||||||
'policy_name' => $policy_name['policy_name'],
|
'policy_name' => $policy_name['policy_name'],
|
||||||
'user_id' => $user_id,
|
'user_id' => $user_id,
|
||||||
]]);
|
]]);
|
||||||
@ -2830,7 +2833,7 @@ class EmpDataServiceController extends BaseController
|
|||||||
'cd_ac_no' => $CD_Account_Number['cd_ac_no'] ?? null,
|
'cd_ac_no' => $CD_Account_Number['cd_ac_no'] ?? null,
|
||||||
'endorsement_no' => $endorsement_id ?? null,
|
'endorsement_no' => $endorsement_id ?? null,
|
||||||
'count' => $emp_count,
|
'count' => $emp_count,
|
||||||
'event' => $file['event_type'],
|
'event_name' => $file['event_type'],
|
||||||
'policy_name' => $policy_name['policy_name'],
|
'policy_name' => $policy_name['policy_name'],
|
||||||
'user_id' => $user_id,
|
'user_id' => $user_id,
|
||||||
]]);
|
]]);
|
||||||
@ -3345,7 +3348,7 @@ class EmpDataServiceController extends BaseController
|
|||||||
'cd_ac_no' => $CD_Account_Number['cd_ac_no'] ?? null,
|
'cd_ac_no' => $CD_Account_Number['cd_ac_no'] ?? null,
|
||||||
'endorsement_no' => $endorsement_id ?? null,
|
'endorsement_no' => $endorsement_id ?? null,
|
||||||
'count' => $emp_count,
|
'count' => $emp_count,
|
||||||
'event' => $file['event_type'],
|
'event_name' => $file['event_type'],
|
||||||
'policy_name' => $policy_name['policy_name'],
|
'policy_name' => $policy_name['policy_name'],
|
||||||
'user_id' => $user_id,
|
'user_id' => $user_id,
|
||||||
]]);
|
]]);
|
||||||
@ -3770,38 +3773,52 @@ class EmpDataServiceController extends BaseController
|
|||||||
{
|
{
|
||||||
if (!empty($arrayData)) {
|
if (!empty($arrayData)) {
|
||||||
|
|
||||||
$amount = $this->employeePolicyModel->query("
|
|
||||||
SELECT SUM(rata_premimum + gst) AS total_sum
|
|
||||||
FROM employee_polices
|
|
||||||
WHERE id IN (" . implode(',', $arrayData['employeeIds']) . ")
|
|
||||||
")->getRow();
|
|
||||||
|
|
||||||
$insurer_id = $this->clientPolicyModel->where('id', $arrayData['client_policy_id'])->first();
|
$client_branch_data = $this->clientBranchModel->where('id', $arrayData['client_branch_id'])->first();
|
||||||
$description = 'The following amount of Rs. ' . round($amount->total_sum, 2) . '/- has been debited for the ' . $arrayData['count'] . ' employees at ' . remove_underscore_capitalize_first_letter($arrayData['event']) . ' to ' . remove_underscore_capitalize_first_letter($arrayData['policy_name']) . '.';
|
$units = json_decode($client_branch_data['units']);
|
||||||
|
|
||||||
if(get_session_userid() == null){
|
// dd(json_decode($client_branch_data['units']));
|
||||||
|
|
||||||
|
|
||||||
|
foreach($units as $unit)
|
||||||
|
{
|
||||||
|
|
||||||
|
$amount = $this->employeePolicyModel->query("
|
||||||
|
SELECT SUM(rata_premimum + gst) AS total_sum
|
||||||
|
FROM employee_polices
|
||||||
|
JOIN employees ON employees.id = employee_polices.employee_id
|
||||||
|
WHERE employees.unit = '$unit'
|
||||||
|
AND employee_polices.id IN (" . implode(',', $arrayData['employeeIds']) . ")
|
||||||
|
")->getRow();
|
||||||
|
|
||||||
|
if($amount){
|
||||||
|
|
||||||
|
$insurer_id = $this->clientPolicyModel->where('id', $arrayData['client_policy_id'])->first();
|
||||||
|
$description = 'The following amount of Rs. ' . round($amount->total_sum, 2) . '/- has been debited for the ' . $arrayData['count'] . ' employees at ' . remove_underscore_capitalize_first_letter($arrayData['event_name']) . ' to ' . remove_underscore_capitalize_first_letter($arrayData['policy_name']) . '.';
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'amount' => $amount->total_sum ?? 0,
|
||||||
|
'sub_type_id' => 4,
|
||||||
|
'client_id' => $arrayData['client_id'],
|
||||||
|
'client_policy_id' => $arrayData['client_policy_id'],
|
||||||
|
'endorsement_no' => $arrayData['endorsement_no'] ?? null,
|
||||||
|
'cd_ac_no' => $arrayData['cd_ac_no'] ?? null,
|
||||||
|
'insurer_id' => $insurer_id['insurer_id'],
|
||||||
|
'unit' => $unit,
|
||||||
|
'description' => $description,
|
||||||
|
'transaction_type' => 'Debit',
|
||||||
|
'updated_by' => $arrayData['user_id'],
|
||||||
|
'event_name' => $arrayData['event_name'],
|
||||||
|
'is_active' => 1,
|
||||||
|
];
|
||||||
|
|
||||||
|
$response = DepositHelper::saveDeposit($data, $arrayData['user_id']);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$data = [
|
|
||||||
'amount' => $amount->total_sum ?? 0,
|
|
||||||
'sub_type_id' => 4,
|
|
||||||
'client_id' => $arrayData['client_id'],
|
|
||||||
'client_policy_id' => $arrayData['client_policy_id'],
|
|
||||||
'endorsement_no' => $arrayData['endorsement_no'] ?? null,
|
|
||||||
'cd_ac_no' => $arrayData['cd_ac_no'] ?? null,
|
|
||||||
'insurer_id' => $insurer_id['insurer_id'],
|
|
||||||
'description' => $description,
|
|
||||||
'transaction_type' => 'Debit',
|
|
||||||
'updated_by' => $arrayData['user_id'],
|
|
||||||
'is_active' => 1,
|
|
||||||
];
|
|
||||||
$response = DepositHelper::saveDeposit($data, $arrayData['user_id']);
|
|
||||||
return true;
|
return true;
|
||||||
// print_r($response);
|
|
||||||
// $query = $this->employeePolicyModel->getLastQuery();
|
|
||||||
// echo $query . "<br>";
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
@ -3815,32 +3832,49 @@ class EmpDataServiceController extends BaseController
|
|||||||
|
|
||||||
if (!empty($arrayData)) {
|
if (!empty($arrayData)) {
|
||||||
|
|
||||||
$amount = $this->employeePolicyModel->query("
|
$client_branch_data = $this->clientBranchModel->where('id', $arrayData['client_branch_id'])->first();
|
||||||
SELECT SUM(rata_premimum + gst) AS total_sum
|
$units = json_decode($client_branch_data['units']);
|
||||||
FROM employee_polices
|
|
||||||
WHERE id IN (" . implode(',', $arrayData['employeeIds']) . ")
|
|
||||||
")->getRow();
|
|
||||||
|
|
||||||
$insurer_id = $this->clientPolicyModel->where('id', $arrayData['client_policy_id'])->first();
|
foreach($units as $unit)
|
||||||
$description = 'The following amount of ' . round($amount->total_sum, 2) . ' has been credited for the ' . $arrayData['count'] . ' employees at ' . remove_underscore_capitalize_first_letter($arrayData['event']) . ' to ' . remove_underscore_capitalize_first_letter($arrayData['policy_name']) . '.';
|
{
|
||||||
|
|
||||||
$data = [
|
$amount = $this->employeePolicyModel->query("
|
||||||
|
SELECT SUM(rata_premimum + gst) AS total_sum
|
||||||
|
FROM employee_polices
|
||||||
|
JOIN employees ON employees.id = employee_polices.employee_id
|
||||||
|
WHERE employees.unit = '$unit'
|
||||||
|
AND id IN (" . implode(',', $arrayData['employeeIds']) . ")
|
||||||
|
")->getRow();
|
||||||
|
|
||||||
|
if($amount){
|
||||||
|
|
||||||
|
$insurer_id = $this->clientPolicyModel->where('id', $arrayData['client_policy_id'])->first();
|
||||||
|
$description = 'The following amount of ' . round($amount->total_sum, 2) . ' has been credited for the ' . $arrayData['count'] . ' employees at ' . remove_underscore_capitalize_first_letter($arrayData['event_name']) . ' to ' . remove_underscore_capitalize_first_letter($arrayData['policy_name']) . '.';
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
|
||||||
|
'amount' => $amount->total_sum,
|
||||||
|
'sub_type_id' => 4,
|
||||||
|
'client_id' => $arrayData['client_id'],
|
||||||
|
'client_policy_id' => $arrayData['client_policy_id'],
|
||||||
|
'endorsement_no' => $arrayData['endorsement_no'] ?? null,
|
||||||
|
'cd_ac_no' => $arrayData['cd_ac_no'] ?? null,
|
||||||
|
'insurer_id' => $insurer_id['insurer_id'],
|
||||||
|
'unit' => $unit,
|
||||||
|
'description' => $description,
|
||||||
|
'transaction_type' => 'Debit',
|
||||||
|
'updated_by' => $arrayData['user_id'],
|
||||||
|
'event_name' => $arrayData['event_name'],
|
||||||
|
'is_active' => 1,
|
||||||
|
];
|
||||||
|
|
||||||
|
$response = DepositHelper::saveDeposit($data, $arrayData['user_id']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$msg = "SI Enhancement Cash Deposite Updated Successfully ";
|
||||||
|
return [$msg];
|
||||||
|
|
||||||
'amount' => $amount->total_sum,
|
|
||||||
'sub_type_id' => 4,
|
|
||||||
'client_id' => $arrayData['client_id'],
|
|
||||||
'client_policy_id' => $arrayData['client_policy_id'],
|
|
||||||
'endorsement_no' => $arrayData['endorsement_no'] ?? null,
|
|
||||||
'cd_ac_no' => $arrayData['cd_ac_no'] ?? null,
|
|
||||||
'insurer_id' => $insurer_id['insurer_id'],
|
|
||||||
'description' => $description,
|
|
||||||
'transaction_type' => 'Debit',
|
|
||||||
'updated_by' => $arrayData['user_id'],
|
|
||||||
'is_active' => 1,
|
|
||||||
];
|
|
||||||
$response = DepositHelper::saveDeposit($data, $arrayData['user_id']);
|
|
||||||
$msg = "SI Enhancement Cash Deposite Updated Successfully -- " . $description;
|
|
||||||
return [$msg, $response];
|
|
||||||
// print_r($response);
|
// print_r($response);
|
||||||
// $query = $this->employeePolicyModel->getLastQuery();
|
// $query = $this->employeePolicyModel->getLastQuery();
|
||||||
// echo $query . "<br>";
|
// echo $query . "<br>";
|
||||||
@ -3858,34 +3892,46 @@ class EmpDataServiceController extends BaseController
|
|||||||
|
|
||||||
// echo '<pre>';
|
// echo '<pre>';
|
||||||
// print_r($arrayData); die;
|
// print_r($arrayData); die;
|
||||||
$amount = $this->employeePolicyModel->query("
|
|
||||||
SELECT SUM(rata_premimum + gst) AS total_sum
|
|
||||||
FROM employee_polices
|
|
||||||
WHERE id IN (" . implode(',', $arrayData['employeeIds']) . ")
|
|
||||||
")->getRow();
|
|
||||||
|
|
||||||
$insurer_id = $this->clientPolicyModel->where('id', $arrayData['client_policy_id'])->first();
|
$client_branch_data = $this->clientBranchModel->where('id', $arrayData['client_branch_id'])->first();
|
||||||
$description = 'The following amount of ' . round($amount->total_sum, 2) . ' has been credited for the ' . $arrayData['count'] . ' employees at ' . remove_underscore_capitalize_first_letter($arrayData['event']) . ' to ' . remove_underscore_capitalize_first_letter($arrayData['policy_name']) . '.';
|
$units = json_decode($client_branch_data['units']);
|
||||||
|
|
||||||
$data = [
|
foreach($units as $unit) {
|
||||||
|
|
||||||
'amount' => $amount->total_sum,
|
$amount = $this->employeePolicyModel->query("
|
||||||
'sub_type_id' => 3,
|
SELECT SUM(rata_premimum + gst) AS total_sum
|
||||||
'client_id' => $arrayData['client_id'],
|
FROM employee_polices
|
||||||
'client_policy_id' => $arrayData['client_policy_id'],
|
JOIN employees ON employees.id = employee_polices.employee_id
|
||||||
'endorsement_no' => $arrayData['endorsement_no'] ?? null,
|
WHERE employees.unit = '$unit'
|
||||||
'cd_ac_no' => $arrayData['cd_ac_no'] ?? null,
|
AND id IN (" . implode(',', $arrayData['employeeIds']) . ")
|
||||||
'insurer_id' => $insurer_id['insurer_id'],
|
")->getRow();
|
||||||
'description' => $description,
|
|
||||||
'transaction_type' => 'Credit',
|
if($amount){
|
||||||
'updated_by' => $arrayData['user_id'],
|
|
||||||
'is_active' => 1,
|
|
||||||
];
|
|
||||||
$response = DepositHelper::saveDeposit($data, $arrayData['user_id']);
|
|
||||||
$msg = "Deletion Cash Deposite Updated Successfully -- " . $description;
|
|
||||||
return [$msg, $response];
|
|
||||||
|
|
||||||
return true;
|
$insurer_id = $this->clientPolicyModel->where('id', $arrayData['client_policy_id'])->first();
|
||||||
|
$description = 'The following amount of ' . round($amount->total_sum, 2) . ' has been credited for the ' . $arrayData['count'] . ' employees at ' . remove_underscore_capitalize_first_letter($arrayData['event_name']) . ' to ' . remove_underscore_capitalize_first_letter($arrayData['policy_name']) . '.';
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
|
||||||
|
'amount' => $amount->total_sum,
|
||||||
|
'sub_type_id' => 3,
|
||||||
|
'client_id' => $arrayData['client_id'],
|
||||||
|
'client_policy_id' => $arrayData['client_policy_id'],
|
||||||
|
'endorsement_no' => $arrayData['endorsement_no'] ?? null,
|
||||||
|
'cd_ac_no' => $arrayData['cd_ac_no'] ?? null,
|
||||||
|
'insurer_id' => $insurer_id['insurer_id'],
|
||||||
|
'description' => $description,
|
||||||
|
'transaction_type' => 'Credit',
|
||||||
|
'updated_by' => $arrayData['user_id'],
|
||||||
|
'event_name' => $arrayData['event_name'],
|
||||||
|
'is_active' => 1,
|
||||||
|
];
|
||||||
|
|
||||||
|
$response = DepositHelper::saveDeposit($data, $arrayData['user_id']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$msg = "Deletion Cash Deposite Updated Successfully -- ";
|
||||||
|
return [$msg];
|
||||||
// print_r($response);
|
// print_r($response);
|
||||||
// $query = $this->employeePolicyModel->getLastQuery();
|
// $query = $this->employeePolicyModel->getLastQuery();
|
||||||
// echo $query . "<br>";
|
// echo $query . "<br>";
|
||||||
@ -4062,12 +4108,9 @@ class EmpDataServiceController extends BaseController
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function readExcelToArray($file)
|
public function readExcelToArray($file)
|
||||||
{
|
{
|
||||||
if ($file->isValid() && !$file->hasMoved()) {
|
if ($file->isValid() && !$file->hasMoved()) {
|
||||||
@ -4102,8 +4145,6 @@ class EmpDataServiceController extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function insertBatchFileAndBatchListForImportExcel($data, $ids)
|
public function insertBatchFileAndBatchListForImportExcel($data, $ids)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -4126,7 +4167,6 @@ class EmpDataServiceController extends BaseController
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function sendMailForDownloadingECard(array $ids)
|
public function sendMailForDownloadingECard(array $ids)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -4283,7 +4323,6 @@ class EmpDataServiceController extends BaseController
|
|||||||
|
|
||||||
public function getDataByFileId($file_id, $status = 'success')
|
public function getDataByFileId($file_id, $status = 'success')
|
||||||
{
|
{
|
||||||
|
|
||||||
$data = $this->batchFileModel
|
$data = $this->batchFileModel
|
||||||
->select('batch_files.*, clients.client_name, clients.short_name, policy_type.policy_type as policy_name, client_branch.branch_name')
|
->select('batch_files.*, clients.client_name, clients.short_name, policy_type.policy_type as policy_name, client_branch.branch_name')
|
||||||
->join('clients', 'clients.id = batch_files.client_id')
|
->join('clients', 'clients.id = batch_files.client_id')
|
||||||
@ -4293,7 +4332,6 @@ class EmpDataServiceController extends BaseController
|
|||||||
->where('batch_files.id', $file_id)
|
->where('batch_files.id', $file_id)
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
|
|
||||||
if($status == 'success'){
|
if($status == 'success'){
|
||||||
|
|
||||||
$msg_txt = $data['client_name'] . '( ' . $data['branch_name'] . ' )' . ' - ' . $data['policy_name'] . ' - ' . $data['event_type'] . ' - ' . $data['actions'] . ' - ' . $data['insurer_or_tpa'];
|
$msg_txt = $data['client_name'] . '( ' . $data['branch_name'] . ' )' . ' - ' . $data['policy_name'] . ' - ' . $data['event_type'] . ' - ' . $data['actions'] . ' - ' . $data['insurer_or_tpa'];
|
||||||
@ -4313,8 +4351,6 @@ class EmpDataServiceController extends BaseController
|
|||||||
|
|
||||||
public function setPullNotification($data)
|
public function setPullNotification($data)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
$array = ['message_text' => $data['msg_txt'], 'action_url' => $data['url'], 'msg_status' => $data['status'], 'msg_title' => $data['title']];
|
$array = ['message_text' => $data['msg_txt'], 'action_url' => $data['url'], 'msg_status' => $data['status'], 'msg_title' => $data['title']];
|
||||||
$jsonEncodeData = json_encode($array);
|
$jsonEncodeData = json_encode($array);
|
||||||
|
|
||||||
@ -4327,66 +4363,37 @@ class EmpDataServiceController extends BaseController
|
|||||||
'message_type' => '1to1',
|
'message_type' => '1to1',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
$this->messageModel->insert($msg_data);
|
$this->messageModel->insert($msg_data);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function updatajson()
|
public function updatajson()
|
||||||
{
|
{
|
||||||
|
|
||||||
// $columns = [
|
// $columns = [
|
||||||
// ["column_index" => 0, "column_name" => "MEMBERID / EMPID", "db_column_name" => "emp_code"],
|
// ["column_index" => 0, "column_name" => "SR NO", "db_column_name" => 'index'],
|
||||||
// ["column_index" => 1, "column_name" => "UHID", "db_column_name" => "uhid"],
|
// ["column_index" => 1, "column_name" => "EmployeeId", "db_column_name" => "emp_code"],
|
||||||
// ["column_index" => 2, "column_name" => "GRADE", "db_column_name" => null],
|
// ["column_index" => 2, "column_name" => "UHID", "db_column_name" => "uhid"],
|
||||||
// ["column_index" => 3, "column_name" => "DOJ", "db_column_name" => "emp_doj"],
|
// ["column_index" => 3, "column_name" => "DOJ", "db_column_name" => "emp_doj"],
|
||||||
// ["column_index" => 4, "column_name" => "INSURED NAME", "db_column_name" => "insured_name"],
|
// ["column_index" => 4, "column_name" => "Name OF Insured", "db_column_name" => "emp_name"],
|
||||||
// ["column_index" => 5, "column_name" => "ADDRESS 1", "db_column_name" => null],
|
// ["column_index" => 5, "column_name" => "Age", "db_column_name" => "emp_age"],
|
||||||
// ["column_index" => 6, "column_name" => "ADDRESS 2", "db_column_name" => null],
|
// ["column_index" => 6, "column_name" => "Gender", "db_column_name" => "emp_gender"],
|
||||||
// ["column_index" => 7, "column_name" => "CITY", "db_column_name" => null],
|
// ["column_index" => 7, "column_name" => "DOC", "db_column_name" => null],
|
||||||
// ["column_index" => 8, "column_name" => "STATE", "db_column_name" => null],
|
// ["column_index" => 8, "column_name" => "TOTALSI", "db_column_name" => "basic_cover_si"],
|
||||||
// ["column_index" => 9, "column_name" => "PINCODE", "db_column_name" => null],
|
// ["column_index" => 9, "column_name" => "DOS", "db_column_name" => "dateofexit"],
|
||||||
// ["column_index" => 10, "column_name" => "Age", "db_column_name" => "emp_age"],
|
// ["column_index" => 10, "column_name" => "Mobile", "db_column_name" => 'emp_mobile'],
|
||||||
// ["column_index" => 11, "column_name" => "DOB", "db_column_name" => "emp_dob"],
|
// ["column_index" => 11, "column_name" => "EmailID", "db_column_name" => 'emp_email_c'],
|
||||||
// ["column_index" => 12, "column_name" => "RELATION SHIP", "db_column_name" => "emp_relationship"],
|
// ["column_index" => 12, "column_name" => "REMARKS", "db_column_name" => "remarks"],
|
||||||
// ["column_index" => 13, "column_name" => "Gender", "db_column_name" => "emp_gender"],
|
// ["column_index" => 13, "column_name" => "FLAG STATUS", "db_column_name" => null],
|
||||||
// ["column_index" => 14, "column_name" => "DOC", "db_column_name" => "doc"],
|
// ["column_index" => 14, "column_name" => "EXCEPTIONS", "db_column_name" => null],
|
||||||
// ["column_index" => 15, "column_name" => "DOE", "db_column_name" => "doe"],
|
// ["column_index" => 15, "column_name" => "ABHA", "db_column_name" => null]
|
||||||
// ["column_index" => 16, "column_name" => "SUM INSURED", "db_column_name" => "basic_cover_si"],
|
|
||||||
// ["column_index" => 17, "column_name" => "PROPOSER NAME", "db_column_name" => null],
|
|
||||||
// ["column_index" => 18, "column_name" => "DOS", "db_column_name" => "dos"],
|
|
||||||
// ["column_index" => 19, "column_name" => "MOBILE NO", "db_column_name" => null],
|
|
||||||
// ["column_index" => 20, "column_name" => "EMAIL ID", "db_column_name" => null],
|
|
||||||
// ["column_index" => 21, "column_name" => "FATHER/HUSBAND NAME", "db_column_name" => null],
|
|
||||||
// ["column_index" => 22, "column_name" => "REMARKS", "db_column_name" => null],
|
|
||||||
// ["column_index" => 23, "column_name" => "FLAG STATUS", "db_column_name" => "flag_status"],
|
|
||||||
// ["column_index" => 24, "column_name" => "EXCEPTIONS", "db_column_name" => "exceptions"],
|
|
||||||
// ["column_index" => 25, "column_name" => "ABHA", "db_column_name" => null]
|
|
||||||
// ];
|
|
||||||
|
|
||||||
// $columns = [
|
|
||||||
// ["column_index" => 0, "column_name" => "Sr.No", "db_column_name" => "index"],
|
|
||||||
// ["column_index" => 1, "column_name" => "Tata Aig Ref. No", "db_column_name" => "uhid"],
|
|
||||||
// ["column_index" => 2, "column_name" => "EMP ID", "db_column_name" => "emp_code"],
|
|
||||||
// ["column_index" => 3, "column_name" => "Name of Insured", "db_column_name" => "emp_name"],
|
|
||||||
// ["column_index" => 4, "column_name" => "GC Current Details", "db_column_name" => "old_value"],
|
|
||||||
// ["column_index" => 5, "column_name" => "Modified Details", "db_column_name" => "new_value"],
|
|
||||||
// ["column_index" => 6, "column_name" => "Revision W.E.F (DD/MM/YYYY)", "db_column_name" => null],
|
|
||||||
// ["column_index" => 7, "column_name" => "NEW TTD", "db_column_name" => null],
|
|
||||||
// ["column_index" => 8, "column_name" => "New Category's", "db_column_name" => null],
|
|
||||||
// ["column_index" => 9, "column_name" => "Remarks", "db_column_name" => "remarks"],
|
|
||||||
// ["column_index" => 10, "column_name" => "DOC", "db_column_name" => null],
|
|
||||||
// ["column_index" => 11, "column_name" => "Errors", "db_column_name" => null]
|
|
||||||
// ];
|
// ];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// $json = json_encode($columns);
|
// $json = json_encode($columns);
|
||||||
// $this->excelExportTemplateModel->where('id', 31)->set('jsoncolumns', $json)->update();
|
// $this->excelExportTemplateModel->where('id', 37)->set('jsoncolumns', $json)->update();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,6 +7,8 @@ use CodeIgniter\HTTP\RequestInterface;
|
|||||||
use CodeIgniter\HTTP\ResponseInterface;
|
use CodeIgniter\HTTP\ResponseInterface;
|
||||||
use Psr\Log\LoggerInterface;
|
use Psr\Log\LoggerInterface;
|
||||||
|
|
||||||
|
use App\Helpers\DepositHelper;
|
||||||
|
|
||||||
|
|
||||||
use App\Models\EmployeeModel;
|
use App\Models\EmployeeModel;
|
||||||
use App\Models\EmployeePolicyModel;
|
use App\Models\EmployeePolicyModel;
|
||||||
@ -21,6 +23,7 @@ use App\Models\ClientPolicyModel;
|
|||||||
use App\Models\TPAModel;
|
use App\Models\TPAModel;
|
||||||
use App\Models\InsurerExcelExportTemplateModel;
|
use App\Models\InsurerExcelExportTemplateModel;
|
||||||
use App\Models\InsurerModel;
|
use App\Models\InsurerModel;
|
||||||
|
use App\Models\ClientDepositModel;
|
||||||
|
|
||||||
|
|
||||||
use App\Controllers\Jobs;
|
use App\Controllers\Jobs;
|
||||||
@ -58,6 +61,7 @@ class EmployeeController extends AdminController
|
|||||||
protected $policiesModel;
|
protected $policiesModel;
|
||||||
protected $excelExportTemplateModel;
|
protected $excelExportTemplateModel;
|
||||||
protected $insurerModel;
|
protected $insurerModel;
|
||||||
|
protected $cashDepositModel;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
@ -76,13 +80,14 @@ class EmployeeController extends AdminController
|
|||||||
$this->TPAModel = new TPAModel();
|
$this->TPAModel = new TPAModel();
|
||||||
$this->policiesModel = new PolicesModel();
|
$this->policiesModel = new PolicesModel();
|
||||||
$this->insurerModel = new InsurerModel();
|
$this->insurerModel = new InsurerModel();
|
||||||
|
$this->cashDepositModel = new ClientDepositModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function list()
|
public function list()
|
||||||
{
|
{
|
||||||
// $model = new UserModel();
|
// $model = new UserModel();
|
||||||
$data = [];
|
$data = [];
|
||||||
$data['status'] = ['draft' => 'Draft', 'active' => 'Active', 'inactive' => 'In-Active', 'expired' => 'Expired'];
|
$data['status'] = ['draft' => 'Draft', 'active' => 'Active', 'inactive' => 'In-Active', 'pending' => 'Pending'];
|
||||||
if (count($this->request->getGet())) {
|
if (count($this->request->getGet())) {
|
||||||
$filterData = $this->request->getGet();
|
$filterData = $this->request->getGet();
|
||||||
$data['employees'] = $this->employeePolicyModel->getEmployeePolicy(
|
$data['employees'] = $this->employeePolicyModel->getEmployeePolicy(
|
||||||
@ -247,7 +252,7 @@ class EmployeeController extends AdminController
|
|||||||
|
|
||||||
|
|
||||||
//for TPA/insurer upload
|
//for TPA/insurer upload
|
||||||
$data['events'] = ['inception' => 'Inception (Employee + Dependents)', 'addition' => 'Addition (Employee + Dependents)', 'dependent_addition' => 'Dependent Addition (Only Dependents)', 'deletion' => 'Deletion', 'correction' => 'Correction', 'si_enhancement' => 'SI Enhancement'];
|
$data['events'] = ['inception' => 'Inception (Employee + Dependents)', 'missed_inception' => 'Missed Inception (Employee + Dependents)', 'addition' => 'Addition (Employee + Dependents)', 'dependent_addition' => 'Dependent Addition (Only Dependents)', 'deletion' => 'Deletion', 'correction' => 'Correction', 'si_enhancement' => 'SI Enhancement'];
|
||||||
//for inception upload
|
//for inception upload
|
||||||
$data['actions'] = ['inception' => 'Inception (Employee + Dependents)', 'missed_inception' => 'Missed Inception (Employee + Dependents)', 'addition' => 'Addition (Employee + Dependents)', 'dependent_addtion' => 'Dependent Addition (Only Dependents)', 'deletion' => 'Deletion', 'correction' => 'Correction', 'si_enhancement' => 'SI Enhancement','enrollment' => 'Enrollment'];
|
$data['actions'] = ['inception' => 'Inception (Employee + Dependents)', 'missed_inception' => 'Missed Inception (Employee + Dependents)', 'addition' => 'Addition (Employee + Dependents)', 'dependent_addtion' => 'Dependent Addition (Only Dependents)', 'deletion' => 'Deletion', 'correction' => 'Correction', 'si_enhancement' => 'SI Enhancement','enrollment' => 'Enrollment'];
|
||||||
|
|
||||||
@ -433,7 +438,7 @@ class EmployeeController extends AdminController
|
|||||||
|
|
||||||
if ($actions == 'export') {
|
if ($actions == 'export') {
|
||||||
|
|
||||||
if ($event_type == 'inception' || $event_type == 'addition' || $event_type == 'dependent_addition') {
|
if ($event_type == 'inception' || $event_type == 'addition' || $event_type == 'dependent_addition' || $event_type == 'missed_inception') {
|
||||||
|
|
||||||
$return = $empDataServiceController->generateExcelForAdditionandInception($batch_data);
|
$return = $empDataServiceController->generateExcelForAdditionandInception($batch_data);
|
||||||
|
|
||||||
@ -555,7 +560,7 @@ class EmployeeController extends AdminController
|
|||||||
$batch_data['status'] = 'pending';
|
$batch_data['status'] = 'pending';
|
||||||
$batch_data['file_name'] = $filename;
|
$batch_data['file_name'] = $filename;
|
||||||
|
|
||||||
if ($event_type == 'inception' || $event_type == 'addition' || $event_type == 'dependent_addition') {
|
if ($event_type == 'inception' || $event_type == 'addition' || $event_type == 'dependent_addition' || $event_type == 'missed_inception') {
|
||||||
|
|
||||||
$file_id = $this->batchFileModel->insert($batch_data);
|
$file_id = $this->batchFileModel->insert($batch_data);
|
||||||
|
|
||||||
@ -680,8 +685,15 @@ class EmployeeController extends AdminController
|
|||||||
$branch_list = $this->clientBranchModel->findAll();
|
$branch_list = $this->clientBranchModel->findAll();
|
||||||
$data['client_list'] = $client_list;
|
$data['client_list'] = $client_list;
|
||||||
$data['branch_list'] = $branch_list;
|
$data['branch_list'] = $branch_list;
|
||||||
$this->myLogger->logme('error', 'list called');
|
|
||||||
$this->loadLayout('enrollment_list', $data);
|
// Get session data if available
|
||||||
|
$data['selected_client_id'] = session()->get('client_id');
|
||||||
|
$data['selected_branch_id'] = session()->get('branch_id');
|
||||||
|
$data['selected_type'] = session()->get('type');
|
||||||
|
|
||||||
|
$this->myLogger->logme('error', 'list called');
|
||||||
|
return $this->loadLayout('enrollment_list', $data);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function empby_client_clientbranch($client_id, $branch_id)
|
public function empby_client_clientbranch($client_id, $branch_id)
|
||||||
@ -724,7 +736,7 @@ class EmployeeController extends AdminController
|
|||||||
$employeeId = $row['employee_id'];
|
$employeeId = $row['employee_id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return json_encode($groupedData);
|
return json_encode($groupedData);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -811,7 +823,6 @@ class EmployeeController extends AdminController
|
|||||||
return redirect()->to(base_url('/employee/upload'));
|
return redirect()->to(base_url('/employee/upload'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function downloadFileList($file_id = null)
|
public function downloadFileList($file_id = null)
|
||||||
{
|
{
|
||||||
// $actionType = $this->request->getGet();
|
// $actionType = $this->request->getGet();
|
||||||
@ -845,7 +856,6 @@ class EmployeeController extends AdminController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function featchEmpList()
|
public function featchEmpList()
|
||||||
{
|
{
|
||||||
$client_id = $this->request->getGet('client_id');
|
$client_id = $this->request->getGet('client_id');
|
||||||
@ -857,7 +867,6 @@ class EmployeeController extends AdminController
|
|||||||
return $this->respond(['dataStatus' => true, 'code' => 200, 'data' => $html], 200);
|
return $this->respond(['dataStatus' => true, 'code' => 200, 'data' => $html], 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function viewUploadedEmployeeList()
|
public function viewUploadedEmployeeList()
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -906,7 +915,6 @@ class EmployeeController extends AdminController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getEmpCount($id = null)
|
public function getEmpCount($id = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -921,7 +929,6 @@ class EmployeeController extends AdminController
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function downloadFullExcelErrorFile($file_id, $rowIndex = 1, $colIndex = 1)
|
public function downloadFullExcelErrorFile($file_id, $rowIndex = 1, $colIndex = 1)
|
||||||
{
|
{
|
||||||
// Get file data from the database
|
// Get file data from the database
|
||||||
@ -1155,115 +1162,56 @@ class EmployeeController extends AdminController
|
|||||||
{
|
{
|
||||||
|
|
||||||
// $this->loadLayout('ecard_template/default_ecard');
|
// $this->loadLayout('ecard_template/default_ecard');
|
||||||
|
|
||||||
$empDataServiceController = new EmpDataServiceController();
|
|
||||||
$file_name = generate_filename("TCS", 'inception', 'export', 'insurer', 'policy', 'branch');
|
|
||||||
|
|
||||||
$export_data = [
|
|
||||||
'client_id' => 12,
|
|
||||||
'client_policy_id' => 12,
|
|
||||||
'client_branch_id' => 1,
|
|
||||||
'insurer_or_tpa' => 'insurer',
|
|
||||||
'event_type' => 'inception',
|
|
||||||
'actions' => 'export',
|
|
||||||
'file_name' => $file_name,
|
|
||||||
];
|
|
||||||
|
|
||||||
$template_json = $this->clientPolicyModel
|
|
||||||
->select('insurer_excel_export_template.jsoncolumns')
|
|
||||||
->join('insurer_excel_export_template', 'insurer_excel_export_template.insurer_id = client_policy.insurer_id and insurer_excel_export_template.policy_type_id = client_policy.policy_type_id')
|
|
||||||
->where('client_policy.id', $export_data['client_policy_id'])
|
|
||||||
->where('insurer_excel_export_template.event_name', $export_data['event_type'])
|
|
||||||
->where('insurer_excel_export_template.type_name', $export_data['actions'])
|
|
||||||
->first();
|
|
||||||
|
|
||||||
$template_array = json_decode($template_json['jsoncolumns'], true);
|
|
||||||
|
|
||||||
// dd($template_array);
|
|
||||||
|
|
||||||
$objects = $this->employeePolicyModel->getInceptionEmployeeDataForExportExcel($export_data);
|
|
||||||
|
|
||||||
$totals = 0;
|
|
||||||
foreach ($objects as $item) {
|
|
||||||
$totals += $item->total;
|
|
||||||
}
|
|
||||||
|
|
||||||
dd($objects, $totals);
|
|
||||||
|
|
||||||
$excel_data_info = generate_insurer_based_excel($template_array, $objects);
|
|
||||||
|
|
||||||
// Generate Excel file
|
|
||||||
$tempFile = tmpfile();
|
|
||||||
$success = generate_excel($excel_data_info['header'], $excel_data_info['data'], $tempFile, 1);
|
|
||||||
|
|
||||||
// If Excel generation is successful
|
|
||||||
if ($success) {
|
|
||||||
|
|
||||||
$random_number_count = 4;
|
|
||||||
$export_data['batch_code'] = generate_random_string($random_number_count);
|
|
||||||
$export_data['created_by'] = get_session_userid();
|
|
||||||
|
|
||||||
$insert = $this->batchFileModel->insert($export_data);
|
|
||||||
$batch_file_batch_code = $this->batchFileModel->where('id', $insert)->first();
|
|
||||||
$batch_code = $batch_file_batch_code['batch_code'];
|
|
||||||
|
|
||||||
// $this->insertBatchList(['batch_code' => $batch_code, 'batch_list_data' => $objects ]);
|
|
||||||
|
|
||||||
$job_details = new Jobs();
|
|
||||||
$r = Jobs::addJob(['job_name' => 'insertBatchList', 'payload' => ['batch_code' => $batch_code, 'user_id' => get_session_userid(), 'batch_list_data' => $objects]]);
|
|
||||||
|
|
||||||
|
|
||||||
// If batch operation is successful
|
|
||||||
if (true) {
|
|
||||||
|
|
||||||
// Clear the output buffer to avoid any unwanted output
|
|
||||||
if (ob_get_level()) {
|
|
||||||
ob_end_clean();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set headers for Excel file download
|
|
||||||
header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
|
|
||||||
header('Content-Disposition: attachment; filename="' . $export_data['file_name'] . '"');
|
|
||||||
header('Content-Transfer-Encoding: binary');
|
|
||||||
header('Cache-Control: must-revalidate');
|
|
||||||
header('Pragma: public');
|
|
||||||
header('Expires: 0');
|
|
||||||
|
|
||||||
// Output file contents
|
|
||||||
rewind($tempFile);
|
|
||||||
fpassthru($tempFile);
|
|
||||||
|
|
||||||
// Close and remove temporary file
|
|
||||||
fclose($tempFile);
|
|
||||||
|
|
||||||
return true; // Excel file successfully generated and exported
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
return false; // Batch operation failed
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'employeeIds' => [6,8,10],
|
||||||
|
'client_id' => 12,
|
||||||
|
'client_policy_id' => 12,
|
||||||
|
'client_branch_id' => 1,
|
||||||
|
'cd_ac_no' => '34567834567892',
|
||||||
|
'endorsement_no' => null,
|
||||||
|
'count' => 3,
|
||||||
|
'event_name' =>'inception',
|
||||||
|
'policy_name' => 'new policy',
|
||||||
|
'user_id' => 1,
|
||||||
|
];
|
||||||
|
|
||||||
|
$empDataServiceController = new EmpDataServiceController();
|
||||||
|
$empData= $empDataServiceController->cashDepositCalculationForInception($data);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function truncateFileData() //truncateFileDataIn DB (de activate rows)
|
//truncateFileDataIn DB (de activate rows)
|
||||||
|
public function truncateFileData($file_id, $role_id = null)
|
||||||
{
|
{
|
||||||
$file_id = $this->request->uri->getSegment(3);
|
$file_id = $this->request->uri->getSegment(3);
|
||||||
// $file_id = 112;
|
// $file_id = 112;
|
||||||
$file = $this->fileModel->find($file_id);
|
$file = $this->fileModel->find($file_id);
|
||||||
|
$client_id = $file['client_id'];
|
||||||
|
$client_policy_id = $file['policy_id'];
|
||||||
|
$loggedInUserID = get_session_userid();
|
||||||
|
|
||||||
|
$policy_data = $this->clientPolicyModel->where('id', $client_policy_id)->first();
|
||||||
|
$cd_tranction = $this->cashDepositModel
|
||||||
|
->where('client_id', $client_id)
|
||||||
|
->where('insurer_id', $policy_data['insurer_id'])
|
||||||
|
->where('event_name',$file['action'])
|
||||||
|
->where('client_policy_id', $client_policy_id)
|
||||||
|
->orderBy('id', 'desc')
|
||||||
|
->first();
|
||||||
|
|
||||||
// $file['action'] = 'si_enhancement';
|
// $file['action'] = 'si_enhancement';
|
||||||
// $result = [];
|
// $result = [];
|
||||||
// !dd($file);
|
// !dd($file);
|
||||||
if ($file['action'] == 'inception' || $file['action'] == 'dependent_addition' || $file['action'] == 'addition') {
|
if ($file['action'] == 'inception' || $file['action'] == 'dependent_addition' || $file['action'] == 'addition') {
|
||||||
$result = $this->employeeModel->getEmpListByFileId(file_id: $file_id, emp_status: ['active'], policy_status: ['active']);
|
$result = $this->employeeModel->getEmpListByFileId(file_id: $file_id, emp_status: ['active'], policy_status: ['active']);
|
||||||
// ~dd($result);
|
// ~dd($result);
|
||||||
if (count($result)) {
|
if (count($result) && $role_id == null) {
|
||||||
return $this->respond(['dataStatus' => false, 'code' => 404, 'message' => 'File data already processed'], 200);
|
if(get_role_id() == 1 || get_role_id() == 5){
|
||||||
|
return $this->respond(['role' => get_role_id(), 'dataStatus' => false, 'code' => 404, 'message' => 'File data already processed. Do you want to truncate data from uploaded file?'], 200);
|
||||||
|
}else{
|
||||||
|
return $this->respond(['role' => get_role_id(), 'dataStatus' => false, 'code' => 404, 'message' => 'File data already processed'], 200);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
//update emp and emp plocies
|
//update emp and emp plocies
|
||||||
@ -1276,9 +1224,30 @@ class EmployeeController extends AdminController
|
|||||||
//update file status
|
//update file status
|
||||||
$this->fileModel->where('id', $file_id)->set(['status' => 'truncated'])->update();
|
$this->fileModel->where('id', $file_id)->set(['status' => 'truncated'])->update();
|
||||||
|
|
||||||
|
if($cd_tranction){
|
||||||
|
|
||||||
|
$cd_data = [
|
||||||
|
'amount' => $cd_tranction['amount'],
|
||||||
|
'sub_type_id' => 8,
|
||||||
|
'endorsement_no' => null,
|
||||||
|
'insurer_id' =>$policy_data['insurer_id'],
|
||||||
|
'description' => 'The policy Truncated by Admin or Head',
|
||||||
|
'transaction_type' => 'Credit',
|
||||||
|
'updated_by' => 1,
|
||||||
|
'client_id' => $client_id,
|
||||||
|
'client_policy_id' => $client_policy_id,
|
||||||
|
'cd_ac_no' => $policy_data['cd_ac_no'] ?? null,
|
||||||
|
'event_name' => $file['action'],
|
||||||
|
];
|
||||||
|
|
||||||
|
$response = DepositHelper::saveDeposit($cd_data, $loggedInUserID);
|
||||||
|
}
|
||||||
|
|
||||||
return $this->respond(['dataStatus' => true, 'code' => 200, 'data' => round($affectedRows / 2)], 200);
|
return $this->respond(['dataStatus' => true, 'code' => 200, 'data' => round($affectedRows / 2)], 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if ($file['action'] == 'si_enhancement' || $file['action'] == 'correction' || $file['action'] == 'deletion') {
|
} else if ($file['action'] == 'si_enhancement' || $file['action'] == 'correction' || $file['action'] == 'deletion') {
|
||||||
|
|
||||||
$res = $this->empEndorsementModel->select(['count(id) as count'])
|
$res = $this->empEndorsementModel->select(['count(id) as count'])
|
||||||
->where('emp_endorsement.file_id', $file_id)
|
->where('emp_endorsement.file_id', $file_id)
|
||||||
->groupStart()
|
->groupStart()
|
||||||
@ -1287,18 +1256,48 @@ class EmployeeController extends AdminController
|
|||||||
->groupEnd()
|
->groupEnd()
|
||||||
->get()
|
->get()
|
||||||
->getResult();
|
->getResult();
|
||||||
|
|
||||||
// print_r($this->empEndorsementModel->getLastQuery());
|
// print_r($this->empEndorsementModel->getLastQuery());
|
||||||
// echo $res[0]->count;die();
|
// echo $res[0]->count;die();
|
||||||
if ($res[0]->count == 0) {
|
if ($res[0]->count == 0 || $role_id == 5 || $role_id == 1) {
|
||||||
//update truncated status to db
|
//update truncated status to db
|
||||||
$this->empEndorsementModel->where('file_id', $file_id)
|
$this->empEndorsementModel->where('file_id', $file_id)
|
||||||
->set(['status' => 'truncated'])
|
->set(['status' => 'truncated'])
|
||||||
->update();
|
->update();
|
||||||
//update file status
|
//update file status
|
||||||
$this->fileModel->where('id', $file_id)->set(['status' => 'truncated'])->update();
|
$this->fileModel->where('id', $file_id)->set(['status' => 'truncated'])->update();
|
||||||
|
|
||||||
|
if($cd_tranction && $file['action'] != 'correction'){
|
||||||
|
|
||||||
|
$transaction_type = 'Credit';
|
||||||
|
if($file['action'] == 'deletion'){
|
||||||
|
$transaction_type = 'Debit';
|
||||||
|
}
|
||||||
|
|
||||||
|
$cd_data = [
|
||||||
|
'amount' => $cd_tranction['amount'],
|
||||||
|
'sub_type_id' => 8,
|
||||||
|
'endorsement_no' => null,
|
||||||
|
'insurer_id' =>$policy_data['insurer_id'],
|
||||||
|
'description' => 'The policy Truncated by Admin or Head',
|
||||||
|
'transaction_type' => $transaction_type,
|
||||||
|
'updated_by' => 1,
|
||||||
|
'client_id' => $client_id,
|
||||||
|
'client_policy_id' => $client_policy_id,
|
||||||
|
'cd_ac_no' => $policy_data['cd_ac_no'] ?? null,
|
||||||
|
'event_name' => $file['action'],
|
||||||
|
];
|
||||||
|
|
||||||
|
$response = DepositHelper::saveDeposit($cd_data, $loggedInUserID);
|
||||||
|
}
|
||||||
|
|
||||||
return $this->respond(['dataStatus' => true, 'code' => 200, 'data' => 'success'], 200);
|
return $this->respond(['dataStatus' => true, 'code' => 200, 'data' => 'success'], 200);
|
||||||
} else {
|
} else {
|
||||||
return $this->respond(['dataStatus' => false, 'code' => 404, 'message' => 'File data already processed'], 200);
|
if(get_role_id() == 1 || get_role_id() == 5){
|
||||||
|
return $this->respond(['role' => get_role_id(), 'dataStatus' => false, 'code' => 404, 'message' => 'File data already processed. Do you want to truncate data from uploaded file?'], 200);
|
||||||
|
}else{
|
||||||
|
return $this->respond(['dataStatus' => false, 'code' => 404, 'message' => 'File data already processed'], 200);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1363,8 +1363,10 @@ class EmployeeRestController extends AdminController
|
|||||||
$result = ' ';
|
$result = ' ';
|
||||||
foreach ($array as $key => $value) {
|
foreach ($array as $key => $value) {
|
||||||
if ($value > 0) {
|
if ($value > 0) {
|
||||||
if($value != 0 && $key ==='either-parents-pil') {
|
if($value == 1 && $key ==='either-parents-pil') {
|
||||||
$result .= ' + Either 2 Parents or 2 Parents in law';
|
$result .= ' + Either 2 Parents or 2 Parents in law';
|
||||||
|
}if($value == 2 && $key ==='either-parents-pil') {
|
||||||
|
$result .= ' + Any 2 of Parents and Parents in law';
|
||||||
}else if($value != 0 && $key ==='spouse') {
|
}else if($value != 0 && $key ==='spouse') {
|
||||||
$string = str_replace('-', ' ', $key);
|
$string = str_replace('-', ' ', $key);
|
||||||
$string = ucwords($string);
|
$string = ucwords($string);
|
||||||
@ -1373,11 +1375,15 @@ class EmployeeRestController extends AdminController
|
|||||||
$result = 'Can Add Self ';
|
$result = 'Can Add Self ';
|
||||||
}else if($value != 0 && $key ==='childrens') {
|
}else if($value != 0 && $key ==='childrens') {
|
||||||
if($value > 1){ $result .= ' + '.$value.' Children'; }else{ $result .= ' + '.$value.' Child'; }
|
if($value > 1){ $result .= ' + '.$value.' Children'; }else{ $result .= ' + '.$value.' Child'; }
|
||||||
|
}else if($value != 0 && $key ==='elders_count') {
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
$string = str_replace('-', ' ', $key);
|
$string = str_replace('-', ' ', $key);
|
||||||
$string = ucwords($string);
|
$string = ucwords($string);
|
||||||
$result .= ' + '.$value.' '.$string;
|
$result .= ' + '.$value.' '.$string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1874,7 +1880,7 @@ class EmployeeRestController extends AdminController
|
|||||||
{
|
{
|
||||||
$transformed_famility_details = transform_db_data_to_excel($family);
|
$transformed_famility_details = transform_db_data_to_excel($family);
|
||||||
// print_r($transformed_famility_details);die();
|
// print_r($transformed_famility_details);die();
|
||||||
$data = calculate_premimum($transformed_famility_details,$policy_terms,$slab_details,$file,$default_si);
|
$data = calculate_premium($transformed_famility_details,$policy_terms,$slab_details,$file,$default_si);
|
||||||
// dd($data);
|
// dd($data);
|
||||||
$employee_data_group_by_family[$emp_id] = $data;
|
$employee_data_group_by_family[$emp_id] = $data;
|
||||||
|
|
||||||
@ -2404,7 +2410,8 @@ class EmployeeRestController extends AdminController
|
|||||||
$firebase->send($message);
|
$firebase->send($message);
|
||||||
return $this->response->setJSON(['status' => 'success']);
|
return $this->response->setJSON(['status' => 'success']);
|
||||||
} catch (MessagingException $e) {
|
} catch (MessagingException $e) {
|
||||||
return $this->response->setJSON(['status' => 'error', 'message' => $e->getMessage()]);
|
//return $this->response->setJSON(['status' => 'error', 'message' => $e->getMessage()]);
|
||||||
|
log_message('error', $e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -4,6 +4,13 @@ namespace App\Controllers;
|
|||||||
|
|
||||||
|
|
||||||
use App\Models\JobModel;
|
use App\Models\JobModel;
|
||||||
|
use App\Models\ClientModel;
|
||||||
|
use App\Models\ClientPolicyModel;
|
||||||
|
use App\Models\NotificationModel;
|
||||||
|
use App\Models\EmployeePolicyModel;
|
||||||
|
|
||||||
|
use App\Helpers\sendMailNotification;
|
||||||
|
|
||||||
class JobWorker extends AdminController
|
class JobWorker extends AdminController
|
||||||
{
|
{
|
||||||
const STATUS_DONE = 'done';
|
const STATUS_DONE = 'done';
|
||||||
@ -323,6 +330,71 @@ class JobWorker extends AdminController
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static function enrollment_status() {
|
||||||
|
$clientModel = new ClientModel();
|
||||||
|
$clientPolicyModel = new ClientPolicyModel();
|
||||||
|
$notificationModel = new NotificationModel();
|
||||||
|
$employeePolicyModel = new EmployeePolicyModel();
|
||||||
|
$myLogger = \Config\Services::mylogger();
|
||||||
|
|
||||||
|
$client_policy_data = $clientPolicyModel->where('is_active', 1)
|
||||||
|
->where('policy_status', 1)
|
||||||
|
->where('inception_type', 2)
|
||||||
|
->findAll();
|
||||||
|
$currentDate = date('Y-m-d');
|
||||||
|
|
||||||
|
// Update policy status based on start and end dates
|
||||||
|
foreach ($client_policy_data as $client_policy) {
|
||||||
|
$id = $client_policy['id'];
|
||||||
|
|
||||||
|
if ($currentDate == $client_policy['policy_start_date']) {
|
||||||
|
$clientPolicyModel->update($id, ['open_for_enrollment' => 1]);
|
||||||
|
}
|
||||||
|
if ($client_policy['policy_end_date'] < $currentDate) {
|
||||||
|
$clientPolicyModel->update($id, ['open_for_enrollment' => 0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$reminder_whole_mail = [];
|
||||||
|
foreach ($client_policy_data as $client_policy) {
|
||||||
|
$employee = $employeePolicyModel->select('employees.*')
|
||||||
|
->join('employees', 'employee_polices.employee_id = employees.id', 'left')
|
||||||
|
->where('employee_polices.client_policy_id', $client_policy['id'])
|
||||||
|
->first();
|
||||||
|
$client_data = $clientModel->find($client_policy['client_id']);
|
||||||
|
$notification_data = $notificationModel->where('client_id', $client_policy['client_id'])
|
||||||
|
->where('template_name', 'member_reminder_mail')
|
||||||
|
->first();
|
||||||
|
|
||||||
|
if ($notification_data && $notification_data['enabled'] == 1 && $currentDate == $client_policy['reminder_date']) {
|
||||||
|
$params['emp_data'] = $employee;
|
||||||
|
$params['client_data'] = $client_data;
|
||||||
|
$params['notification_data'] = $notification_data;
|
||||||
|
$reminder_whole_mail[] = sendMailNotification::sendMailNotification('member_reminder_mail', $params);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Process and queue bulk emails
|
||||||
|
$temp_whole_data = [];
|
||||||
|
$count = 0;
|
||||||
|
foreach ($reminder_whole_mail as $whole_index => $values) {
|
||||||
|
foreach ($values as $index => $value) {
|
||||||
|
$temp_whole_data[] = $value;
|
||||||
|
$count++;
|
||||||
|
|
||||||
|
if ($count == 20 || ($whole_index == count($reminder_whole_mail) - 1 && $index == count($values) - 1)) {
|
||||||
|
if (!empty($temp_whole_data)) {
|
||||||
|
Jobs::addJob(['job_name' => 'bulk_mail', 'payload' => $temp_whole_data]);
|
||||||
|
$temp_whole_data = [];
|
||||||
|
$count = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return json_encode(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1062,10 +1062,9 @@ class MasterController extends AdminController
|
|||||||
//start CD Master list
|
//start CD Master list
|
||||||
public function CDMasterList()
|
public function CDMasterList()
|
||||||
{
|
{
|
||||||
|
|
||||||
$data['CD_Master_Data'] = $this->CDMasterModel->getCDMasterList();
|
$data['CD_Master_Data'] = $this->CDMasterModel->getCDMasterList();
|
||||||
$data['insurers'] = $this->insurerModel->findAll();
|
$data['insurers'] = $this->insurerModel->where('is_active', 1)->findAll();
|
||||||
$data['clients'] = $this->clientModel->findAll();
|
$data['clients'] = $this->clientModel->where('is_active', 1)->findAll();
|
||||||
$this->loadLayout('cd_master_list', $data);
|
$this->loadLayout('cd_master_list', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1157,7 +1156,12 @@ class MasterController extends AdminController
|
|||||||
public function getCDMasterDataByID($id = null)
|
public function getCDMasterDataByID($id = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
$cd_data = $this->CDMasterModel->where('id', $id)->first();
|
$cd_data = $this->CDMasterModel
|
||||||
|
->where('id', $id)
|
||||||
|
->where('is_active', 1)
|
||||||
|
->first();
|
||||||
|
|
||||||
|
// convert the date formate 2000-01-01 to 01-01-2000
|
||||||
$cd_data['opening_date'] = date('d-m-Y', strtotime($cd_data['opening_date']));
|
$cd_data['opening_date'] = date('d-m-Y', strtotime($cd_data['opening_date']));
|
||||||
|
|
||||||
if ($cd_data) {
|
if ($cd_data) {
|
||||||
@ -1169,7 +1173,10 @@ class MasterController extends AdminController
|
|||||||
|
|
||||||
public function checkUniqueCDAccountNumber($AccountNumber)
|
public function checkUniqueCDAccountNumber($AccountNumber)
|
||||||
{
|
{
|
||||||
$uniqueAC = $this->CDMasterModel->where('cd_ac_no', $AccountNumber)->findAll();
|
$uniqueAC = $this->CDMasterModel
|
||||||
|
->where('cd_ac_no', $AccountNumber)
|
||||||
|
->where('is_active', 1)
|
||||||
|
->findAll();
|
||||||
|
|
||||||
if($uniqueAC != null){
|
if($uniqueAC != null){
|
||||||
return $this->respond(['status' => true, 'message' => 'The CD Account Number is Already Exist', 'code' => 200], 200);
|
return $this->respond(['status' => true, 'message' => 'The CD Account Number is Already Exist', 'code' => 200], 200);
|
||||||
@ -1184,7 +1191,18 @@ class MasterController extends AdminController
|
|||||||
$this->myLogger->logme('error','CDMaster Remove function called');
|
$this->myLogger->logme('error','CDMaster Remove function called');
|
||||||
$data['updated_by'] = get_session_userid();
|
$data['updated_by'] = get_session_userid();
|
||||||
$data['is_active'] = 0;
|
$data['is_active'] = 0;
|
||||||
$update = $this->CDMasterModel->where('id', $id)->set($data)->update();
|
$cash_transaction_data = $this->CDMasterModel->where('id', $id)->first();
|
||||||
|
|
||||||
|
$update = $this->CDMasterModel->where('id', $id)->set($data)->update();
|
||||||
|
|
||||||
|
$cd_tranction_update = $this->clientDepositModel
|
||||||
|
->where('client_id', $cash_transaction_data['client_id'])
|
||||||
|
->where('insurer_id', $cash_transaction_data['insurer_id'])
|
||||||
|
->where('cd_ac_no', $cash_transaction_data['cd_ac_no'])
|
||||||
|
->where('sub_type', 7)
|
||||||
|
->set($data)
|
||||||
|
->update();
|
||||||
|
|
||||||
if($update){
|
if($update){
|
||||||
return $this->respond(['status' => true,'code' => 200], 200);
|
return $this->respond(['status' => true,'code' => 200], 200);
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@ -7,7 +7,6 @@ use CodeIgniter\HTTP\RequestInterface;
|
|||||||
use CodeIgniter\HTTP\ResponseInterface;
|
use CodeIgniter\HTTP\ResponseInterface;
|
||||||
use Psr\Log\LoggerInterface;
|
use Psr\Log\LoggerInterface;
|
||||||
|
|
||||||
use App\Helpers\DepositHelper;
|
|
||||||
use App\Helpers\MailHelper;
|
use App\Helpers\MailHelper;
|
||||||
use App\Helpers\sendMailNotification;
|
use App\Helpers\sendMailNotification;
|
||||||
|
|
||||||
@ -43,10 +42,10 @@ class PendingActionsController extends AdminController
|
|||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
//section
|
//session
|
||||||
set_session_context('PendingActionsController Called');
|
set_session_context('PendingActionsController Called');
|
||||||
|
|
||||||
//services
|
//log services
|
||||||
$this->myLogger = \Config\Services::mylogger();
|
$this->myLogger = \Config\Services::mylogger();
|
||||||
$this->db = \Config\Database::connect();
|
$this->db = \Config\Database::connect();
|
||||||
|
|
||||||
@ -60,7 +59,7 @@ class PendingActionsController extends AdminController
|
|||||||
$this->empEndorsementModel = new EmpEndorsementModel();
|
$this->empEndorsementModel = new EmpEndorsementModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//for AJAX
|
||||||
public function getPendingActions()
|
public function getPendingActions()
|
||||||
{
|
{
|
||||||
//get pending actions like inception, corrections,deletions,SI enhanccnement to users
|
//get pending actions like inception, corrections,deletions,SI enhanccnement to users
|
||||||
@ -71,12 +70,144 @@ class PendingActionsController extends AdminController
|
|||||||
$deletion = $this->getPendingActionForDeletion();
|
$deletion = $this->getPendingActionForDeletion();
|
||||||
$tpa = $this->getPendingActionForTPAIDEmpty();
|
$tpa = $this->getPendingActionForTPAIDEmpty();
|
||||||
$uhid = $this->getPendingActionForUHIDEmpty();
|
$uhid = $this->getPendingActionForUHIDEmpty();
|
||||||
|
$PolicyRenewalData = $this->getPolicyRenewalDataForAllClient();
|
||||||
|
|
||||||
|
|
||||||
// dd($inception, $si_enhancement, $correction, $deletion, $tpa, $uhid);
|
// dd($inception, $si_enhancement, $correction, $deletion, $tpa, $uhid);
|
||||||
|
|
||||||
$data = ['inception' => $inception, 'correction' => $correction, 'si_enhancement' => $si_enhancement, 'deletion' => $deletion, 'tpa' => $tpa, 'uhid' => $uhid];
|
$data = ['inception' => $inception, 'correction' => $correction, 'si_enhancement' => $si_enhancement, 'deletion' => $deletion, 'tpa' => $tpa, 'uhid' => $uhid, 'policy' => $PolicyRenewalData];
|
||||||
return $this->respond($data);
|
return $this->respond($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//for NORMAL
|
||||||
|
public function getPendingActionsForClientData()
|
||||||
|
{
|
||||||
|
|
||||||
|
$inception = $this->getPendingActionForInception();
|
||||||
|
$correction = $this->getPendingActionForCorrection();
|
||||||
|
$si_enhancement = $this->getPendingActionForSIEnhancement();
|
||||||
|
$deletion = $this->getPendingActionForDeletion();
|
||||||
|
$tpa = $this->getPendingActionForTPAIDEmpty();
|
||||||
|
$uhid = $this->getPendingActionForUHIDEmpty();
|
||||||
|
$PolicyRenewalData = $this->getPolicyRenewalDataForAllClient();
|
||||||
|
|
||||||
|
// dd($inception, $si_enhancement, $correction, $deletion, $tpa, $uhid);
|
||||||
|
|
||||||
|
$data = ['inception' => $inception, 'correction' => $correction, 'si_enhancement' => $si_enhancement, 'deletion' => $deletion, 'tpa' => $tpa, 'uhid' => $uhid, 'policy' => $PolicyRenewalData];
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
//for only COUNT
|
||||||
|
public function getPendingActionsForDashBoard()
|
||||||
|
{
|
||||||
|
$tpa = $this->getPendingActionForTPAIDEmpty();
|
||||||
|
$uhid = $this->getPendingActionForUHIDEmpty();
|
||||||
|
$deletion = $this->getPendingActionForDeletion();
|
||||||
|
$inception = $this->getPendingActionForInception();
|
||||||
|
$ticketData = $this->getTicketsDataForDashBoard();
|
||||||
|
$correction = $this->getPendingActionForCorrection();
|
||||||
|
$si_enhancement = $this->getPendingActionForSIEnhancement();
|
||||||
|
$PolicyRenewalData = $this->getPolicyRenewalDataForAllClient();
|
||||||
|
|
||||||
|
$uhid_export_count = [];
|
||||||
|
$uhid_not_export_count = [];
|
||||||
|
foreach ($uhid as $value) {
|
||||||
|
if($value['batch_export_count'] == 1){
|
||||||
|
$uhid_export_count[] = $value['batch_export_count'];
|
||||||
|
}else{
|
||||||
|
$uhid_not_export_count[] = $value['batch_export_count'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$tpa_export_count = [];
|
||||||
|
$tpa_not_export_count = [];
|
||||||
|
foreach ($tpa as $value) {
|
||||||
|
if($value['batch_export_count'] == 1){
|
||||||
|
$tpa_export_count[] = $value['batch_export_count'];
|
||||||
|
}else{
|
||||||
|
$tpa_not_export_count[] = $value['batch_export_count'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$deletion_export_count = [];
|
||||||
|
$deletion_not_export_count = [];
|
||||||
|
foreach ($deletion as $value) {
|
||||||
|
if($value['batch_export_count'] == 1){
|
||||||
|
$deletion_export_count[] = $value['batch_export_count'];
|
||||||
|
}else{
|
||||||
|
$deletion_not_export_count[] = $value['batch_export_count'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$correction_export_count = [];
|
||||||
|
$correction_not_export_count = [];
|
||||||
|
foreach ($correction as $value) {
|
||||||
|
if($value['batch_export_count'] == 1){
|
||||||
|
$correction_export_count[] = $value['batch_export_count'];
|
||||||
|
}else{
|
||||||
|
$correction_not_export_count[] = $value['batch_export_count'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$si_export_count = [];
|
||||||
|
$si_not_export_count = [];
|
||||||
|
foreach ($si_enhancement as $value) {
|
||||||
|
if($value['batch_export_count'] == 1){
|
||||||
|
$si_export_count[] = $value['batch_export_count'];
|
||||||
|
}else{
|
||||||
|
$si_not_export_count[] = $value['batch_export_count'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// dd($uhid_export_count, $tpa_export_count ,$deletion_export_count, $correction_export_count, $si_export_count, $ticketData, $inception, $si_enhancement, $correction, $deletion, $tpa, $uhid, $PolicyRenewalData);
|
||||||
|
|
||||||
|
$inception = count($inception);
|
||||||
|
$correction = count($correction);
|
||||||
|
$si_enhancement = count($si_enhancement);
|
||||||
|
$deletion = count($deletion);
|
||||||
|
$tpa = count($tpa);
|
||||||
|
$uhid = count($uhid);
|
||||||
|
$PolicyRenewalData = count($PolicyRenewalData);
|
||||||
|
$ticketData = count($ticketData);
|
||||||
|
|
||||||
|
$uhid_export_count = count($uhid_export_count);
|
||||||
|
$tpa_export_count = count($tpa_export_count);
|
||||||
|
$deletion_export_count = count($deletion_export_count);
|
||||||
|
$correction_export_count = count($correction_export_count);
|
||||||
|
$si_export_count = count($si_export_count);
|
||||||
|
|
||||||
|
$uhid_not_export_count = count($uhid_not_export_count);
|
||||||
|
$tpa_not_export_count = count($tpa_not_export_count);
|
||||||
|
$deletion_not_export_count = count($deletion_not_export_count);
|
||||||
|
$correction_not_export_count = count($correction_not_export_count);
|
||||||
|
$si_not_export_count = count($si_not_export_count);
|
||||||
|
|
||||||
|
|
||||||
|
// dd($inception, $si_enhancement, $correction, $deletion, $tpa, $uhid, $PolicyRenewalData);
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'inception' => $inception,
|
||||||
|
'correction' => $correction,
|
||||||
|
'si_enhancement' => $si_enhancement,
|
||||||
|
'deletion' => $deletion,
|
||||||
|
'tpa' => $tpa,
|
||||||
|
'uhid' => $uhid,
|
||||||
|
'PolicyRenewalData' => $PolicyRenewalData,
|
||||||
|
'ticketData' => $ticketData,
|
||||||
|
|
||||||
|
'uhid_export_count' => $uhid_export_count,
|
||||||
|
'tpa_export_count' => $tpa_export_count,
|
||||||
|
'deletion_export_count' => $deletion_export_count,
|
||||||
|
'correction_export_count' => $correction_export_count,
|
||||||
|
'si_export_count' => $si_export_count,
|
||||||
|
|
||||||
|
'uhid_not_export_count' => $uhid_not_export_count,
|
||||||
|
'tpa_not_export_count' => $tpa_not_export_count,
|
||||||
|
'deletion_not_export_count' => $deletion_not_export_count,
|
||||||
|
'correction_not_export_count' => $correction_not_export_count,
|
||||||
|
'si_not_export_count' => $si_not_export_count,
|
||||||
|
];
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function getPendingActionForInception()
|
public function getPendingActionForInception()
|
||||||
@ -121,7 +252,6 @@ class PendingActionsController extends AdminController
|
|||||||
return $results;
|
return $results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getPendingActionForCorrection()
|
public function getPendingActionForCorrection()
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -152,6 +282,7 @@ class PendingActionsController extends AdminController
|
|||||||
clients.id as client_id,
|
clients.id as client_id,
|
||||||
client_branch.id as branch_id,
|
client_branch.id as branch_id,
|
||||||
client_branch.branch_name,
|
client_branch.branch_name,
|
||||||
|
policy_type.policy_type as policy_name,
|
||||||
emp_endorsement.id,
|
emp_endorsement.id,
|
||||||
emp_endorsement.pk,
|
emp_endorsement.pk,
|
||||||
emp_endorsement.endorsement_id,
|
emp_endorsement.endorsement_id,
|
||||||
@ -161,10 +292,20 @@ class PendingActionsController extends AdminController
|
|||||||
emp_endorsement.actions,
|
emp_endorsement.actions,
|
||||||
emp_endorsement.name,
|
emp_endorsement.name,
|
||||||
emp_endorsement.status,
|
emp_endorsement.status,
|
||||||
employees.name as ename
|
employees.name as ename,
|
||||||
|
(
|
||||||
|
SELECT COUNT(*)
|
||||||
|
FROM batch_files bl
|
||||||
|
WHERE bl.client_id = clients.id
|
||||||
|
AND bl.actions = "export"
|
||||||
|
AND bl.event_type = "correction"
|
||||||
|
AND bl.insurer_or_tpa = "tpa"
|
||||||
|
) AS export_count
|
||||||
')
|
')
|
||||||
->join('employees', 'emp_endorsement.pk = employees.id AND employees.is_active = 1 AND employees.emp_status = \'active\'')
|
->join('employees', 'emp_endorsement.pk = employees.id AND employees.is_active = 1 AND employees.emp_status = \'active\'')
|
||||||
->join('clients', 'employees.client_id = clients.id AND clients.is_active = 1', 'left')
|
->join('clients', 'employees.client_id = clients.id AND clients.is_active = 1', 'left')
|
||||||
|
->join('client_policy', 'client_policy.client_id = clients.id AND clients.is_active = 1', 'left')
|
||||||
|
->join('policy_type', 'client_policy.policy_type_id = policy_type.id ')
|
||||||
->join('client_branch', 'client_branch.id = employees.client_branch_id', 'left')
|
->join('client_branch', 'client_branch.id = employees.client_branch_id', 'left')
|
||||||
->where([
|
->where([
|
||||||
'emp_endorsement.actions' => 'c',
|
'emp_endorsement.actions' => 'c',
|
||||||
@ -195,14 +336,16 @@ class PendingActionsController extends AdminController
|
|||||||
$results = $query->getResultArray();
|
$results = $query->getResultArray();
|
||||||
|
|
||||||
|
|
||||||
$filteredResults = array_filter($results, function ($value) {
|
$filteredResults = [];
|
||||||
return $value['subquery_count'] != 0;
|
foreach ($results as $value) {
|
||||||
});
|
if ($value['subquery_count'] != 0) {
|
||||||
|
$filteredResults[] = $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $filteredResults;
|
return $filteredResults;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getPendingActionForSIEnhancement()
|
public function getPendingActionForSIEnhancement()
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -282,14 +425,16 @@ class PendingActionsController extends AdminController
|
|||||||
$results = $query->getResultArray();
|
$results = $query->getResultArray();
|
||||||
|
|
||||||
|
|
||||||
$filteredResults = array_filter($results, function ($value) {
|
$filteredResults = [];
|
||||||
return $value['subquery_count'] != 0;
|
foreach ($results as $value) {
|
||||||
});
|
if ($value['subquery_count'] != 0) {
|
||||||
|
$filteredResults[] = $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $filteredResults;
|
return $filteredResults;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getPendingActionForDeletion()
|
public function getPendingActionForDeletion()
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -369,14 +514,16 @@ class PendingActionsController extends AdminController
|
|||||||
// Fetch the results
|
// Fetch the results
|
||||||
$results = $query->getResultArray();
|
$results = $query->getResultArray();
|
||||||
|
|
||||||
$filteredResults = array_filter($results, function ($value) {
|
$filteredResults = [];
|
||||||
return $value['subquery_count'] != 0;
|
foreach ($results as $value) {
|
||||||
});
|
if ($value['subquery_count'] != 0) {
|
||||||
|
$filteredResults[] = $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $filteredResults;
|
return $filteredResults;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getPendingActionForUHIDEmpty()
|
public function getPendingActionForUHIDEmpty()
|
||||||
{
|
{
|
||||||
// Subquery for batch_export_count
|
// Subquery for batch_export_count
|
||||||
@ -425,7 +572,6 @@ class PendingActionsController extends AdminController
|
|||||||
return $results;
|
return $results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getPendingActionForTPAIDEmpty()
|
public function getPendingActionForTPAIDEmpty()
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -483,4 +629,86 @@ class PendingActionsController extends AdminController
|
|||||||
|
|
||||||
return $results;
|
return $results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getPolicyRenewalDataForAllClient()
|
||||||
|
{
|
||||||
|
$PolicyRenewalData = $this->clientPolicyModel
|
||||||
|
->select('
|
||||||
|
clients.client_name,
|
||||||
|
client_branch.branch_name,
|
||||||
|
policy_type.policy_type as policy_name,
|
||||||
|
client_policy.policy_end_date,
|
||||||
|
client_branch.id as branch_id
|
||||||
|
')
|
||||||
|
->join('clients', 'clients.id = client_policy.client_id')
|
||||||
|
->join('client_branch', 'client_branch.id = client_policy.client_branch_id')
|
||||||
|
->join('policy_type', 'policy_type.id = client_policy.policy_type_id')
|
||||||
|
->where('client_policy.is_active', 1)
|
||||||
|
->where('client_policy.policy_status', 0)
|
||||||
|
->where('clients.is_active', 1)
|
||||||
|
->where('client_branch.is_active', 1)
|
||||||
|
->where('client_policy.policy_end_date < DATE_ADD(CURDATE(), INTERVAL 2 MONTH)', null, false)
|
||||||
|
->get()
|
||||||
|
->getResultArray();
|
||||||
|
|
||||||
|
return $PolicyRenewalData;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getTicketsDataForDashBoard()
|
||||||
|
{
|
||||||
|
$db = \Config\Database::connect();
|
||||||
|
|
||||||
|
$ticket_data = $db->table('hdz_tickets')
|
||||||
|
->select('hdz_tickets.*, hdz_status.status')
|
||||||
|
->join('hdz_status', 'hdz_status.id = hdz_tickets.status')
|
||||||
|
->where('hdz_status.active', 1)
|
||||||
|
->where('hdz_tickets.status !=', 5)
|
||||||
|
->get()
|
||||||
|
->getResultArray();
|
||||||
|
|
||||||
|
return $ticket_data;
|
||||||
|
}
|
||||||
|
|
||||||
|
//ticket status count
|
||||||
|
public function getTicketStatusCount()
|
||||||
|
{
|
||||||
|
|
||||||
|
$db = \Config\Database::connect();
|
||||||
|
|
||||||
|
// Count status = 1
|
||||||
|
$countStatus1 = $db->table('hdz_tickets')
|
||||||
|
->selectCount('status')
|
||||||
|
->where('status', 1)
|
||||||
|
->get()
|
||||||
|
->getRowArray()['status'];
|
||||||
|
|
||||||
|
// Count status = 4
|
||||||
|
$countStatus4 = $db->table('hdz_tickets')
|
||||||
|
->selectCount('status')
|
||||||
|
->where('status', 4)
|
||||||
|
->get()
|
||||||
|
->getRowArray()['status'];
|
||||||
|
|
||||||
|
// Count status = 2
|
||||||
|
$countStatus2 = $db->table('hdz_tickets')
|
||||||
|
->selectCount('status')
|
||||||
|
->where('status', 2)
|
||||||
|
->get()
|
||||||
|
->getRowArray()['status'];
|
||||||
|
|
||||||
|
// Count status = 3
|
||||||
|
$countStatus3 = $db->table('hdz_tickets')
|
||||||
|
->selectCount('status')
|
||||||
|
->where('status', 3)
|
||||||
|
->get()
|
||||||
|
->getRowArray()['status'];
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getexportCount()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -69,15 +69,13 @@ class RestAuthenticationController extends AdminController
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$mobile_number = $this->request->getJSON()->mobile_number;
|
$mobile_number = $this->request->getJSON()->mobile_number;
|
||||||
$randomNumber = rand(100000, 999999);
|
|
||||||
$randomNumber = 123456;
|
|
||||||
|
|
||||||
$employeeData = $this->employeeModel->where('mobile', $mobile_number)->where('relationship', 'self')->first();
|
$employeeData = $this->employeeModel->where('mobile', $mobile_number)->where('relationship', 'self')->first();
|
||||||
|
|
||||||
if ($employeeData) {
|
if ($employeeData) {
|
||||||
$id= $employeeData["id"];
|
|
||||||
$otp = $this->employeeModel->where('id', $id)->set('otp', $randomNumber)->update();
|
$result = ['user_verification' => true ,'message' => "Verified Successfully"];
|
||||||
$result = ['user_verification' => true ,'message' => "Verified Successfully", 'otp'=>$randomNumber];
|
|
||||||
return $this->respond(['status' => 'success','code' => 200,'data' => $result],200);
|
return $this->respond(['status' => 'success','code' => 200,'data' => $result],200);
|
||||||
} else {
|
} else {
|
||||||
$result = ['user_verification' => false , 'message' => "User not found"];
|
$result = ['user_verification' => false , 'message' => "User not found"];
|
||||||
@ -92,13 +90,13 @@ class RestAuthenticationController extends AdminController
|
|||||||
|
|
||||||
public function getVerifiedUserData()
|
public function getVerifiedUserData()
|
||||||
{
|
{
|
||||||
// try {
|
try {
|
||||||
$mobile_number = $this->request->getJSON()->mobile_number;
|
$mobile_number = $this->request->getJSON()->mobile_number;
|
||||||
$otp = $this->request->getJSON()->otp;
|
$otp_verification = $this->request->getJSON()->otp_verification;
|
||||||
|
|
||||||
$employeeData = $this->employeeModel->where('mobile', $mobile_number)->where('relationship', 'self')->first();
|
$employeeData = $this->employeeModel->where('mobile', $mobile_number)->where('relationship', 'self')->first();
|
||||||
|
|
||||||
if ($employeeData && $otp == $employeeData["otp"] || $employeeData && isset($this->request->getJSON()->login_by_hr)) {
|
if ($employeeData && $otp_verification == true || $employeeData && isset($this->request->getJSON()->login_by_hr)) {
|
||||||
$auth = HttpRequestHelper::getRequestInfo();
|
$auth = HttpRequestHelper::getRequestInfo();
|
||||||
if ($auth) {
|
if ($auth) {
|
||||||
$data = [
|
$data = [
|
||||||
@ -108,36 +106,31 @@ class RestAuthenticationController extends AdminController
|
|||||||
'platform' => $auth['platform'],
|
'platform' => $auth['platform'],
|
||||||
'broswer' => $auth['browser'],
|
'broswer' => $auth['browser'],
|
||||||
];
|
];
|
||||||
|
$this->authHistoryModel->insert($data);
|
||||||
$authdata= $this->authHistoryModel->insert($data);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
$otp_null = $this->employeeModel->where('id', $employeeData["id"])->set('otp', null)->update();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$result = JWTToken::encode($employeeData);
|
$result = JWTToken::encode($employeeData);
|
||||||
return $this->respond(['status' => 'success','code' => 200,'data' => $result],200);
|
return $this->respond(['status' => 'success','code' => 200,'data' => $result],200);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
return $this->respond(['status' => 'failed','code' => 404,'data' => "Invalid OTP"],200);
|
return $this->respond(['status' => 'failed','code' => 404,'data' => "Invalid OTP"],200);
|
||||||
}
|
}
|
||||||
// } catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
// return $this->respond(['status' => 'failed','code' => 500,'data' => $e->getMessage()],500);
|
return $this->respond(['status' => 'failed','code' => 500,'data' => $e->getMessage()],500);
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function verifyHrWithMobileNumber()
|
public function verifyHrWithMobileNumber()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$mobile_number = $this->request->getJSON()->mobile_number;
|
$mobile_number = $this->request->getJSON()->mobile_number;
|
||||||
$randomNumber = rand(100000, 999999);
|
|
||||||
$randomNumber = 123456;
|
|
||||||
$HrData = $this->hrModel->where('mobile', $mobile_number)->where('contact_type', 'client')->first();
|
$HrData = $this->hrModel->where('mobile', $mobile_number)->where('contact_type', 'client')->first();
|
||||||
|
|
||||||
if ($HrData) {
|
if ($HrData) {
|
||||||
$id= $HrData["id"];
|
|
||||||
$otp = $this->hrModel->where('id', $id)->set('otp', $randomNumber)->update();
|
$result = ['user_verification' => true ,'message' => "Verified Successfully"];
|
||||||
$result = ['user_verification' => true ,'message' => "Verified Successfully", 'otp'=>$randomNumber];
|
|
||||||
return $this->respond(['status' => 'success','code' => 200,'data' => $result],200);
|
return $this->respond(['status' => 'success','code' => 200,'data' => $result],200);
|
||||||
} else {
|
} else {
|
||||||
$result = ['user_verification' => false , 'message' => "User not found"];
|
$result = ['user_verification' => false , 'message' => "User not found"];
|
||||||
@ -154,10 +147,10 @@ class RestAuthenticationController extends AdminController
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$mobile_number = $this->request->getJSON()->mobile_number;
|
$mobile_number = $this->request->getJSON()->mobile_number;
|
||||||
$otp = $this->request->getJSON()->otp;
|
$otp_verification = $this->request->getJSON()->otp_verification;
|
||||||
|
|
||||||
$hrData = $this->hrModel->where('mobile', $mobile_number)->first();
|
$hrData = $this->hrModel->where('mobile', $mobile_number)->first();
|
||||||
if ($hrData && $otp == $hrData["otp"]) {
|
if ($hrData && $otp_verification == true) {
|
||||||
$auth = HttpRequestHelper::getRequestInfo();
|
$auth = HttpRequestHelper::getRequestInfo();
|
||||||
if ($auth) {
|
if ($auth) {
|
||||||
$data = [
|
$data = [
|
||||||
@ -168,10 +161,10 @@ class RestAuthenticationController extends AdminController
|
|||||||
'broswer' => $auth['browser'],
|
'broswer' => $auth['browser'],
|
||||||
];
|
];
|
||||||
|
|
||||||
$authdata= $this->authHistoryModel->insert($data);
|
$this->authHistoryModel->insert($data);
|
||||||
|
|
||||||
}
|
}
|
||||||
$otp_null = $this->hrModel->where('id', $hrData["id"])->set('otp', null)->update();
|
|
||||||
|
|
||||||
$hrData = $this->hrModel ->select('level_contacts.* , client_branch.client_id as client_id')
|
$hrData = $this->hrModel ->select('level_contacts.* , client_branch.client_id as client_id')
|
||||||
->join('client_branch', 'level_contacts.ref_id = client_branch.id', 'left')
|
->join('client_branch', 'level_contacts.ref_id = client_branch.id', 'left')
|
||||||
@ -179,7 +172,7 @@ class RestAuthenticationController extends AdminController
|
|||||||
->find();
|
->find();
|
||||||
|
|
||||||
$result = JWTToken::encode($hrData['0']);
|
$result = JWTToken::encode($hrData['0']);
|
||||||
return $this->respond(['status' => 'success','code' => 200,'data' => $result],200);
|
return $this->respond(['status' => 'success','code' => 200,'data' => $result],200);
|
||||||
} else {
|
} else {
|
||||||
return $this->respond(['status' => 'failed','code' => 404,'data' => "Invalid OTP"],200);
|
return $this->respond(['status' => 'failed','code' => 404,'data' => "Invalid OTP"],200);
|
||||||
}
|
}
|
||||||
@ -190,11 +183,6 @@ class RestAuthenticationController extends AdminController
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function employeeLogout()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getUserIdFromToken()
|
public function getUserIdFromToken()
|
||||||
{
|
{
|
||||||
$id = JWTToken::getUserIdFromToken();
|
$id = JWTToken::getUserIdFromToken();
|
||||||
|
|||||||
@ -54,7 +54,9 @@ class DepositHelper
|
|||||||
'cd_ac_no' => $data['cd_ac_no'],
|
'cd_ac_no' => $data['cd_ac_no'],
|
||||||
'endorsement_no' => $data['endorsement_no'],
|
'endorsement_no' => $data['endorsement_no'],
|
||||||
'insurer_id' => $data['insurer_id'],
|
'insurer_id' => $data['insurer_id'],
|
||||||
|
'unit' => $data['unit'] ?? null,
|
||||||
'description' => $data['description'],
|
'description' => $data['description'],
|
||||||
|
'event_name' => $data['event_name'],
|
||||||
'transaction_type' => $data['transaction_type'],
|
'transaction_type' => $data['transaction_type'],
|
||||||
'is_active' => 1,
|
'is_active' => 1,
|
||||||
'created_by' => $loggedInUserID,
|
'created_by' => $loggedInUserID,
|
||||||
|
|||||||
@ -12,7 +12,7 @@ class sendMailNotification
|
|||||||
{
|
{
|
||||||
public static function sendMailNotification($action, $params)
|
public static function sendMailNotification($action, $params)
|
||||||
{
|
{
|
||||||
print_r($params);die;
|
$wholeData =[];
|
||||||
if ($action == 'member_welcome_mail') {
|
if ($action == 'member_welcome_mail') {
|
||||||
$dataToInsert = $params['dataToInsert'];
|
$dataToInsert = $params['dataToInsert'];
|
||||||
$notification = $params['notification'];
|
$notification = $params['notification'];
|
||||||
@ -37,7 +37,6 @@ class sendMailNotification
|
|||||||
}
|
}
|
||||||
return $wholeData;
|
return $wholeData;
|
||||||
} else if($action == 'member_reminder_mail'){
|
} else if($action == 'member_reminder_mail'){
|
||||||
|
|
||||||
$EmployeeModel = new EmployeeModel();
|
$EmployeeModel = new EmployeeModel();
|
||||||
$emp_data = $params['emp_data'];
|
$emp_data = $params['emp_data'];
|
||||||
$notification_data = $params['notification_data'];
|
$notification_data = $params['notification_data'];
|
||||||
@ -51,27 +50,46 @@ class sendMailNotification
|
|||||||
$mail_content = str_replace("[[client_name]]", $client_data['client_name'], $mail_content);
|
$mail_content = str_replace("[[client_name]]", $client_data['client_name'], $mail_content);
|
||||||
$mail_content = str_replace("[[nhance_logo]]", "<img src='$nhance_logo' alt='Nhance Logo' width='20'>", $mail_content);
|
$mail_content = str_replace("[[nhance_logo]]", "<img src='$nhance_logo' alt='Nhance Logo' width='20'>", $mail_content);
|
||||||
$mail_content = str_replace("[[app_link]]", "<a href='$app_link'>Review Details</a>", $mail_content);
|
$mail_content = str_replace("[[app_link]]", "<a href='$app_link'>Review Details</a>", $mail_content);
|
||||||
|
|
||||||
if ($emp_data && (isset($notification_data) && $notification_data['enabled'] == 1)) {
|
if ($emp_data && (isset($notification_data) && $notification_data['enabled'] == 1)) {
|
||||||
|
if(isset($emp_data['relationship'])){
|
||||||
|
if ($emp_data['relationship'] == 'Self') {
|
||||||
|
if(count($emp_data) > 0){
|
||||||
|
$mail ='';
|
||||||
|
if ($emp_data['relationship'] == 'Self') {
|
||||||
|
$employee_name =$emp_data['name'];
|
||||||
|
$mail_content = str_replace("[[member_name]]", $employee_name, $mail_content);
|
||||||
|
$mail = $emp_data['email_corporate'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
$mail ='';
|
||||||
|
}
|
||||||
|
|
||||||
|
}else{
|
||||||
|
$employee_name =$emp_data['name'];
|
||||||
|
$mail_content = str_replace("[[member_name]]", $employee_name, $mail_content);
|
||||||
|
$mail = $emp_data['email_corporate'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($mail) && !empty($mail)) {
|
||||||
|
$wholeData[] = ['mail' => $mail, 'subject' => $subject,'message'=> $mail_content, 'bcc'=> $client_data['common_mails']];
|
||||||
|
}
|
||||||
|
}else{
|
||||||
foreach ($emp_data as $key => $value) {
|
foreach ($emp_data as $key => $value) {
|
||||||
if ($value['relationship'] != 'Self') {
|
if ($value['relationship'] != 'Self') {
|
||||||
|
|
||||||
$emp_data = $EmployeeModel->where('client_id', $client_data['id'])->where('emp_code', $value['emp_code'])->where('is_active',1)->findAll();
|
$emp_data = $EmployeeModel->where('client_id', $client_data['id'])->where('emp_code', $value['emp_code'])->where('is_active',1)->findAll();
|
||||||
|
|
||||||
if(count($emp_data) > 1){
|
if(count($emp_data) > 1){
|
||||||
$mail ='';
|
$mail ='';
|
||||||
foreach ($emp_data as $key => $values) {
|
foreach ($emp_data as $key => $values) {
|
||||||
if ($value['relationship'] == 'Self') {
|
if ($value['relationship'] == 'Self') {
|
||||||
$employee_name =$values['name'];
|
$employee_name =$values['name'];
|
||||||
$mail_content = str_replace("[[member_name]]", $employee_name, $mail_content);
|
$mail_content = str_replace("[[member_name]]", $employee_name, $mail_content);
|
||||||
|
|
||||||
$mail = $values['email_corporate'];
|
$mail = $values['email_corporate'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
$mail ='';
|
$mail ='';
|
||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
$employee_name =$value['name'];
|
$employee_name =$value['name'];
|
||||||
$mail_content = str_replace("[[member_name]]", $employee_name, $mail_content);
|
$mail_content = str_replace("[[member_name]]", $employee_name, $mail_content);
|
||||||
@ -81,13 +99,15 @@ class sendMailNotification
|
|||||||
$wholeData[] = ['mail' => $mail, 'subject' => $subject,'message'=> $mail_content, 'bcc'=> $client_data['common_mails']];
|
$wholeData[] = ['mail' => $mail, 'subject' => $subject,'message'=> $mail_content, 'bcc'=> $client_data['common_mails']];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (count($wholeData) < 1) {
|
|
||||||
$wholeData = [];
|
|
||||||
}
|
|
||||||
return $wholeData;
|
|
||||||
}else{
|
|
||||||
return "false";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (count($wholeData) < 1) {
|
||||||
|
$wholeData = [];
|
||||||
|
}
|
||||||
|
return $wholeData;
|
||||||
|
// }else{
|
||||||
|
// return "false";
|
||||||
|
// }
|
||||||
} else if($action == 'member_ecard_mail'){
|
} else if($action == 'member_ecard_mail'){
|
||||||
|
|
||||||
$notification = $params['notification'];
|
$notification = $params['notification'];
|
||||||
|
|||||||
@ -42,7 +42,7 @@ class CDMasterModel extends Model
|
|||||||
protected function checkAndADDCreatedByValue(array $data)
|
protected function checkAndADDCreatedByValue(array $data)
|
||||||
{
|
{
|
||||||
// Check if 'updated_by' value is null or empty
|
// Check if 'updated_by' value is null or empty
|
||||||
if (empty($data['data']['created_by'])) {
|
if (empty($data['data']['created_by'])) {
|
||||||
// Set 'updated_by' value to the current session user ID
|
// Set 'updated_by' value to the current session user ID
|
||||||
$data['data']['created_by'] = get_session_userid();
|
$data['data']['created_by'] = get_session_userid();
|
||||||
}
|
}
|
||||||
@ -53,7 +53,7 @@ class CDMasterModel extends Model
|
|||||||
protected function checkAndUpdateUpdatedByValue(array $data)
|
protected function checkAndUpdateUpdatedByValue(array $data)
|
||||||
{
|
{
|
||||||
// Check if 'updated_by' value is null or empty
|
// Check if 'updated_by' value is null or empty
|
||||||
if (empty($data['data']['updated_by'])) {
|
if (empty($data['data']['updated_by'])) {
|
||||||
// Set 'updated_by' value to the current session user ID
|
// Set 'updated_by' value to the current session user ID
|
||||||
$data['data']['updated_by'] = get_session_userid();
|
$data['data']['updated_by'] = get_session_userid();
|
||||||
}
|
}
|
||||||
@ -65,31 +65,37 @@ class CDMasterModel extends Model
|
|||||||
{
|
{
|
||||||
|
|
||||||
$query = $this->db->table('cd_master')
|
$query = $this->db->table('cd_master')
|
||||||
->select('cd_master.*, clients.client_name, clients.short_name, insurers.name AS insurer_name, user_profiles.first_name AS user_name, IFNULL(cd_ac_counts.cd_ac_no_count, 0) AS cd_ac_no_count, IFNULL(cd_ac_counts_for_cdt.cd_ac_no_count_cd_tranction, 0) AS cd_ac_no_count_cd_tranction')
|
->select('cd_master.*, clients.client_name, clients.short_name, insurers.name AS insurer_name, user_profiles.first_name AS user_name, IFNULL(cd_ac_counts.cd_ac_no_count, 0) AS cd_ac_no_count, IFNULL(cd_ac_counts_for_cdt.cd_ac_no_count_cd_tranction, 0) AS cd_ac_no_count_cd_tranction')
|
||||||
->join('clients', 'clients.id = cd_master.client_id')
|
->join('clients', 'clients.id = cd_master.client_id')
|
||||||
->join('insurers', 'insurers.id = cd_master.insurer_id')
|
->join('insurers', 'insurers.id = cd_master.insurer_id')
|
||||||
->join('user_profiles', 'user_profiles.id = cd_master.created_by')
|
->join('user_profiles', 'user_profiles.id = cd_master.created_by')
|
||||||
->join(
|
->join(
|
||||||
'(SELECT cd_master.cd_ac_no, COUNT(client_policy.cd_ac_no) AS cd_ac_no_count
|
'(SELECT cd_master.cd_ac_no, COUNT(client_policy.cd_ac_no) AS cd_ac_no_count
|
||||||
FROM cd_master
|
FROM cd_master
|
||||||
JOIN client_policy ON client_policy.cd_ac_no = cd_master.cd_ac_no
|
JOIN client_policy ON client_policy.cd_ac_no = cd_master.cd_ac_no
|
||||||
|
WHERE client_policy.is_active = 1
|
||||||
|
AND cd_master.is_active = 1
|
||||||
GROUP BY cd_master.cd_ac_no) AS cd_ac_counts',
|
GROUP BY cd_master.cd_ac_no) AS cd_ac_counts',
|
||||||
'cd_ac_counts.cd_ac_no = cd_master.cd_ac_no',
|
'cd_ac_counts.cd_ac_no = cd_master.cd_ac_no',
|
||||||
'left'
|
'left'
|
||||||
)
|
)
|
||||||
->join(
|
->join(
|
||||||
'(SELECT cd_master.cd_ac_no, COUNT(cash_deposit.cd_ac_no) AS cd_ac_no_count_cd_tranction
|
'(SELECT cd_master.cd_ac_no, COUNT(cash_deposit.cd_ac_no) AS cd_ac_no_count_cd_tranction
|
||||||
FROM cd_master
|
FROM cd_master
|
||||||
JOIN cash_deposit ON cash_deposit.cd_ac_no = cd_master.cd_ac_no
|
JOIN cash_deposit ON cash_deposit.cd_ac_no = cd_master.cd_ac_no
|
||||||
|
WHERE cash_deposit.is_active = 1
|
||||||
|
AND cd_master.is_active = 1
|
||||||
GROUP BY cd_master.cd_ac_no) AS cd_ac_counts_for_cdt',
|
GROUP BY cd_master.cd_ac_no) AS cd_ac_counts_for_cdt',
|
||||||
'cd_ac_counts_for_cdt.cd_ac_no = cd_master.cd_ac_no',
|
'cd_ac_counts_for_cdt.cd_ac_no = cd_master.cd_ac_no',
|
||||||
'left'
|
'left'
|
||||||
)
|
)
|
||||||
->where('cd_master.is_active', 1)
|
->where('cd_master.is_active', 1)
|
||||||
->get();
|
->where('clients.is_active', 1)
|
||||||
|
->where('insurers.is_active', 1)
|
||||||
|
->where('user_profiles.is_active', 1)
|
||||||
|
->get();
|
||||||
|
|
||||||
$result = $query->getResultArray();
|
$result = $query->getResultArray();
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,6 +25,8 @@ class ClientDepositModel extends Model
|
|||||||
"client_policy_id",
|
"client_policy_id",
|
||||||
"cd_ac_no",
|
"cd_ac_no",
|
||||||
"endorsement_no",
|
"endorsement_no",
|
||||||
|
"event_name",
|
||||||
|
"unit",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -19,6 +19,7 @@ class ClientPolicyModel extends Model
|
|||||||
"policy_type_id",
|
"policy_type_id",
|
||||||
"policy_start_date",
|
"policy_start_date",
|
||||||
"policy_end_date",
|
"policy_end_date",
|
||||||
|
"reminder_date",
|
||||||
"insured",
|
"insured",
|
||||||
"no_of_employees",
|
"no_of_employees",
|
||||||
"no_of_lives",
|
"no_of_lives",
|
||||||
@ -46,6 +47,7 @@ class ClientPolicyModel extends Model
|
|||||||
"cd_ac_no",
|
"cd_ac_no",
|
||||||
"gst",
|
"gst",
|
||||||
"enrolment_visibility",
|
"enrolment_visibility",
|
||||||
|
"is_active",
|
||||||
];
|
];
|
||||||
|
|
||||||
public function getClientPolicyById($id){
|
public function getClientPolicyById($id){
|
||||||
|
|||||||
@ -130,7 +130,15 @@ class EmployeePolicyModel extends Model
|
|||||||
$result->where('employee_polices.client_policy_id', $policy_id);
|
$result->where('employee_polices.client_policy_id', $policy_id);
|
||||||
}
|
}
|
||||||
if ($status !=0 && !empty($status)) {
|
if ($status !=0 && !empty($status)) {
|
||||||
$result->where('employee_polices.status', $status);
|
if($status == 'active'){
|
||||||
|
$result->where('employee_polices.tpa_id IS NOT NULL');
|
||||||
|
$result->where('employee_polices.uhid IS NOT NULL');
|
||||||
|
}else if($status == 'pending'){
|
||||||
|
$status = 'active';
|
||||||
|
$result->where('employee_polices.status', $status);
|
||||||
|
}else{
|
||||||
|
$result->where('employee_polices.status', $status);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!empty($emp_code)) {
|
if (!empty($emp_code)) {
|
||||||
$result->where('emp.emp_code', $emp_code);
|
$result->where('emp.emp_code', $emp_code);
|
||||||
|
|||||||
@ -35,9 +35,9 @@ body {
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
<div class="row" id="client_add">
|
<div class="row" id="client_add" style="margin-top: -32px;">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="card">
|
<!-- <div class="card"> -->
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="row" style="padding-bottom: 10px;">
|
<div class="row" style="padding-bottom: 10px;">
|
||||||
<div class="col-6" style="align-self: center;">
|
<div class="col-6" style="align-self: center;">
|
||||||
@ -50,10 +50,10 @@ body {
|
|||||||
|
|
||||||
<ul class="nav nav-pills navtab-bg">
|
<ul class="nav nav-pills navtab-bg">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="#endorsement-dash-tab" data-toggle="tab" aria-expanded="false"
|
<a href="#pending-actions-dash-tab" data-toggle="tab" aria-expanded="false"
|
||||||
class="nav-link px-3 py-2 active" id="endorsement_tab">
|
class="nav-link px-3 py-2 active" id="pending_actions_tab">
|
||||||
<span class="mr-1"><i class="mdi mdi-contacts"></i></span>
|
<span class="mr-1"><i class="mdi mdi-contacts"></i></span>
|
||||||
<span class="d-none d-sm-inline-block">Endorsement</span>
|
<span class="d-none d-sm-inline-block">Pending Actions</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
@ -64,13 +64,11 @@ body {
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
<?php include('enrollment_dash.php'); ?>
|
<?php include('enrollment_dash.php'); ?>
|
||||||
<?php include('endorsement_dash.php'); ?>
|
<?php include('endorsement_dash.php'); ?>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<!-- </div> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@ -57,17 +57,25 @@ table.dataTable thead th {
|
|||||||
<td><?php echo date('d-M-Y h:i A', strtotime($row['created_at'])) ?> by
|
<td><?php echo date('d-M-Y h:i A', strtotime($row['created_at'])) ?> by
|
||||||
<?php echo $row['user_name']; ?></td>
|
<?php echo $row['user_name']; ?></td>
|
||||||
<td>
|
<td>
|
||||||
<div class="btn-group dropdown">
|
<?php if($row['cd_ac_no_count'] > 0 && $row['cd_ac_no_count_cd_tranction'] > 1) {?>
|
||||||
<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="btn-group dropdown">
|
||||||
<div class="dropdown-menu dropdown-menu-right">
|
<!-- <a href="javascript: void(0);"class="dropdown-toggle arrow-none btn btn-light btn-sm"aria-expanded="false"></i></a> -->
|
||||||
<?php if($row['cd_ac_no_count_cd_tranction'] <= 1) { ?>
|
|
||||||
<a class="dropdown-item btnEdit" data-id="<?= $row['id'];?>" data-toggle="modal" data-target="#con-close-modal"> <i class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit</a>
|
|
||||||
<?php } ?>
|
|
||||||
<?php if($row['cd_ac_no_count'] == 0) { ?>
|
|
||||||
<a class="dropdown-item" data-id="<?= $row['id'];?>" onclick="removeCDMaster(this)"><i class="mdi mdi-delete mr-2 text-muted font-18 vertical-middle"></i>Delete</a>
|
|
||||||
<?php } ?>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<?php } else { ?>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
<div class="dropdown-menu dropdown-menu-right">
|
||||||
|
<?php if($row['cd_ac_no_count_cd_tranction'] <= 1) { ?>
|
||||||
|
<a class="dropdown-item btnEdit" data-id="<?= $row['id'];?>" data-toggle="modal" data-target="#con-close-modal"> <i class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit</a>
|
||||||
|
<?php } ?>
|
||||||
|
<?php if($row['cd_ac_no_count'] == 0) { ?>
|
||||||
|
<a class="dropdown-item" data-id="<?= $row['id'];?>" onclick="removeCDMaster(this)"><i class="mdi mdi-delete mr-2 text-muted font-18 vertical-middle"></i>Delete</a>
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|||||||
@ -216,6 +216,7 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
var branchTable = '';
|
var branchTable = '';
|
||||||
var data = <?= isset($client_branch) ? json_encode($client_branch) : '[]' ?>;
|
var data = <?= isset($client_branch) ? json_encode($client_branch) : '[]' ?>;
|
||||||
|
console.log('branch data', data)
|
||||||
var role = data.role
|
var role = data.role
|
||||||
delete data.role;
|
delete data.role;
|
||||||
console.log(role)
|
console.log(role)
|
||||||
|
|||||||
@ -8,7 +8,8 @@
|
|||||||
|
|
||||||
<div class="row" style="padding-top: 20px;margin-bottom: 18px;">
|
<div class="row" style="padding-top: 20px;margin-bottom: 18px;">
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<h4 style="position: relative;left: 18px;top: 2px;">Client Basic Info</h4>
|
<h4 style="position: relative;left: 18px;top: 2px;">Client Basic Info - <strong> <?= $client['client_name'] ?> (
|
||||||
|
<?= $client['short_name'] ?> ) </strong></h4>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
@ -35,16 +36,15 @@
|
|||||||
<div class="card-body" style="position: relative;bottom: 25px;">
|
<div class="card-body" style="position: relative;bottom: 25px;">
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
<!--
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="font-size: 18px;"> <strong> <?= $client['client_name'] ?> (
|
<td style="font-size: 18px;"></td>
|
||||||
<?= $client['short_name'] ?> ) </strong></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
|
|
||||||
@ -62,18 +62,16 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-6">
|
<!-- <div class="col-6">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding: 3px;"><label>Address :</label>
|
<td style="padding: 3px;"></td>
|
||||||
<?= $client['address1'] ?> <br> <?= $client['address2'] ?></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding: 3px;"><?= $client['city'] ?>, <?= $client['state'] ?> -
|
<td style="padding: 3px;"></td>
|
||||||
<?= $client['pincode'] ?></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<table>
|
<table>
|
||||||
@ -142,7 +140,7 @@
|
|||||||
data-id="<?= htmlspecialchars($value['policy_terms']) ?>"
|
data-id="<?= htmlspecialchars($value['policy_terms']) ?>"
|
||||||
data-toggle="modal" data-target="#bs-example-modal-lg">
|
data-toggle="modal" data-target="#bs-example-modal-lg">
|
||||||
<td><?= $value['branch_name'] ?></td>
|
<td><?= $value['branch_name'] ?></td>
|
||||||
<td><?= $value['policy_name'] ?> ( <?= $value['policy_type'] ?> )</td>
|
<td><?= $value['policy_type'] ?></td>
|
||||||
<td><?= $value['insurer_short_name'] ?></td>
|
<td><?= $value['insurer_short_name'] ?></td>
|
||||||
<td><?= $value['tpa_short_name'] ?></td>
|
<td><?= $value['tpa_short_name'] ?></td>
|
||||||
<td><?= $value['policy_start_date'] ?> / <?= $value['policy_end_date'] ?>
|
<td><?= $value['policy_start_date'] ?> / <?= $value['policy_end_date'] ?>
|
||||||
|
|||||||
@ -81,83 +81,91 @@ table.dataTable thead th {
|
|||||||
<div id="append_client_info"></div>
|
<div id="append_client_info"></div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function()
|
||||||
|
{
|
||||||
|
|
||||||
$('#tickets-table').DataTable({
|
$('#tickets-table').DataTable({
|
||||||
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>" +
|
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>" +
|
||||||
"<'row'<'col-sm-12'tr>>" +
|
"<'row'<'col-sm-12'tr>>" +
|
||||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||||
buttons: [{
|
buttons: [{
|
||||||
extend: 'csv',
|
extend: 'csv',
|
||||||
text: 'CSV',
|
text: 'CSV',
|
||||||
title: 'ClientList',
|
title: 'ClientList',
|
||||||
className: 'my_class',
|
className: 'my_class',
|
||||||
exportOptions: {
|
exportOptions: {
|
||||||
columns: ':not(:last-child)'
|
columns: ':not(:last-child)'
|
||||||
|
},
|
||||||
|
}],
|
||||||
|
language: {
|
||||||
|
search: "_INPUT_",
|
||||||
|
searchPlaceholder: "Search..."
|
||||||
},
|
},
|
||||||
}],
|
paging: true ,
|
||||||
language: {
|
// pagingType: 'full_numbers'
|
||||||
search: "_INPUT_",
|
});
|
||||||
searchPlaceholder: "Search..."
|
|
||||||
},
|
|
||||||
paging: true ,
|
|
||||||
// pagingType: 'full_numbers'
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
function removeClient(element)
|
||||||
|
{
|
||||||
function removeClient(element) {
|
|
||||||
|
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
title: "Are you sure?",
|
title: "Are you sure?",
|
||||||
text: "You need to remove this client.",
|
text: "You need to remove this client.",
|
||||||
icon: "info",
|
icon: "info",
|
||||||
showCancelButton: true,
|
showCancelButton: true,
|
||||||
confirmButtonColor: "#3085d6",
|
confirmButtonColor: "#3085d6",
|
||||||
confirmButtonText: "Yes",
|
confirmButtonText: "Yes",
|
||||||
}).then((result) => {
|
}).then((result) => {
|
||||||
|
|
||||||
if (result.isConfirmed) {
|
if (result.isConfirmed) {
|
||||||
var id = element.getAttribute('data-id');
|
|
||||||
var form_action = '<?= base_url("client/remove/") ?>' + id;
|
$('.loader').fadeIn();
|
||||||
$.ajax({
|
$('.loader-mask').fadeIn();
|
||||||
url: form_action,
|
|
||||||
type: "GET",
|
var id = element.getAttribute('data-id');
|
||||||
dataType: 'json',
|
var form_action = '<?= base_url("client/remove/") ?>' + id;
|
||||||
processData: false,
|
$.ajax({
|
||||||
contentType: false,
|
url: form_action,
|
||||||
success: function(res) {
|
type: "GET",
|
||||||
// console.log(res.status == true);
|
dataType: 'json',
|
||||||
if(res){
|
processData: false,
|
||||||
if (res.status == true) {
|
contentType: false,
|
||||||
toastr.success('Client removed successfully.', 'success');
|
success: function(res) {
|
||||||
location.reload();
|
|
||||||
} else {
|
$('.loader').fadeOut();
|
||||||
toastr.warning('Failed to remove client.', 'warning');
|
$('.loader-mask').delay(350).fadeOut('slow');
|
||||||
}
|
|
||||||
}
|
if(res){
|
||||||
},
|
if (res.status == true) {
|
||||||
error: function (xhr, status, error) {
|
toastr.success('Client removed successfully.', 'success');
|
||||||
console.error(xhr.responseText);
|
location.reload();
|
||||||
console.error(status, error);
|
} else {
|
||||||
$('.loader').fadeOut();
|
Swal.fire({
|
||||||
$('.loader-mask').delay(350).fadeOut('slow');
|
title: "warning!",
|
||||||
console.log('Something Wrong!', 'warning');
|
text: res.message,
|
||||||
|
icon: "warning"
|
||||||
|
});
|
||||||
|
// toastr.warning(res.message, 'warning');
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
}
|
},
|
||||||
|
error: function (xhr, status, error) {
|
||||||
|
console.error(xhr.responseText);
|
||||||
|
console.error(status, error);
|
||||||
|
$('.loader').fadeOut();
|
||||||
|
$('.loader-mask').delay(350).fadeOut('slow');
|
||||||
|
console.log('Something Wrong!', 'warning');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$(document).on('click', '.client_info', function() {
|
$(document).on('click', '.client_info', function() {
|
||||||
|
|
||||||
$('.loader').fadeIn();
|
$('.loader').fadeIn();
|
||||||
|
|||||||
@ -112,6 +112,10 @@
|
|||||||
<label for="policy_end_date">Policy End Date<span class="text-danger">*</span></label>
|
<label for="policy_end_date">Policy End Date<span class="text-danger">*</span></label>
|
||||||
<input value="" type="text" class="form-control" placeholder="Enter End Date " name="policy_end_date" id="end_date" required>
|
<input value="" type="text" class="form-control" placeholder="Enter End Date " name="policy_end_date" id="end_date" required>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group col-md-4">
|
||||||
|
<label for="reminder_date">Reminder Date<span class="text-danger">*</span></label>
|
||||||
|
<input value="" type="text" class="form-control" placeholder="Enter Reminder Date " name="reminder_date" id="reminder_date" required>
|
||||||
|
</div>
|
||||||
<div class="form-group col-md-4" id="policy_status_field">
|
<div class="form-group col-md-4" id="policy_status_field">
|
||||||
<label for="policy_status">Policy Status</label>
|
<label for="policy_status">Policy Status</label>
|
||||||
<input value="" type="text" class="form-control" placeholder="Policy Status" id="policy_status" readonly>
|
<input value="" type="text" class="form-control" placeholder="Policy Status" id="policy_status" readonly>
|
||||||
@ -174,6 +178,23 @@
|
|||||||
<?php include('other_policy_terms.php'); ?>
|
<?php include('other_policy_terms.php'); ?>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
$('#inception_type').change(function () {
|
||||||
|
var start_data = $('#start_date').parent();
|
||||||
|
var end_data = $('#end_date').parent();
|
||||||
|
var reminder_data = $('#reminder_date').parent();
|
||||||
|
if($(this).prop('checked')){
|
||||||
|
$(start_data).show();
|
||||||
|
$(end_data).show();
|
||||||
|
$(reminder_data).show();
|
||||||
|
}else{
|
||||||
|
$(start_data).hide();
|
||||||
|
$(end_data).hide();
|
||||||
|
$(reminder_data).hide();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
var policy_PrimaryKey = $('#client_id_policy').val();
|
var policy_PrimaryKey = $('#client_id_policy').val();
|
||||||
var policy_client = $('#policy_PrimaryKey').val();
|
var policy_client = $('#policy_PrimaryKey').val();
|
||||||
|
|
||||||
@ -218,6 +239,13 @@
|
|||||||
allowInput: false
|
allowInput: false
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var reminderDatePicker = flatpickr("#reminder_date", {
|
||||||
|
dateFormat: "d-m-Y",
|
||||||
|
defaultDate: endDate,
|
||||||
|
allowInput: false
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
$('#add_form').hide();
|
$('#add_form').hide();
|
||||||
$('.btnBack').hide();
|
$('.btnBack').hide();
|
||||||
|
|
||||||
@ -225,8 +253,10 @@
|
|||||||
if (policy_PrimaryKey !== '') {
|
if (policy_PrimaryKey !== '') {
|
||||||
var policyTable = '';
|
var policyTable = '';
|
||||||
var data = <?= isset($client_policy) ? json_encode($client_policy) : '[]' ?>;
|
var data = <?= isset($client_policy) ? json_encode($client_policy) : '[]' ?>;
|
||||||
// //console.log('client_policy_data',data)
|
console.log('client_policy_data',data)
|
||||||
data.forEach(function(item) {
|
var role = data.role
|
||||||
|
delete data.role;
|
||||||
|
$.each(data, function(index, item) {
|
||||||
// //console.log(item.open_for_enrollment);
|
// //console.log(item.open_for_enrollment);
|
||||||
var patternGMC = /gmc/i; // Case insensitive pattern for 'gmc'
|
var patternGMC = /gmc/i; // Case insensitive pattern for 'gmc'
|
||||||
var patternGPA = /gpa/i; // Case insensitive pattern for 'gpa'
|
var patternGPA = /gpa/i; // Case insensitive pattern for 'gpa'
|
||||||
@ -274,27 +304,40 @@
|
|||||||
|
|
||||||
var policy_name_data = `${item.policy_type_name ?? ''}` + ' - ' + `${item.policy_no ?? ''}`;
|
var policy_name_data = `${item.policy_type_name ?? ''}` + ' - ' + `${item.policy_no ?? ''}`;
|
||||||
|
|
||||||
policyTable += `
|
var role = data.role;
|
||||||
<tr>
|
|
||||||
<td>${item.insurer_short} - ${item.insurer_branch_name}</td>
|
$.each(data, function(index, item) {
|
||||||
<td>${policy_name_data}</td>
|
policyTable += `
|
||||||
<td>${item.branch_name ? item.branch_name : ' - '}</td>
|
<tr>
|
||||||
<td>${tpaValue}</td>
|
<td>${item.insurer_short} - ${item.insurer_branch_name}</td>
|
||||||
<td>${(item.policy_start_date)} / ${(item.policy_end_date)}</td>
|
<td>${policy_name_data}</td>
|
||||||
<td style="text-align: center;">${(enrollmentStatus)}</td>
|
<td>${item.branch_name ? item.branch_name : ' - '}</td>
|
||||||
<td>${checkDateStatus(item.policy_end_date, 1)}</td>
|
<td>${tpaValue}</td>
|
||||||
<td>
|
<td>${(item.policy_start_date)} / ${(item.policy_end_date)}</td>
|
||||||
<div class="btn-group dropdown">
|
<td style="text-align: center;">${(enrollmentStatus)}</td>
|
||||||
<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>
|
<td>${checkDateStatus(item.policy_end_date, 1)}</td>
|
||||||
<div class="dropdown-menu dropdown-menu-right">
|
<td>
|
||||||
<a href="#" data-id="${item.id}" id="${item.policy_id}" class="dropdown-item btnPolicyEdit"><i class="mdi mdi-lead-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit</a>
|
<div class="btn-group dropdown">
|
||||||
<a href="#" data-id="${item.id}" id="${search_term}" data-typeid="${item.policy_type_id}" class="dropdown-item btnPolicyMaster" data-toggle="modal"><i class="mdi mdi-wrench mr-2 text-muted font-18 vertical-middle"></i>Terms</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>
|
||||||
<a href="#" data-id="${item.id}" id="${search_term}" data-typeid="${item.policy_type_id}" class="dropdown-item btnPolicyModel" data-toggle="modal" data-target="#bs-example-modal-lg"><i class="mdi mdi-book-open mr-2 text-muted font-18 vertical-middle"></i>Rack Rate</a>
|
<div class="dropdown-menu dropdown-menu-right">
|
||||||
|
<a href="#" data-id="${item.id}" id="${item.policy_id}" class="dropdown-item btnPolicyEdit"><i class="mdi mdi-lead-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit</a>
|
||||||
|
<a href="#" data-id="${item.id}" id="${search_term}" data-typeid="${item.policy_type_id}" class="dropdown-item btnPolicyMaster" data-toggle="modal"><i class="mdi mdi-wrench mr-2 text-muted font-18 vertical-middle"></i>Terms</a>
|
||||||
|
<a href="#" data-id="${item.id}" id="${search_term}" data-typeid="${item.policy_type_id}" class="dropdown-item btnPolicyModel" data-toggle="modal" data-target="#bs-example-modal-lg"><i class="mdi mdi-book-open mr-2 text-muted font-18 vertical-middle"></i>Rack Rate</a>`;
|
||||||
|
|
||||||
|
// Conditionally render the delete option based on the role
|
||||||
|
if (role !== 3 && role !== 4) {
|
||||||
|
policyTable += `
|
||||||
|
<a href="#" data-id="${item.id}" id="${search_term}" data-typeid="${item.policy_type_id}" class="dropdown-item" onclick="removepolicy(this)"><i class="fa fa-trash mr-2 text-muted font-18 vertical-middle"></i>Delete</a>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
policyTable += `
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</td>
|
||||||
</td>
|
</tr>
|
||||||
</tr>
|
`;
|
||||||
`;
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#policy_table').append(policyTable);
|
$('#policy_table').append(policyTable);
|
||||||
@ -308,6 +351,8 @@
|
|||||||
// ordering: false
|
// ordering: false
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.btnAdd').click(function() {
|
$('.btnAdd').click(function() {
|
||||||
@ -419,7 +464,7 @@
|
|||||||
contentType: false,
|
contentType: false,
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
|
|
||||||
console.log(res);
|
console.log('client policy response', res);
|
||||||
|
|
||||||
$('#policy_form')[0].reset();
|
$('#policy_form')[0].reset();
|
||||||
if (res.status === false) {
|
if (res.status === false) {
|
||||||
@ -511,7 +556,8 @@
|
|||||||
<div class="dropdown-menu dropdown-menu-right">
|
<div class="dropdown-menu dropdown-menu-right">
|
||||||
<a href="#" data-id="${item.id}" id="${item.policy_id}" class="dropdown-item btnPolicyEdit"><i class="mdi mdi-lead-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit</a>
|
<a href="#" data-id="${item.id}" id="${item.policy_id}" class="dropdown-item btnPolicyEdit"><i class="mdi mdi-lead-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit</a>
|
||||||
<a href="#" data-id="${item.id}" id="${search_term}" data-typeid="${item.policy_type_id}" class="dropdown-item btnPolicyMaster" data-toggle="modal"><i class="mdi mdi-wrench mr-2 text-muted font-18 vertical-middle"></i>Terms</a>
|
<a href="#" data-id="${item.id}" id="${search_term}" data-typeid="${item.policy_type_id}" class="dropdown-item btnPolicyMaster" data-toggle="modal"><i class="mdi mdi-wrench mr-2 text-muted font-18 vertical-middle"></i>Terms</a>
|
||||||
<a href="#" data-id="${item.id}" id="${search_term}" data-typeid="${item.policy_type_id}"class="dropdown-item btnPolicyModel" data-toggle="modal" data-target="#bs-example-modal-lg"><i class="mdi mdi-book-open mr-2 text-muted font-18 vertical-middle"></i>Rack Rate</a>
|
<a href="#" data-id="${item.id}" id="${search_term}" data-typeid="${item.policy_type_id}"class="dropdown-item btnPolicyModel" data-toggle="modal" data-target="#bs-example-modal-lg"><i class="mdi mdi-book-open mr-2 text-muted font-18 vertical-middle"></i>Rack Rate</a>
|
||||||
|
<a href="#" data-id="${item.id}" id="${search_term}" data-typeid="${item.policy_type_id}" class="dropdown-item" onclick = "removepolicy(this)"><i class="fa fa-trash mr-2 text-muted font-18 vertical-middle"></i>Delete</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@ -711,6 +757,7 @@
|
|||||||
$('#policy_no').val(res.data.policy_no);
|
$('#policy_no').val(res.data.policy_no);
|
||||||
$('#start_date').val(rearrangeDateFormat(res.data.policy_start_date));
|
$('#start_date').val(rearrangeDateFormat(res.data.policy_start_date));
|
||||||
$('#end_date').val(rearrangeDateFormat(res.data.policy_end_date));
|
$('#end_date').val(rearrangeDateFormat(res.data.policy_end_date));
|
||||||
|
$('#reminder_date').val(rearrangeDateFormat(res.data.reminder_date));
|
||||||
$('#policy_status').val(checkDateStatus(res.data.policy_end_date));
|
$('#policy_status').val(checkDateStatus(res.data.policy_end_date));
|
||||||
$('#gst_no').val(gst);
|
$('#gst_no').val(gst);
|
||||||
$('#policy_status_field').show();
|
$('#policy_status_field').show();
|
||||||
@ -1189,6 +1236,7 @@
|
|||||||
$('#policy_no').val('');
|
$('#policy_no').val('');
|
||||||
$('#start_date').val('');
|
$('#start_date').val('');
|
||||||
$('#end_date').val('');
|
$('#end_date').val('');
|
||||||
|
$('#reminder_date').val('');
|
||||||
$('#base_policy').val('').change();
|
$('#base_policy').val('').change();
|
||||||
|
|
||||||
var client_id = $('#client_id_policy').val();
|
var client_id = $('#client_id_policy').val();
|
||||||
@ -1289,6 +1337,14 @@
|
|||||||
$('#base_policy').prop('required', false);
|
$('#base_policy').prop('required', false);
|
||||||
$('#base_danger').hide();
|
$('#base_danger').hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($('#inception_type').prop('checked')){
|
||||||
|
|
||||||
|
}else{
|
||||||
|
$('#start_date').parent().hide();
|
||||||
|
$('#end_date').parent().hide();
|
||||||
|
$('#reminder_date').parent().hide();
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
@ -1359,6 +1415,7 @@
|
|||||||
|
|
||||||
var dataId = 0;
|
var dataId = 0;
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
$('#base_policy').change(function() {
|
$('#base_policy').change(function() {
|
||||||
|
|
||||||
var client_policy_id = $(this).val() ? $(this).val() : 0;
|
var client_policy_id = $(this).val() ? $(this).val() : 0;
|
||||||
@ -1510,7 +1567,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// append Base Policy to the dropdown for edit only
|
// append Base Policy to the dropdown for edit only
|
||||||
function appendBasePolicyList(data, select = null) {
|
function appendBasePolicyList(data, select = null)
|
||||||
|
{
|
||||||
|
|
||||||
console.log('appendBasePolicyList', 'function called');
|
console.log('appendBasePolicyList', 'function called');
|
||||||
console.log('appendBasePolicyList data', data);
|
console.log('appendBasePolicyList data', data);
|
||||||
@ -1537,4 +1595,65 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function removepolicy(element)
|
||||||
|
{
|
||||||
|
|
||||||
|
Swal.fire({
|
||||||
|
title: "Are you sure?",
|
||||||
|
text: "You need to remove this Policy.",
|
||||||
|
icon: "info",
|
||||||
|
showCancelButton: true,
|
||||||
|
confirmButtonColor: "#3085d6",
|
||||||
|
confirmButtonText: "Yes",
|
||||||
|
}).then((result) => {
|
||||||
|
|
||||||
|
if (result.isConfirmed) {
|
||||||
|
|
||||||
|
$('.loader').fadeIn();
|
||||||
|
$('.loader-mask').fadeIn();
|
||||||
|
|
||||||
|
var id = element.getAttribute('data-id');
|
||||||
|
console.log(id)
|
||||||
|
var form_action = '<?= base_url("client/policy/remove/") ?>' + id;
|
||||||
|
console.log(form_action)
|
||||||
|
$.ajax({
|
||||||
|
url: form_action,
|
||||||
|
type: "GET",
|
||||||
|
dataType: 'json',
|
||||||
|
processData: false,
|
||||||
|
contentType: false,
|
||||||
|
success: function(res) {
|
||||||
|
|
||||||
|
$('.loader').fadeOut();
|
||||||
|
$('.loader-mask').delay(350).fadeOut('slow');
|
||||||
|
|
||||||
|
console.log(res)
|
||||||
|
|
||||||
|
if(res){
|
||||||
|
if (res.status == true) {
|
||||||
|
toastr.success('Policy removed successfully.', 'success');
|
||||||
|
location.reload();
|
||||||
|
} else {
|
||||||
|
Swal.fire({
|
||||||
|
title: "warning!",
|
||||||
|
text: res.message,
|
||||||
|
icon: "warning"
|
||||||
|
});
|
||||||
|
// toastr.warning('Failed to remove policy', 'warning');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function (xhr, status, error) {
|
||||||
|
console.error(xhr.responseText);
|
||||||
|
console.error(status, error);
|
||||||
|
$('.loader').fadeOut();
|
||||||
|
$('.loader-mask').delay(350).fadeOut('slow');
|
||||||
|
console.log('Something Wrong!', 'warning');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -1,4 +1,390 @@
|
|||||||
<div class="tab-pane active show" id="endorsement-dash-tab">
|
<style>
|
||||||
|
|
||||||
<h1>Endorsement</h1>
|
body{
|
||||||
</div>
|
margin-top:20px;
|
||||||
|
background:#FAFAFA;
|
||||||
|
}
|
||||||
|
.order-card {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-c-blue {
|
||||||
|
background: linear-gradient(45deg,#4099ff,#73b4ff);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-c-green {
|
||||||
|
background: linear-gradient(45deg,#2ed8b6,#59e0c5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-c-yellow {
|
||||||
|
background: linear-gradient(45deg,#FFB64D,#ffcb80);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-c-pink {
|
||||||
|
background: linear-gradient(45deg,#FF5370,#ff869a);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-c-red {
|
||||||
|
background: linear-gradient(45deg,#FF4E50,#F9D423);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-c-purple {
|
||||||
|
background: linear-gradient(45deg,#9D50BB,#6E48AA);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-c-orange {
|
||||||
|
background: linear-gradient(45deg,#F2994A,#F2C94C);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-c-teal {
|
||||||
|
background: linear-gradient(45deg,#1ABC9C,#16A085);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-c-cyan {
|
||||||
|
background: linear-gradient(45deg,#00C9FF,#92FE9D);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-c-lime {
|
||||||
|
background: linear-gradient(45deg,#A8E063,#56AB2F);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-c-indigo {
|
||||||
|
background: linear-gradient(45deg,#3F51B5,#5A55AE);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-c-Pelorous {
|
||||||
|
background: linear-gradient(45deg, #00d6db, #00a8b5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-c-Pelorous2 {
|
||||||
|
background: linear-gradient(45deg, #02a8b5, #017f8b);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-c-Pelorous3 {
|
||||||
|
background: linear-gradient(45deg, #098895, #046063);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-c-Grenadier {
|
||||||
|
background: linear-gradient(45deg, #ff9d37, #ff7a10);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-c-Grenadier2 {
|
||||||
|
background: linear-gradient(45deg, #ff8010, #ff4c00);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-c-Grenadier3 {
|
||||||
|
background: linear-gradient(45deg, #f06306, #cc4b05);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-c-SilverChalice {
|
||||||
|
background: linear-gradient(45deg, #a3a8a8, #8f9494);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-c-SilverChalice2 {
|
||||||
|
background: linear-gradient(45deg, #7e8484, #686e6e);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-c-SilverChalice3 {
|
||||||
|
background: linear-gradient(45deg, #5c6363, #434949);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.card {
|
||||||
|
border-radius: 5px;
|
||||||
|
-webkit-box-shadow: 0 1px 2.94px 0.06px rgba(4,26,55,0.16);
|
||||||
|
box-shadow: 0 1px 2.94px 0.06px rgba(4,26,55,0.16);
|
||||||
|
border: none;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
-webkit-transition: all 0.3s ease-in-out;
|
||||||
|
transition: all 0.3s ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card .card-block {
|
||||||
|
padding-top: 10px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
padding-left: 25px;
|
||||||
|
padding-right: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.order-card i {
|
||||||
|
font-size: 26px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.f-left {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.f-right {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.m-b-1{
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-right{
|
||||||
|
width: 100% !important;
|
||||||
|
justify-content: normal !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-body {
|
||||||
|
max-height: 100vh;
|
||||||
|
overflow-y: auto;
|
||||||
|
padding-left: 25px !important;
|
||||||
|
padding-right: 25px !important;
|
||||||
|
padding-top: 10px !important;
|
||||||
|
padding-bottom: 35% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div class="tab-pane active show" id="pending-actions-dash-tab" style="/*padding-left: 35px;*/padding-right: 35px;">
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4 col-xl-3">
|
||||||
|
<div data-toggle="modal" data-target="#right-modal" class="card bg-c-Pelorous order-card" onclick="getPendingActionClientDataForDashboard(this, 'Inception Pending', 'I')">
|
||||||
|
<div class="card-block">
|
||||||
|
<h6 class="m-b-20 font-15">Inception Pending</h6>
|
||||||
|
<h2 class="text-right"><i class="mdi mdi-account-multiple-plus f-left"></i><span><?= $pendingActionsData['inception'] ?></span></h2>
|
||||||
|
<p class="m-b-1"> <span class="f-right"></span></p>
|
||||||
|
<p class="m-b-1"> <span class="f-right"></span></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-4 col-xl-3">
|
||||||
|
<div data-toggle="modal" data-target="#right-modal" class="card bg-c-Pelorous2 order-card" onclick="getPendingActionClientDataForDashboard(this, 'Pending Insurer', 'insurer')">
|
||||||
|
<div class="card-block">
|
||||||
|
<h6 class="m-b-20 font-15">Pending Insurer</h6>
|
||||||
|
<h2 class="text-right"><i class="mdi mdi-account-box f-left"></i><span><?= $pendingActionsData['uhid'] ?></span></h2>
|
||||||
|
<p class="m-b-1">Exported <span class="f-right"><?= $pendingActionsData['uhid_export_count'] ?></span></p>
|
||||||
|
<p class="m-b-1">Not Exported <span class="f-right"><?= $pendingActionsData['uhid_not_export_count'] ?></span></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-4 col-xl-3">
|
||||||
|
<div data-toggle="modal" data-target="#right-modal" class="card bg-c-Pelorous3 order-card" onclick="getPendingActionClientDataForDashboard(this, 'Pending TPA', 'TPA')">
|
||||||
|
<div class="card-block">
|
||||||
|
<h6 class="m-b-20 font-15">Pending TPA</h6>
|
||||||
|
<h2 class="text-right"><i class="mdi mdi-signal-variant f-left"></i><span><?= $pendingActionsData['tpa'] ?></span></h2>
|
||||||
|
<p class="m-b-1">Exported <span class="f-right"><?= $pendingActionsData['tpa_export_count'] ?></span></p>
|
||||||
|
<p class="m-b-1">Not Exported <span class="f-right"><?= $pendingActionsData['tpa_not_export_count'] ?></span></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-4 col-xl-3">
|
||||||
|
<div data-toggle="modal" data-target="#right-modal" class="card bg-c-Grenadier order-card" onclick="getPendingActionClientDataForDashboard(this, 'Correction Pending', 'C')">
|
||||||
|
<div class="card-block">
|
||||||
|
<h6 class="m-b-20 font-15">Correction Pending</h6>
|
||||||
|
<h2 class="text-right"><i class="mdi mdi-account-edit f-left"></i><span><?= $pendingActionsData['correction'] ?></span></h2>
|
||||||
|
<p class="m-b-1">Exported <span class="f-right"><?= $pendingActionsData['correction_export_count'] ?></span></p>
|
||||||
|
<p class="m-b-1">Not Exported <span class="f-right"><?= $pendingActionsData['correction_not_export_count'] ?></span></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-4 col-xl-3">
|
||||||
|
<div data-toggle="modal" data-target="#right-modal" class="card bg-c-Grenadier2 order-card" onclick="getPendingActionClientDataForDashboard(this, 'Deletion Pending', 'D')">
|
||||||
|
<div class="card-block">
|
||||||
|
<h6 class="m-b-20 font-15">Deletion Pending</h6>
|
||||||
|
<h2 class="text-right"><i class="mdi mdi-account-multiple-minus f-left"></i><span><?= $pendingActionsData['deletion'] ?></span></h2>
|
||||||
|
<p class="m-b-1">Exported <span class="f-right"><?= $pendingActionsData['deletion_export_count'] ?></span></p>
|
||||||
|
<p class="m-b-1">Not Exported <span class="f-right"><?= $pendingActionsData['deletion_not_export_count'] ?></span></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-4 col-xl-3">
|
||||||
|
<div data-toggle="modal" data-target="#right-modal" class="card bg-c-Grenadier3 order-card" onclick="getPendingActionClientDataForDashboard(this, 'SI Enhancement Pending', 'SI')">
|
||||||
|
<div class="card-block">
|
||||||
|
<h6 class="m-b-20 font-15">SI Enhancment Pending</h6>
|
||||||
|
<h2 class="text-right"><i class="mdi mdi-account-convert f-left"></i><span><?= $pendingActionsData['si_enhancement'] ?></span></h2>
|
||||||
|
<p class="m-b-1">Exported <span class="f-right"><?= $pendingActionsData['si_export_count'] ?></span></p>
|
||||||
|
<p class="m-b-1">Not Exported <span class="f-right"><?= $pendingActionsData['si_not_export_count'] ?></span></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-4 col-xl-3">
|
||||||
|
<div data-toggle="modal" data-target="#right-modal" class="card bg-c-SilverChalice order-card" onclick="getPendingActionClientDataForDashboard(this, 'Policy Renewal', 'policy')">
|
||||||
|
<div class="card-block">
|
||||||
|
<h6 class="m-b-20 font-15">Policy</h6>
|
||||||
|
<h2 class="text-right"><i class="mdi mdi-autorenew f-left"></i><span><?= $pendingActionsData['PolicyRenewalData'] ?></span></h2>
|
||||||
|
<p class="m-b-1"> <span class="f-right"></span></p>
|
||||||
|
<p class="m-b-1"> <span class="f-right"></span></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-4 col-xl-3">
|
||||||
|
<div class="card bg-c-SilverChalice2 order-card">
|
||||||
|
<div class="card-block">
|
||||||
|
<h6 class="m-b-20 font-15">Ticket</h6>
|
||||||
|
<h2 class="text-right"><i class="mdi mdi-tag f-left"></i><span><?= $pendingActionsData['ticketData'] ?></span></h2>
|
||||||
|
<p class="m-b-1"> <span class="f-right"></span></p>
|
||||||
|
<p class="m-b-1"> <span class="f-right"></span></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Right modal content -->
|
||||||
|
<div id="right-modal" class="modal fade" role="dialog" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-lg modal-right">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header border-0">
|
||||||
|
<h4 class="modal-title" id="right-modalLabel">Modal Heading</h4>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
</div>
|
||||||
|
</div><!-- /.modal-content -->
|
||||||
|
</div><!-- /.modal-dialog -->
|
||||||
|
</div><!-- /.modal -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
function getPendingActionClientDataForDashboard(input, headerName, type)
|
||||||
|
{
|
||||||
|
console.log('hi')
|
||||||
|
$(".modal-body").empty();
|
||||||
|
var nodata = '<center>No data available</center>';
|
||||||
|
$(".modal-body").html(nodata);
|
||||||
|
|
||||||
|
$("#right-modalLabel").html(headerName);
|
||||||
|
$.ajax({
|
||||||
|
url: '<?= base_url("util/featch_dashboard_data/") ?>' + type,
|
||||||
|
type: "GET",
|
||||||
|
dataType: 'json',
|
||||||
|
success: function(res) {
|
||||||
|
|
||||||
|
console.log('responce', res)
|
||||||
|
console.log('responce', res.data)
|
||||||
|
var table;
|
||||||
|
|
||||||
|
var actions = 'inception';
|
||||||
|
|
||||||
|
|
||||||
|
var link = '<?=base_url()?>';
|
||||||
|
|
||||||
|
if (res.data.length !== 0) {
|
||||||
|
table = `<table class="table table-striped table-sm table-centered mb-0"><tbody>`;
|
||||||
|
$.each(res.data, function(index, item) {
|
||||||
|
|
||||||
|
var Params = null;
|
||||||
|
|
||||||
|
if(type == 'insurer'){
|
||||||
|
|
||||||
|
Params = {
|
||||||
|
client_id: item.client_id,
|
||||||
|
client_policy_id: item.client_policy_id,
|
||||||
|
client_branch_id: item.branch_id,
|
||||||
|
event: 'inception',
|
||||||
|
insurer_or_tpa: 'insurer',
|
||||||
|
actions: 'export',
|
||||||
|
};
|
||||||
|
|
||||||
|
}else if(type == 'TPA'){
|
||||||
|
Params = {
|
||||||
|
client_id: item.client_id,
|
||||||
|
client_policy_id: item.client_policy_id,
|
||||||
|
client_branch_id: item.branch_id,
|
||||||
|
event: 'inception',
|
||||||
|
insurer_or_tpa: 'insurer',
|
||||||
|
actions: 'export',
|
||||||
|
};
|
||||||
|
}else if(type == 'I'){
|
||||||
|
Params = {
|
||||||
|
client_id: item.client_id,
|
||||||
|
client_policy_id: item.client_policy_id,
|
||||||
|
client_branch_id: item.branch_id,
|
||||||
|
actions: 'inception'
|
||||||
|
};
|
||||||
|
}else if(type == 'D'){
|
||||||
|
Params = {
|
||||||
|
client_id: item.client_id,
|
||||||
|
client_policy_id: item.client_policy_id,
|
||||||
|
client_branch_id: item.branch_id,
|
||||||
|
event: 'deletion',
|
||||||
|
actions: 'export',
|
||||||
|
insurer_or_tpa: 'tpa',
|
||||||
|
};
|
||||||
|
}else if(type == 'C'){
|
||||||
|
Params = {
|
||||||
|
client_id: item.client_id,
|
||||||
|
client_policy_id: item.client_policy_id,
|
||||||
|
client_branch_id: item.branch_id,
|
||||||
|
event: 'correction',
|
||||||
|
insurer_or_tpa: 'insurer',
|
||||||
|
actions: 'export',
|
||||||
|
};
|
||||||
|
}else if(type == 'SI'){
|
||||||
|
Params = {
|
||||||
|
client_id: item.client_id,
|
||||||
|
client_policy_id: item.client_policy_id,
|
||||||
|
client_branch_id: item.branch_id,
|
||||||
|
event: 'si_enhancement',
|
||||||
|
actions: 'export',
|
||||||
|
insurer_or_tpa: 'tpa',
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(Params);
|
||||||
|
console.log(Params);
|
||||||
|
|
||||||
|
if(Params){
|
||||||
|
var queryString = generateQueryString(Params);
|
||||||
|
console.log(queryString)
|
||||||
|
var tabId = type !== 'I' ? '#KYC-DOC-tab' : '';
|
||||||
|
link += 'employee/upload?' + queryString + tabId;
|
||||||
|
}else{
|
||||||
|
link = '';
|
||||||
|
}
|
||||||
|
console.log(link)
|
||||||
|
|
||||||
|
table += `<tr><td onclick="linkRedirect('${link}')">${item.client_name} - ${item.branch_name} - ${item.policy_name}</td></tr>`;
|
||||||
|
|
||||||
|
});
|
||||||
|
table += "</tbody></table>";
|
||||||
|
} else {
|
||||||
|
table = '<center>No data available</center>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$(".modal-body").html(table);
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
error: function(xhr, status, error) {
|
||||||
|
console.error(xhr.responseText);
|
||||||
|
console.error(status, error);
|
||||||
|
$(".modal-body").html(nodata);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function generateQueryString(queryParams)
|
||||||
|
{
|
||||||
|
return Object.keys(queryParams)
|
||||||
|
.map(key => encodeURIComponent(key) + '=' + encodeURIComponent(queryParams[key]))
|
||||||
|
.join('&');
|
||||||
|
}
|
||||||
|
|
||||||
|
function linkRedirect(link)
|
||||||
|
{
|
||||||
|
console.log(link);
|
||||||
|
console.log(typeof link);
|
||||||
|
|
||||||
|
if(link){
|
||||||
|
window.location.href = link;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
@ -1,115 +1,336 @@
|
|||||||
|
<!-- Bootstrap CSS -->
|
||||||
|
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.6.0/css/bootstrap.min.css" rel="stylesheet">
|
||||||
|
|
||||||
|
<!-- jQuery -->
|
||||||
|
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||||
|
|
||||||
|
<!-- Bootstrap JS -->
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.6.0/js/bootstrap.bundle.min.js"></script>
|
||||||
|
|
||||||
|
<!-- Bootstrap JS (ensure this is included) -->
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.6.0/js/bootstrap.min.js"></script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
/* Existing CSS ... */
|
||||||
|
|
||||||
|
.carousel-control-prev {
|
||||||
|
left: -38px;
|
||||||
|
}
|
||||||
|
|
||||||
.status-option {
|
.status-option {
|
||||||
padding: 0.5rem !important;
|
padding: 0.5rem !important;
|
||||||
background-color: darkgrey;
|
background-color: darkgrey;
|
||||||
}
|
}
|
||||||
|
|
||||||
.emp-count-view-click {
|
.emp-count-view-click {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.emp-status .col-6 {
|
.emp-status .col-6 {
|
||||||
/* padding-bottom: 1rem; */
|
padding-bottom: 0.3rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.emp-status label {
|
.emp-status label {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.client-branch-label {
|
.client-branch-label {
|
||||||
padding: 0.2rem;
|
padding: 0.2rem;
|
||||||
border-radius: 0.2rem;
|
border-radius: 0.2rem;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.scroll-container {
|
.scroll-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.scroll-item {
|
.scroll-item {
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
width: 25%; /* Adjust based on the number of items you want to show */
|
width: 33%; /* Adjust based on the number of items you want to show */
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
}
|
}
|
||||||
.center_text{
|
|
||||||
text-align: center;
|
@media (min-width: 1200px) {
|
||||||
}
|
.col-xl-3 {
|
||||||
.card-body {
|
max-width: 32% !important;
|
||||||
padding: 0rem ;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.number_css{
|
.center_text {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-body {
|
||||||
|
padding: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.number_css {
|
||||||
font-family: Roboto, sans-serif;
|
font-family: Roboto, sans-serif;
|
||||||
color: #343a40;
|
color: #343a40;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
.label_bottom_reduce{
|
|
||||||
|
.label_bottom_reduce {
|
||||||
margin-bottom: .0rem;
|
margin-bottom: .0rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.search-input {
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
padding: 0.5rem;
|
||||||
|
border-radius: 0.25rem;
|
||||||
|
border: 1px solid #ced4da;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.carousel-inner {
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.carousel-item {
|
||||||
|
height: auto; /* Adjust if needed */
|
||||||
|
/* margin-left: 80px; */
|
||||||
|
}
|
||||||
|
|
||||||
|
.card {
|
||||||
|
margin: 0 auto; /* Center card in carousel item */
|
||||||
|
}
|
||||||
|
|
||||||
|
.carousel-control-prev, .carousel-control-next {
|
||||||
|
width: 5%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.carousel-control-prev-icon, .carousel-control-next-icon {
|
||||||
|
background-color: rgba(0,0,0,0.5); /* Change color as needed */
|
||||||
|
}
|
||||||
|
|
||||||
|
.carousel-control-prev-icon {
|
||||||
|
background-image: url('data:image/svg+xml;charset=utf8,%3Csvg xmlns%3D"http://www.w3.org/2000/svg" fill%3D"%23000000" viewBox%3D"0 0 8 8"%3E%3Cpath d%3D"M2.5 0L4 1.5 1.5 4 4 6.5 2.5 8 0 4 2.5 0z"/%3E%3C/svg%3E');
|
||||||
|
}
|
||||||
|
|
||||||
|
.carousel-control-next-icon {
|
||||||
|
background-image: url('data:image/svg+xml;charset=utf8,%3Csvg xmlns%3D"http://www.w3.org/2000/svg" fill%3D"%23000000" viewBox%3D"0 0 8 8"%3E%3Cpath d%3D"M5.5 8L4 6.5 6.5 4 4 1.5 5.5 0l4 4-4 4z"/%3E%3C/svg%3E');
|
||||||
|
}
|
||||||
|
|
||||||
|
.show-item {
|
||||||
|
display: inline-block !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hide-item {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-page {
|
||||||
|
background-color: #e8eff5;
|
||||||
|
}
|
||||||
|
|
||||||
|
html {
|
||||||
|
background-color: #e8eff5;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div class="tab-pane fade" id="enrollment-dash-tab">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="tab-pane fade" id="enrollment-dash-tab">
|
||||||
<div class="row visa_status_count_view">
|
<div class="row visa_status_count_view">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="card">
|
<div class="card" style="border: 0px;">
|
||||||
<div class="card-header"></div>
|
<div class="card-body status-option" id="statusContent" style="padding: 0.5rem !important;background-color: white;">
|
||||||
<div class="card-body status-option" id="statusContent" style="padding: 0.5rem !important;background-color: #edf1f5;">
|
<!-- Search Input Field -->
|
||||||
<div class="scroll-container">
|
<div class="row">
|
||||||
<?php foreach ($client_branch_emp_list as $clients) { ?>
|
<div class="col-3">
|
||||||
<?php foreach ($clients['branches'] as $branches) { ?>
|
<select class="form-control" name="" id="">
|
||||||
<div class="scroll-item">
|
<option value="">Open Enrollment</option>
|
||||||
<div class="card">
|
<option value="">Close Enrollment</option>
|
||||||
<div class="card-body emp-count-view-click">
|
</select>
|
||||||
<div class="d-flex justify-content-center">
|
</div>
|
||||||
<div class="col-12 center_text" style="background-color: #02a8b5;">
|
<div class="col-5"></div>
|
||||||
<label for="" class="client-branch-label">
|
<div class="col-4">
|
||||||
<?php echo isset($clients['short_name']) ? $clients['short_name'] : 'N/A'; ?> -
|
<input type="text" id="searchInput" class="search-input" placeholder="Search by client or branch">
|
||||||
<?php echo isset($branches['branch_name']) ? $branches['branch_name'] : 'N/A'; ?>
|
</div>
|
||||||
</label>
|
</div>
|
||||||
|
<!-- Carousel Structure -->
|
||||||
|
<div id="carouselExampleControls" class="carousel slide" data-ride="carousel" data-interval="false">
|
||||||
|
<div class="carousel-inner">
|
||||||
|
<?php
|
||||||
|
$itemsPerSlide = 3; // Number of items per slide
|
||||||
|
$currentItem = 0; // Counter for items
|
||||||
|
$isActive = true; // Variable to set the first item as active
|
||||||
|
foreach ($client_branch_emp_list as $clients) {
|
||||||
|
foreach ($clients['branches'] as $branches) {
|
||||||
|
// Start a new carousel item if needed
|
||||||
|
if ($currentItem % $itemsPerSlide == 0) {
|
||||||
|
if (!$isActive) echo '</div>'; // Close previous carousel item
|
||||||
|
echo '<div class="carousel-item' . ($isActive ? ' active' : '') . '">';
|
||||||
|
$isActive = false;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<!-- New Card Layout for each item -->
|
||||||
|
<div class="col-xl-3 col-md-6 d-inline-block scroll-item carousel-slide-item" data-client="<?php echo $clients['short_name']; ?>" data-branch="<?php echo $branches['branch_name']; ?>">
|
||||||
|
<div class="card" style="box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);">
|
||||||
|
<div class="card-header" >
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-8 center_text emp-count-view-click" >
|
||||||
|
<div class="d-flex justify-content-between">
|
||||||
|
<div class="w-100 text-center" >
|
||||||
|
<h3 class="my-2 py-1 number_css" ><span data-plugin="counterup" style="margin-left: 113px;font-size: 2.0rem;" onclick="enrollment_list(this, 'emp_count_view_click')"><?php echo isset($branches['employees']) ? count($branches['employees']) : '0'; ?></span></h3>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12 center_text emp-count-view-click" >
|
||||||
|
<div class="d-flex justify-content-between">
|
||||||
|
|
||||||
|
<div class="w-100 text-center" >
|
||||||
|
<h5 class="text-muted font-weight-normal mt-0 text-truncate" title="Branch Info" style="text-align: center;"><?php echo isset($clients['short_name']) ? $clients['short_name'] : 'N/A'; ?> - <?php echo isset($branches['branch_name']) ? $branches['branch_name'] : 'N/A'; ?></h5>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="col-3 center_text emp-count-view-click" >
|
||||||
|
<div class="d-flex justify-content-between">
|
||||||
|
<div class="w-100 text-center" >
|
||||||
|
<p class="mb-0 text-muted">
|
||||||
|
<span class="text-success mr-2"></span>
|
||||||
|
<span class="text-nowrap">Emp Count</span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row emp-status">
|
<div class="card-body add_card_background_random" >
|
||||||
<div class="col-12 center_text">
|
|
||||||
<span class="number_css" style="font-size: x-large;"><?php echo isset($branches['employees']) ? count($branches['employees']) : '0'; ?></span><br>
|
<input type="text" class="client_id" value="<?php echo $clients['client_id']; ?>" hidden>
|
||||||
<i class="fa fa-users" aria-hidden="true"></i>
|
<input type="text" class="client_branch_id" value="<?php echo $branches['client_branch_id'] ?>" hidden>
|
||||||
|
<div class="row emp-status" style="margin-top: -9px;">
|
||||||
|
<div class="col-6 center_text emp-count-view-click" >
|
||||||
|
<span style="font-size: large;color: white !important;" class="number_css" onclick="enrollment_list(this, 'emp_logged_in_view_click')"><?php echo isset($branches['emp_login']) ? $branches['emp_login'] : '0'; ?></span><br>
|
||||||
|
<span class="text-nowrap " style="color: currentColor;font-size: 15px;">Logged-In</span>
|
||||||
|
</div>
|
||||||
|
<div class="col-6 center_text emp-count-view-click" >
|
||||||
|
<span style="font-size: large;color: white !important;" class="number_css" onclick="enrollment_list(this, 'emp_not_logged_in_view_click')"><?php echo isset($branches['emp_login']) ? count($branches['employees']) - $branches['emp_login'] : '0'; ?></span><br>
|
||||||
|
<span class="text-nowrap" style="color: currentColor;font-size: 15px;margin-left: -13px;">Not Logged-In</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6 center_text">
|
|
||||||
<span style="font-size: x-large;" class="number_css"><?php echo isset($branches['emp_login']) ? $branches['emp_login'] : '0'; ?></span><br>
|
|
||||||
<label class="label_bottom_reduce" for="" style="color: gray;font-family: var(--bs-body-font-family);font-size: var(--bs-body-font-size);">Logged-In</label>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6 center_text">
|
<div class="row emp-status" style="margin-top: -9px;">
|
||||||
<span style="font-size: x-large;" class="number_css"><?php echo isset($branches['emp_enroll']) ? count($branches['employees']) - $branches['emp_enroll'] : '0'; ?></span><br>
|
|
||||||
<label class="label_bottom_reduce" for="" style="color: gray;font-family: var(--bs-body-font-family);font-size: var(--bs-body-font-size);">Draft</label>
|
<div class="col-6 center_text emp-count-view-click" >
|
||||||
</div>
|
<span style="font-size: large;color: white !important;" class="number_css" onclick="enrollment_list(this, 'emp_not_enrolled_view_click')"><?php echo isset($branches['emp_enroll']) ? count($branches['employees']) - $branches['emp_enroll'] : '0'; ?></span><br>
|
||||||
|
<span class="text-nowrap" style="color: currentColor;font-size: 15px;">Draft</span>
|
||||||
|
</div>
|
||||||
<div class="col-6 center_text">
|
<div class="col-6 center_text emp-count-view-click" >
|
||||||
<span style="font-size: x-large;" class="number_css"><?php echo isset($branches['emp_login']) ? count($branches['employees']) - $branches['emp_login'] : '0'; ?></span><br>
|
<span style="font-size: large;color: white !important;" class="number_css" onclick="enrollment_list(this, 'emp_enrolled_view_click')"><?php echo isset($branches['emp_enroll']) ? $branches['emp_enroll'] : '0'; ?></span><br>
|
||||||
<label class="label_bottom_reduce" for="" style="color: gray;font-family: var(--bs-body-font-family);font-size: var(--bs-body-font-size);">Not Logged-In</label>
|
<span class="text-nowrap" style="color: currentColor;font-size: 15px;">Enrolled</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6 center_text">
|
|
||||||
<span style="font-size: x-large;" class="number_css"><?php echo isset($branches['emp_enroll']) ? $branches['emp_enroll'] : '0'; ?></span><br>
|
|
||||||
<label class="label_bottom_reduce" for="" style="color: gray;font-family: var(--bs-body-font-family);font-size: var(--bs-body-font-size);">Enrolled</label>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<?php
|
||||||
<?php } ?>
|
$currentItem++;
|
||||||
<?php } ?>
|
}
|
||||||
|
}
|
||||||
|
if ($currentItem % $itemsPerSlide != 0) echo '</div>'; // Close the last carousel item
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev">
|
||||||
|
<!-- <span class="carousel-control-prev-icon" aria-hidden="true"></span> -->
|
||||||
|
<!-- <span class="sr-only">Previous</span> -->
|
||||||
|
<i class="fas fa-angle-left"></i>
|
||||||
|
</a>
|
||||||
|
<a class="carousel-control-next" href="#carouselExampleControls" role="button" data-slide="next">
|
||||||
|
<span class="carousel-control-next-icon" aria-hidden="true"></span>
|
||||||
|
<span class="sr-only">Next</span>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('.scroll-container').on('wheel', function(e) {
|
// Scroll functionality
|
||||||
if (e.originalEvent.deltaY < 0) {
|
$('.scroll-container').on('wheel', function(e) {
|
||||||
this.scrollLeft -= 100; // Adjust scroll speed
|
if (e.originalEvent.deltaY < 0) {
|
||||||
} else {
|
this.scrollLeft -= 100; // Adjust scroll speed
|
||||||
this.scrollLeft += 100; // Adjust scroll speed
|
} else {
|
||||||
}
|
this.scrollLeft += 100; // Adjust scroll speed
|
||||||
e.preventDefault();
|
}
|
||||||
});
|
e.preventDefault();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Search functionality
|
||||||
|
$('#searchInput').on('input', function() {
|
||||||
|
var searchValue = $(this).val().toLowerCase();
|
||||||
|
var firstVisibleItem = null;
|
||||||
|
|
||||||
|
$('.scroll-item').each(function() {
|
||||||
|
var itemText = $(this).find('h5').text().toLowerCase();
|
||||||
|
|
||||||
|
if (itemText.indexOf(searchValue) > -1) {
|
||||||
|
$(this).removeClass('hide-item').addClass('show-item'); // Show item
|
||||||
|
|
||||||
|
if (!firstVisibleItem) {
|
||||||
|
firstVisibleItem = $(this);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$(this).removeClass('show-item').addClass('hide-item'); // Hide item
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (firstVisibleItem) {
|
||||||
|
// Remove active class from all carousel items
|
||||||
|
$('.carousel-item').removeClass('active');
|
||||||
|
|
||||||
|
// Add active class to the parent carousel item of the first visible item
|
||||||
|
firstVisibleItem.closest('.carousel-item').addClass('active');
|
||||||
|
|
||||||
|
// Scroll to the first visible item
|
||||||
|
$('html, body').animate({
|
||||||
|
scrollTop: firstVisibleItem.offset().top
|
||||||
|
}, 500);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
function enrollment_list(current_element, type) {
|
||||||
|
var clientId = $(current_element).closest('.carousel-slide-item').find('.client_id').val();
|
||||||
|
var branchId = $(current_element).closest('.carousel-slide-item').find('.client_branch_id').val();
|
||||||
|
|
||||||
|
var baseUrl = '<?php echo base_url(); ?>'; // Adjust this to your actual base URL if needed
|
||||||
|
var url = baseUrl + 'employee/enrollment-list'; // Change this to the actual URL of your enroller_list page
|
||||||
|
|
||||||
|
var params = new URLSearchParams({
|
||||||
|
client_id: clientId,
|
||||||
|
branch_id: branchId,
|
||||||
|
type: type
|
||||||
|
});
|
||||||
|
|
||||||
|
// Redirect to the constructed URL with parameters
|
||||||
|
window.location.href = `${url}?${params.toString()}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
// Array of predefined colors
|
||||||
|
var colors = ['yellowgreen', 'indianred', 'cadetblue', 'burlywood', 'darkolivegreen'];
|
||||||
|
|
||||||
|
// Counter to keep track of the current color index
|
||||||
|
var colorIndex = 0;
|
||||||
|
|
||||||
|
// Apply a color from the array to each card-header in sequence
|
||||||
|
document.querySelectorAll('.add_card_background_random').forEach(function(header) {
|
||||||
|
header.style.backgroundColor = colors[colorIndex];
|
||||||
|
colorIndex = (colorIndex + 1) % colors.length; // Move to the next color, cycling back to 0 if needed
|
||||||
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -228,6 +228,7 @@
|
|||||||
},
|
},
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
var data = JSON.parse(response);
|
var data = JSON.parse(response);
|
||||||
|
console.log(data);
|
||||||
var table = $('#tickets-table').DataTable();
|
var table = $('#tickets-table').DataTable();
|
||||||
table.clear();
|
table.clear();
|
||||||
|
|
||||||
@ -277,6 +278,12 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
table.draw();
|
table.draw();
|
||||||
|
|
||||||
|
function getUrlParameter(name) {
|
||||||
|
var params = new URLSearchParams(window.location.search);
|
||||||
|
return params.get(name);
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
error: function(xhr, status, error) {
|
error: function(xhr, status, error) {
|
||||||
console.error('Error fetching data from API:', error);
|
console.error('Error fetching data from API:', error);
|
||||||
@ -286,6 +293,43 @@
|
|||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
|
function getUrlParameter(name) {
|
||||||
|
var params = new URLSearchParams(window.location.search);
|
||||||
|
return params.get(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check for URL parameters and set form values
|
||||||
|
var client_id = getUrlParameter('client_id');
|
||||||
|
var branch_id = getUrlParameter('branch_id');
|
||||||
|
var type = getUrlParameter('type');
|
||||||
|
|
||||||
|
if (client_id) {
|
||||||
|
$('#clients').val(client_id).trigger('change'); // Set client ID and trigger change event to populate branches
|
||||||
|
}
|
||||||
|
|
||||||
|
if (branch_id) {
|
||||||
|
setTimeout(function() { // Ensure branches are populated before setting branch ID
|
||||||
|
$('#branch_id').val(branch_id).trigger('change');
|
||||||
|
if($('#branch_id').val() != 0){
|
||||||
|
$('#get-emp-list').click().trigger();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}, 500);
|
||||||
|
|
||||||
|
}
|
||||||
|
if (history.pushState) {
|
||||||
|
var newUrl = window.location.protocol + "//" + window.location.host + window.location.pathname;
|
||||||
|
window.history.pushState({path: newUrl}, '', newUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
// var type = getUrlParameter('type');
|
||||||
|
console.log("------------------------");
|
||||||
|
console.log(type);
|
||||||
|
$('#' + type).click().trigger();
|
||||||
|
}, 1000);
|
||||||
|
|
||||||
$('#clients').select2();
|
$('#clients').select2();
|
||||||
$('#branch_id').select2();
|
$('#branch_id').select2();
|
||||||
var table = $('#tickets-table').DataTable({
|
var table = $('#tickets-table').DataTable({
|
||||||
|
|||||||
@ -93,26 +93,15 @@
|
|||||||
class="mdi mdi-dots-horizontal"></i></a>
|
class="mdi mdi-dots-horizontal"></i></a>
|
||||||
<div class="dropdown-menu dropdown-menu-right">
|
<div class="dropdown-menu dropdown-menu-right">
|
||||||
<?php if ($file['status'] == 'failed') { ?>
|
<?php if ($file['status'] == 'failed') { ?>
|
||||||
<a data-id="<?= htmlspecialchars(json_encode(['client_id' => $file['client_id'], 'client_policy_id' => $file['client_policy_id'], 'client_branch_id' => $file['client_branch_id'], 'action' => $file['action']])) ?>"
|
<a data-id="<?= htmlspecialchars(json_encode(['client_id' => $file['client_id'], 'client_policy_id' => $file['client_policy_id'], 'client_branch_id' => $file['client_branch_id'], 'action' => $file['action']])) ?>" data-toggle="modal" data-target="#file-upload-modal" class="dropdown-item upload_button" href="#"><i class="mdi mdi-upload mr-2 text-muted font-18 vertical-middle"></i>Re-Upload</a>
|
||||||
data-toggle="modal" data-target="#file-upload-modal"
|
|
||||||
class="dropdown-item upload_button" href="#"><i
|
|
||||||
class="mdi mdi-upload mr-2 text-muted font-18 vertical-middle"></i>Re-Upload</a>
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<a class="dropdown-item"
|
|
||||||
href="<?= base_url("util/download-file-list/") . $file['id']; ?>"><i
|
|
||||||
class="mdi mdi-download mr-2 text-muted font-18 vertical-middle"></i>Download</a>
|
|
||||||
|
|
||||||
<a data-id="<?php echo $file['id'] ?>" data-toggle="modal"
|
<a class="dropdown-item" href="<?= base_url("util/download-file-list/") . $file['id']; ?>"><i class="mdi mdi-download mr-2 text-muted font-18 vertical-middle"></i>Download</a>
|
||||||
data-target="#full-width-modal-emp-list" class="dropdown-item view_emp_list"
|
<a data-id="<?php echo $file['id'] ?>" data-toggle="modal" data-target="#full-width-modal-emp-list" class="dropdown-item view_emp_list" href="#"><i class="mdi mdi-eye mr-2 text-muted font-18 vertical-middle"></i>View</a>
|
||||||
href="#"><i
|
|
||||||
class="mdi mdi-eye mr-2 text-muted font-18 vertical-middle"></i>View</a>
|
|
||||||
<?php if ($file['status'] == 'success') { ?>
|
<?php if ($file['status'] == 'success') { ?>
|
||||||
|
<a data-id="<?php echo $file['id'] ?>" class="dropdown-item truncate" href="#"><i class="mdi mdi-delete mr-2 text-muted font-18 vertical-middle"></i>Truncate</a>
|
||||||
|
<?php } ?>
|
||||||
<a data-id="<?php echo $file['id'] ?>" class="dropdown-item truncate" href="#"><i
|
|
||||||
class="mdi mdi-delete mr-2 text-muted font-18 vertical-middle"></i>Truncate</a>
|
|
||||||
<?php
|
|
||||||
} ?>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -256,6 +245,7 @@ $('body').on('click', '.upload_button', function() {
|
|||||||
$('#file_upload_actions').val(fileId.action)
|
$('#file_upload_actions').val(fileId.action)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
$('body').on('click', '.truncate', function(event) {
|
$('body').on('click', '.truncate', function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
// console.log(event);
|
// console.log(event);
|
||||||
@ -273,40 +263,29 @@ $('body').on('click', '.truncate', function(event) {
|
|||||||
if (result.isConfirmed) {
|
if (result.isConfirmed) {
|
||||||
$('.loader').fadeIn();
|
$('.loader').fadeIn();
|
||||||
$('.loader-mask').fadeIn();
|
$('.loader-mask').fadeIn();
|
||||||
var apiURL = '<?php echo base_url(); ?>' + 'employee/truncate/' + fileId;
|
var apiURL = '<?php echo base_url(); ?>employee/truncate/' + fileId;
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: apiURL,
|
url: apiURL,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
// "Content-Type": "application/json",
|
|
||||||
"X-Requested-With": "XMLHttpRequest"
|
"X-Requested-With": "XMLHttpRequest"
|
||||||
},
|
},
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
// console.log(response.code);
|
|
||||||
// console.log(response.dataStatus);
|
|
||||||
// console.log(response.data);
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
$('.loader').fadeOut();
|
$('.loader').fadeOut();
|
||||||
$('.loader-mask').delay(350).fadeOut('slow');
|
$('.loader-mask').delay(350).fadeOut('slow');
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
|
if (response.code === 200 && response.dataStatus === true && response.data !== "") {
|
||||||
if (response.code === 200 && response.dataStatus === true && response
|
|
||||||
.data !== "") {
|
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
title: "Deleted!",
|
title: "Deleted!",
|
||||||
// text: "Data from truncated",
|
|
||||||
icon: "success"
|
icon: "success"
|
||||||
});
|
});
|
||||||
} else if (response.code === 404 && response.dataStatus === false) {
|
} else if (response.code === 404 && response.dataStatus === false) {
|
||||||
console.error('no data found', response);
|
console.error('No data found', response);
|
||||||
Swal.fire({
|
handleNoDataFound(response, fileId);
|
||||||
title: "Failed!",
|
|
||||||
text: response.message,
|
|
||||||
icon: "error"
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
title: "Failed!",
|
title: "Failed!",
|
||||||
text: 'Something went wrong! Try later',
|
text: 'Something went wrong! Try later',
|
||||||
@ -324,13 +303,77 @@ $('body').on('click', '.truncate', function(event) {
|
|||||||
toastr.error('Something went wrong! Try later', 'Error');
|
toastr.error('Something went wrong! Try later', 'Error');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
function handleNoDataFound(response, fileId) {
|
||||||
|
if (response.role == 1 || response.role == 5) {
|
||||||
|
Swal.fire({
|
||||||
|
title: response.message,
|
||||||
|
showCancelButton: true,
|
||||||
|
confirmButtonText: "Delete",
|
||||||
|
confirmButtonColor: "#ff3333",
|
||||||
|
}).then((result) => {
|
||||||
|
|
||||||
|
console.log(result);
|
||||||
|
if (result.isConfirmed) {
|
||||||
|
$('.loader').fadeIn();
|
||||||
|
$('.loader-mask').fadeIn();
|
||||||
|
var apiURL = '<?php echo base_url(); ?>employee/truncate/' + fileId + '/' + <?= get_role_id(); ?>;
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url: apiURL,
|
||||||
|
method: 'GET',
|
||||||
|
headers: {
|
||||||
|
"X-Requested-With": "XMLHttpRequest"
|
||||||
|
},
|
||||||
|
success: function(response) {
|
||||||
|
setTimeout(function() {
|
||||||
|
$('.loader').fadeOut();
|
||||||
|
$('.loader-mask').delay(350).fadeOut('slow');
|
||||||
|
}, 1000);
|
||||||
|
|
||||||
|
if (response.code === 200 && response.dataStatus === true && response.data !== "") {
|
||||||
|
Swal.fire({
|
||||||
|
title: "Deleted!",
|
||||||
|
icon: "success"
|
||||||
|
});
|
||||||
|
} else if (response.code === 404 && response.dataStatus === false) {
|
||||||
|
console.error('No data found', response);
|
||||||
|
Swal.fire({
|
||||||
|
title: "Failed!",
|
||||||
|
text: response.message,
|
||||||
|
icon: "error"
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
Swal.fire({
|
||||||
|
title: "Failed!",
|
||||||
|
text: 'Something went wrong! Try later',
|
||||||
|
icon: "error"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(xhr, status, error) {
|
||||||
|
setTimeout(function() {
|
||||||
|
$('.loader').fadeOut();
|
||||||
|
$('.loader-mask').delay(350).fadeOut('slow');
|
||||||
|
}, 1000);
|
||||||
|
|
||||||
|
console.error('Error fetching data from API:', error);
|
||||||
|
console.error('Something went wrong! Try later', 'Error');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
Swal.fire({
|
||||||
|
title: "Failed!",
|
||||||
|
text: response.message,
|
||||||
|
icon: "error"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$('#uploadForm').submit(function() {
|
$('#uploadForm').submit(function() {
|
||||||
|
|
||||||
@ -392,7 +435,6 @@ $('#uploadForm').submit(function() {
|
|||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
$('body').on('click', '.reload', function() {
|
$('body').on('click', '.reload', function() {
|
||||||
|
|
||||||
console.log('status');
|
console.log('status');
|
||||||
|
|||||||
@ -243,9 +243,6 @@
|
|||||||
let PNCount = parseInt(localStorage.getItem('pullNotificationCount'));
|
let PNCount = parseInt(localStorage.getItem('pullNotificationCount'));
|
||||||
let PACount = parseInt(localStorage.getItem('pendingActionCount'));
|
let PACount = parseInt(localStorage.getItem('pendingActionCount'));
|
||||||
|
|
||||||
console.log('PNCount', PNCount);
|
|
||||||
console.log('PACount', PACount);
|
|
||||||
|
|
||||||
totalcount = PNCount + PACount
|
totalcount = PNCount + PACount
|
||||||
$('#notification_count').html(totalcount);
|
$('#notification_count').html(totalcount);
|
||||||
|
|
||||||
@ -319,30 +316,99 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (let key in response) {
|
for (let key in response) {
|
||||||
pendingActionCount += response[key].length;
|
// console.log(response[key].length)
|
||||||
|
// console.log('type', typeof response[key].length)
|
||||||
|
// console.log('key', response[key])
|
||||||
|
if(response[key].length != 'undefined' && response[key].length != undefined)
|
||||||
|
{
|
||||||
|
pendingActionCount = pendingActionCount + response[key].length;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log(pendingActionCount);
|
||||||
|
|
||||||
let messagesList = $('#messages-list-2');
|
let messagesList = $('#messages-list-2');
|
||||||
messagesList.empty();
|
messagesList.empty();
|
||||||
|
|
||||||
console.log(response.inception)
|
|
||||||
console.log('correction', typeof response.inception)
|
|
||||||
|
|
||||||
|
|
||||||
if (response.inception) {
|
if (response.inception) {
|
||||||
if (Array.isArray(response.inception)) {
|
$.each(response.inception, function(index, item) {
|
||||||
response.inception.forEach(function(item, index) {
|
|
||||||
|
var queryParams = {
|
||||||
|
client_id: item.client_id,
|
||||||
|
client_policy_id: item.client_policy_id,
|
||||||
|
client_branch_id: item.branch_id,
|
||||||
|
actions: 'inception'
|
||||||
|
};
|
||||||
|
|
||||||
|
const queryString = objectToQueryString(queryParams);
|
||||||
|
|
||||||
|
var url = 'employee/upload?' + queryString
|
||||||
|
////console.log(url)
|
||||||
|
|
||||||
|
|
||||||
|
var toast_body_css = 'background : #bfd7eb !important;';
|
||||||
|
var toast_head_css = 'background-color : rgb(2, 168, 181) !important; color :#000; border-bottom: 0;';
|
||||||
|
var toast_icon = 'mdi mdi-checkbox-marked-circle mr-auto';
|
||||||
|
var toast_status_word = 'Info';
|
||||||
|
|
||||||
|
if (!item.branch_name.toLowerCase().includes('branch')) {
|
||||||
|
|
||||||
|
//console.log(item.branch_name)
|
||||||
|
item.branch_name += ' branch';
|
||||||
|
}
|
||||||
|
|
||||||
|
////console.log(item.branch_name);
|
||||||
|
|
||||||
|
var toast_body_data = item.client_name + '( ' + item.branch_name + ' ) ' + ' - ' + item.policy_name;
|
||||||
|
|
||||||
|
////console.log(toast_body_data);
|
||||||
|
|
||||||
|
var html = ` <li data-id="" data-url="${url}">
|
||||||
|
<div class="p-3">
|
||||||
|
<div class="toast fade show" role="alert" aria-live="assertive" aria-atomic="true" data-toggle="toast">
|
||||||
|
<div class="toast-header " style="${toast_head_css}" >
|
||||||
|
<strong class="${toast_icon}"> ${toast_status_word}</strong>
|
||||||
|
<button type="button" class="ml-2 mb-1 close rm_msg" data-dismiss="toast" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="toast-body" style="${toast_body_css}">
|
||||||
|
<strong>Inception Pending</strong><br><br>
|
||||||
|
<small style="position: relative;bottom: 8px;">${toast_body_data}</small>
|
||||||
|
<div class="toast-footer">
|
||||||
|
<a href="#" class="redirect_page" data-toggle="tooltip" data-placement="bottom" title="Click Go to the Page"><small style="margin-right: 142px;position: relative;top: 2px;">see more</small></a>
|
||||||
|
<small style="position: relative;top: 2px;left: 5px;font-size: 10px;"></small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>`
|
||||||
|
|
||||||
|
|
||||||
|
messagesList.append(html);
|
||||||
|
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
console.log('response.inception is undefined or null');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (response.correction) {
|
||||||
|
$.each(response.correction, function(index, item) {
|
||||||
|
if (item.batch_export_count == 0 || item.batch_import_count == 0) {
|
||||||
|
|
||||||
|
|
||||||
var queryParams = {
|
var queryParams = {
|
||||||
client_id: item.client_id,
|
client_id: item.client_id,
|
||||||
client_policy_id: item.client_policy_id,
|
|
||||||
client_branch_id: item.branch_id,
|
client_branch_id: item.branch_id,
|
||||||
actions: 'inception'
|
event: 'correction',
|
||||||
|
actions: 'export',
|
||||||
|
insurer_or_tpa: 'tpa',
|
||||||
};
|
};
|
||||||
|
|
||||||
const queryString = objectToQueryString(queryParams);
|
const queryString = objectToQueryString(queryParams);
|
||||||
|
|
||||||
var url = 'employee/upload?' + queryString
|
var url = 'employee/upload?' + queryString + '#KYC-DOC-tab'
|
||||||
////console.log(url)
|
////console.log(url)
|
||||||
|
|
||||||
|
|
||||||
@ -351,16 +417,101 @@
|
|||||||
var toast_icon = 'mdi mdi-checkbox-marked-circle mr-auto';
|
var toast_icon = 'mdi mdi-checkbox-marked-circle mr-auto';
|
||||||
var toast_status_word = 'Info';
|
var toast_status_word = 'Info';
|
||||||
|
|
||||||
|
var title = 'Correction Pending';
|
||||||
|
|
||||||
|
|
||||||
if (!item.branch_name.toLowerCase().includes('branch')) {
|
if (!item.branch_name.toLowerCase().includes('branch')) {
|
||||||
|
|
||||||
//console.log(item.branch_name)
|
//console.log(item.branch_name)
|
||||||
item.branch_name += ' branch';
|
item.branch_name += ' branch';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////console.log(item.branch_name);
|
////console.log(item.branch_name);
|
||||||
|
|
||||||
var toast_body_data = item.client_name + '( ' + item.branch_name + ' ) ' + ' - ' + item.policy_name;
|
// if (item.batch_export_count > 0) {
|
||||||
|
|
||||||
|
// title = 'Correction Import Pending';
|
||||||
|
// }
|
||||||
|
|
||||||
|
var toast_body_data = item.client_name + ' - ' + item.branch_name;
|
||||||
|
////console.log(toast_body_data);
|
||||||
|
|
||||||
|
var html = ` <li data-id="" data-url="${url}">
|
||||||
|
<div class="p-3">
|
||||||
|
<div class="toast fade show" role="alert" aria-live="assertive" aria-atomic="true" data-toggle="toast">
|
||||||
|
<div class="toast-header " style="${toast_head_css}" >
|
||||||
|
<strong class="${toast_icon}"> ${toast_status_word}</strong>
|
||||||
|
<button type="button" class="ml-2 mb-1 close rm_msg" data-dismiss="toast" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="toast-body" style="${toast_body_css}">
|
||||||
|
<strong>${title}</strong><br><br>
|
||||||
|
<small style="position: relative;bottom: 8px;">${toast_body_data}</small>
|
||||||
|
<div class="toast-footer">
|
||||||
|
<a href="#" class="redirect_page" data-toggle="tooltip" data-placement="bottom" title="Click Go to the Page"><small style="margin-right: 142px;position: relative;top: 2px;">see more</small></a>
|
||||||
|
<small style="position: relative;top: 2px;left: 5px;font-size: 10px;"></small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>`
|
||||||
|
|
||||||
|
|
||||||
|
messagesList.append(html);
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
console.log('response.correction is undefined or null');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (response.deletion) {
|
||||||
|
$.each(response.deletion, function(index, item) {
|
||||||
|
|
||||||
|
if (item.batch_export_count == 0 || item.batch_import_count == 0) {
|
||||||
|
|
||||||
|
|
||||||
|
var queryParams = {
|
||||||
|
|
||||||
|
client_id: item.client_id,
|
||||||
|
client_policy_id: item.client_policy_id,
|
||||||
|
client_branch_id: item.branch_id,
|
||||||
|
event: 'deletion',
|
||||||
|
actions: 'export',
|
||||||
|
insurer_or_tpa: 'tpa',
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
const queryString = objectToQueryString(queryParams);
|
||||||
|
|
||||||
|
var url = 'employee/upload?' + queryString + '#KYC-DOC-tab'
|
||||||
|
////console.log(url)
|
||||||
|
|
||||||
|
|
||||||
|
var toast_body_css = 'background : #bfd7eb !important;';
|
||||||
|
var toast_head_css = 'background-color : rgb(2, 168, 181) !important; color :#000; border-bottom: 0;';
|
||||||
|
var toast_icon = 'mdi mdi-checkbox-marked-circle mr-auto';
|
||||||
|
var toast_status_word = 'Info';
|
||||||
|
var title = 'Deletion Pending';
|
||||||
|
|
||||||
|
|
||||||
|
if (!item.branch_name.toLowerCase().includes('branch')) {
|
||||||
|
|
||||||
|
//console.log(item.branch_name)
|
||||||
|
item.branch_name += ' branch';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
////console.log(item.branch_name);
|
||||||
|
|
||||||
|
// if (item.batch_export_count > 0) {
|
||||||
|
|
||||||
|
// title = 'Deletion Import Pending';
|
||||||
|
// }
|
||||||
|
|
||||||
|
var toast_body_data = item.client_name + '( ' + item.branch_name + ' ) ' + ' - ' + item.policy_name;
|
||||||
////console.log(toast_body_data);
|
////console.log(toast_body_data);
|
||||||
|
|
||||||
var html = ` <li data-id="" data-url="${url}">
|
var html = ` <li data-id="" data-url="${url}">
|
||||||
@ -373,7 +524,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="toast-body" style="${toast_body_css}">
|
<div class="toast-body" style="${toast_body_css}">
|
||||||
<strong>Inception Pending</strong><br><br>
|
<strong>${title}</strong><br><br>
|
||||||
<small style="position: relative;bottom: 8px;">${toast_body_data}</small>
|
<small style="position: relative;bottom: 8px;">${toast_body_data}</small>
|
||||||
<div class="toast-footer">
|
<div class="toast-footer">
|
||||||
<a href="#" class="redirect_page" data-toggle="tooltip" data-placement="bottom" title="Click Go to the Page"><small style="margin-right: 142px;position: relative;top: 2px;">see more</small></a>
|
<a href="#" class="redirect_page" data-toggle="tooltip" data-placement="bottom" title="Click Go to the Page"><small style="margin-right: 142px;position: relative;top: 2px;">see more</small></a>
|
||||||
@ -387,182 +538,17 @@
|
|||||||
|
|
||||||
messagesList.append(html);
|
messagesList.append(html);
|
||||||
|
|
||||||
});
|
}
|
||||||
} else {
|
|
||||||
console.log('response.inception is not an array:', response.inception);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
console.log('response.inception is undefined or null');
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log(response.correction)
|
|
||||||
console.log('correction', typeof response.correction)
|
|
||||||
|
|
||||||
if (response.correction) {
|
});
|
||||||
if (Array.isArray(response.correction)) {
|
|
||||||
response.correction.forEach(function(item, index) {
|
|
||||||
|
|
||||||
if (item.batch_export_count == 0 || item.batch_import_count == 0) {
|
|
||||||
|
|
||||||
|
|
||||||
var queryParams = {
|
|
||||||
client_id: item.client_id,
|
|
||||||
client_branch_id: item.branch_id,
|
|
||||||
event: 'correction',
|
|
||||||
actions: 'export',
|
|
||||||
insurer_or_tpa: 'tpa',
|
|
||||||
};
|
|
||||||
|
|
||||||
const queryString = objectToQueryString(queryParams);
|
|
||||||
|
|
||||||
var url = 'employee/upload?' + queryString + '#KYC-DOC-tab'
|
|
||||||
////console.log(url)
|
|
||||||
|
|
||||||
|
|
||||||
var toast_body_css = 'background : #bfd7eb !important;';
|
|
||||||
var toast_head_css = 'background-color : rgb(2, 168, 181) !important; color :#000; border-bottom: 0;';
|
|
||||||
var toast_icon = 'mdi mdi-checkbox-marked-circle mr-auto';
|
|
||||||
var toast_status_word = 'Info';
|
|
||||||
|
|
||||||
var title = 'Correction Pending';
|
|
||||||
|
|
||||||
|
|
||||||
if (!item.branch_name.toLowerCase().includes('branch')) {
|
|
||||||
|
|
||||||
//console.log(item.branch_name)
|
|
||||||
item.branch_name += ' branch';
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
////console.log(item.branch_name);
|
|
||||||
|
|
||||||
// if (item.batch_export_count > 0) {
|
|
||||||
|
|
||||||
// title = 'Correction Import Pending';
|
|
||||||
// }
|
|
||||||
|
|
||||||
var toast_body_data = item.client_name + ' - ' + item.branch_name;
|
|
||||||
////console.log(toast_body_data);
|
|
||||||
|
|
||||||
var html = ` <li data-id="" data-url="${url}">
|
|
||||||
<div class="p-3">
|
|
||||||
<div class="toast fade show" role="alert" aria-live="assertive" aria-atomic="true" data-toggle="toast">
|
|
||||||
<div class="toast-header " style="${toast_head_css}" >
|
|
||||||
<strong class="${toast_icon}"> ${toast_status_word}</strong>
|
|
||||||
<button type="button" class="ml-2 mb-1 close rm_msg" data-dismiss="toast" aria-label="Close">
|
|
||||||
<span aria-hidden="true">×</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="toast-body" style="${toast_body_css}">
|
|
||||||
<strong>${title}</strong><br><br>
|
|
||||||
<small style="position: relative;bottom: 8px;">${toast_body_data}</small>
|
|
||||||
<div class="toast-footer">
|
|
||||||
<a href="#" class="redirect_page" data-toggle="tooltip" data-placement="bottom" title="Click Go to the Page"><small style="margin-right: 142px;position: relative;top: 2px;">see more</small></a>
|
|
||||||
<small style="position: relative;top: 2px;left: 5px;font-size: 10px;"></small>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</li>`
|
|
||||||
|
|
||||||
|
|
||||||
messagesList.append(html);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
console.log('response.correction is undefined or null');
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (response.deletion) {
|
|
||||||
if (Array.isArray(response.deletion)) {
|
|
||||||
response.deletion.forEach(function(item, index) {
|
|
||||||
|
|
||||||
if (item.batch_export_count == 0 || item.batch_import_count == 0) {
|
|
||||||
|
|
||||||
|
|
||||||
var queryParams = {
|
|
||||||
|
|
||||||
client_id: item.client_id,
|
|
||||||
client_policy_id: item.client_policy_id,
|
|
||||||
client_branch_id: item.branch_id,
|
|
||||||
event: 'deletion',
|
|
||||||
actions: 'export',
|
|
||||||
insurer_or_tpa: 'tpa',
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
const queryString = objectToQueryString(queryParams);
|
|
||||||
|
|
||||||
var url = 'employee/upload?' + queryString + '#KYC-DOC-tab'
|
|
||||||
////console.log(url)
|
|
||||||
|
|
||||||
|
|
||||||
var toast_body_css = 'background : #bfd7eb !important;';
|
|
||||||
var toast_head_css = 'background-color : rgb(2, 168, 181) !important; color :#000; border-bottom: 0;';
|
|
||||||
var toast_icon = 'mdi mdi-checkbox-marked-circle mr-auto';
|
|
||||||
var toast_status_word = 'Info';
|
|
||||||
var title = 'Deletion Pending';
|
|
||||||
|
|
||||||
|
|
||||||
if (!item.branch_name.toLowerCase().includes('branch')) {
|
|
||||||
|
|
||||||
//console.log(item.branch_name)
|
|
||||||
item.branch_name += ' branch';
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
////console.log(item.branch_name);
|
|
||||||
|
|
||||||
// if (item.batch_export_count > 0) {
|
|
||||||
|
|
||||||
// title = 'Deletion Import Pending';
|
|
||||||
// }
|
|
||||||
|
|
||||||
var toast_body_data = item.client_name + '( ' + item.branch_name + ' ) ' + ' - ' + item.policy_name;
|
|
||||||
////console.log(toast_body_data);
|
|
||||||
|
|
||||||
var html = ` <li data-id="" data-url="${url}">
|
|
||||||
<div class="p-3">
|
|
||||||
<div class="toast fade show" role="alert" aria-live="assertive" aria-atomic="true" data-toggle="toast">
|
|
||||||
<div class="toast-header " style="${toast_head_css}" >
|
|
||||||
<strong class="${toast_icon}"> ${toast_status_word}</strong>
|
|
||||||
<button type="button" class="ml-2 mb-1 close rm_msg" data-dismiss="toast" aria-label="Close">
|
|
||||||
<span aria-hidden="true">×</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="toast-body" style="${toast_body_css}">
|
|
||||||
<strong>${title}</strong><br><br>
|
|
||||||
<small style="position: relative;bottom: 8px;">${toast_body_data}</small>
|
|
||||||
<div class="toast-footer">
|
|
||||||
<a href="#" class="redirect_page" data-toggle="tooltip" data-placement="bottom" title="Click Go to the Page"><small style="margin-right: 142px;position: relative;top: 2px;">see more</small></a>
|
|
||||||
<small style="position: relative;top: 2px;left: 5px;font-size: 10px;"></small>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</li>`
|
|
||||||
|
|
||||||
|
|
||||||
messagesList.append(html);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}else{
|
}else{
|
||||||
console.log('response.deletion is undefined or null');
|
console.log('response.deletion is undefined or null');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (response.si_enhancement) {
|
if (response.si_enhancement) {
|
||||||
if (Array.isArray(response.si_enhancement)) {
|
$.each(response.si_enhancement, function(index, item) {
|
||||||
response.si_enhancement.forEach(function(item, index) {
|
if (item.batch_export_count == 0 || item.batch_import_count == 0) {
|
||||||
|
|
||||||
if (item.batch_export_count == 0 || item.batch_import_count == 0) {
|
|
||||||
|
|
||||||
|
|
||||||
var queryParams = {
|
var queryParams = {
|
||||||
@ -631,92 +617,88 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
|
||||||
}else{
|
}else{
|
||||||
console.log('response.si_enhancement is undefined or null');
|
console.log('response.si_enhancement is undefined or null');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (response.tpa) {
|
if (response.tpa) {
|
||||||
if (Array.isArray(response.tpa)) {
|
$.each(response.tpa, function(index, item) {
|
||||||
response.tpa.forEach(function(item, index) {
|
if (item.batch_export_count == 0 || item.batch_import_count == 0) {
|
||||||
if (item.batch_export_count == 0 || item.batch_import_count == 0) {
|
|
||||||
|
|
||||||
|
|
||||||
var queryParams = {
|
var queryParams = {
|
||||||
client_id: item.client_id,
|
client_id: item.client_id,
|
||||||
client_policy_id: item.client_policy_id,
|
client_policy_id: item.client_policy_id,
|
||||||
client_branch_id: item.branch_id,
|
client_branch_id: item.branch_id,
|
||||||
event: 'inception',
|
event: 'inception',
|
||||||
insurer_or_tpa: 'tpa',
|
insurer_or_tpa: 'tpa',
|
||||||
actions: 'export',
|
actions: 'export',
|
||||||
};
|
};
|
||||||
|
|
||||||
const queryString = objectToQueryString(queryParams);
|
const queryString = objectToQueryString(queryParams);
|
||||||
|
|
||||||
var url = 'employee/upload?' + queryString + '#KYC-DOC-tab'
|
var url = 'employee/upload?' + queryString + '#KYC-DOC-tab'
|
||||||
////console.log(url)
|
////console.log(url)
|
||||||
|
|
||||||
|
|
||||||
var toast_body_css = 'background : #bfd7eb !important;';
|
var toast_body_css = 'background : #bfd7eb !important;';
|
||||||
var toast_head_css = 'background-color : rgb(2, 168, 181) !important; color :#000; border-bottom: 0;';
|
var toast_head_css = 'background-color : rgb(2, 168, 181) !important; color :#000; border-bottom: 0;';
|
||||||
var toast_icon = 'mdi mdi-checkbox-marked-circle mr-auto';
|
var toast_icon = 'mdi mdi-checkbox-marked-circle mr-auto';
|
||||||
var toast_status_word = 'Info';
|
var toast_status_word = 'Info';
|
||||||
var title = 'TPA Pending';
|
var title = 'TPA Pending';
|
||||||
|
|
||||||
if (!item.branch_name.toLowerCase().includes('branch')) {
|
if (!item.branch_name.toLowerCase().includes('branch')) {
|
||||||
|
|
||||||
//console.log(item.branch_name)
|
//console.log(item.branch_name)
|
||||||
item.branch_name += ' branch';
|
item.branch_name += ' branch';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////console.log(item.branch_name);
|
////console.log(item.branch_name);
|
||||||
|
|
||||||
// if (item.batch_export_count > 0) {
|
// if (item.batch_export_count > 0) {
|
||||||
|
|
||||||
// title = 'TPA Import Pending';
|
// title = 'TPA Import Pending';
|
||||||
// }
|
// }
|
||||||
|
|
||||||
var toast_body_data = item.client_name + '( ' + item.branch_name + ' ) ' + ' - ' + item.policy_name;
|
var toast_body_data = item.client_name + '( ' + item.branch_name + ' ) ' + ' - ' + item.policy_name;
|
||||||
////console.log(toast_body_data);
|
////console.log(toast_body_data);
|
||||||
|
|
||||||
var html = ` <li data-id="" data-url="${url}">
|
var html = ` <li data-id="" data-url="${url}">
|
||||||
<div class="p-3">
|
<div class="p-3">
|
||||||
<div class="toast fade show" role="alert" aria-live="assertive" aria-atomic="true" data-toggle="toast">
|
<div class="toast fade show" role="alert" aria-live="assertive" aria-atomic="true" data-toggle="toast">
|
||||||
<div class="toast-header " style="${toast_head_css}" >
|
<div class="toast-header " style="${toast_head_css}" >
|
||||||
<strong class="${toast_icon}"> ${toast_status_word}</strong>
|
<strong class="${toast_icon}"> ${toast_status_word}</strong>
|
||||||
<button type="button" class="ml-2 mb-1 close rm_msg" data-dismiss="toast" aria-label="Close">
|
<button type="button" class="ml-2 mb-1 close rm_msg" data-dismiss="toast" aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="toast-body" style="${toast_body_css}">
|
<div class="toast-body" style="${toast_body_css}">
|
||||||
<strong>${title}</strong><br><br>
|
<strong>${title}</strong><br><br>
|
||||||
<small style="position: relative;bottom: 8px;">${toast_body_data}</small>
|
<small style="position: relative;bottom: 8px;">${toast_body_data}</small>
|
||||||
<div class="toast-footer">
|
<div class="toast-footer">
|
||||||
<a href="#" class="redirect_page" data-toggle="tooltip" data-placement="bottom" title="Click Go to the Page"><small style="margin-right: 142px;position: relative;top: 2px;">see more</small></a>
|
<a href="#" class="redirect_page" data-toggle="tooltip" data-placement="bottom" title="Click Go to the Page"><small style="margin-right: 142px;position: relative;top: 2px;">see more</small></a>
|
||||||
<small style="position: relative;top: 2px;left: 5px;font-size: 10px;"></small>
|
<small style="position: relative;top: 2px;left: 5px;font-size: 10px;"></small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>`
|
</div>
|
||||||
|
</li>`
|
||||||
|
|
||||||
|
|
||||||
messagesList.append(html);
|
messagesList.append(html);
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
}else{
|
}else{
|
||||||
console.log('response.tpa is undefined or null');
|
console.log('response.tpa is undefined or null');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (response.uhid) {
|
if (response.uhid) {
|
||||||
if (Array.isArray(response.uhid)) {
|
$.each(response.uhid, function(index, item) {
|
||||||
response.uhid.forEach(function(item, index) {
|
if (item.batch_export_count == 0 || item.batch_import_count == 0) {
|
||||||
if (item.batch_export_count == 0 || item.batch_import_count == 0) {
|
|
||||||
|
|
||||||
var queryParams = {
|
var queryParams = {
|
||||||
|
|
||||||
@ -731,7 +713,7 @@
|
|||||||
const queryString = objectToQueryString(queryParams);
|
const queryString = objectToQueryString(queryParams);
|
||||||
|
|
||||||
var url = 'employee/upload?' + queryString + '#KYC-DOC-tab'
|
var url = 'employee/upload?' + queryString + '#KYC-DOC-tab'
|
||||||
////console.log(url)
|
//console.log(url)
|
||||||
|
|
||||||
var toast_body_css = 'background : #bfd7eb !important;';
|
var toast_body_css = 'background : #bfd7eb !important;';
|
||||||
var toast_head_css = 'background-color : rgb(2, 168, 181) !important; color :#000; border-bottom: 0;';
|
var toast_head_css = 'background-color : rgb(2, 168, 181) !important; color :#000; border-bottom: 0;';
|
||||||
@ -781,9 +763,8 @@
|
|||||||
|
|
||||||
messagesList.append(html);
|
messagesList.append(html);
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
}else{
|
}else{
|
||||||
console.log('response.uhid is undefined or null');
|
console.log('response.uhid is undefined or null');
|
||||||
}
|
}
|
||||||
|
|||||||
@ -71,10 +71,11 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.css"/>
|
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.css" />
|
||||||
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick-theme.min.css"/>
|
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick-theme.min.css" />
|
||||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
||||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.js"></script>
|
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.js"></script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
|
|
||||||
@ -556,56 +557,61 @@
|
|||||||
<a href="#sidebarDashboards" data-toggle="collapse" class="waves-effect">
|
<a href="#sidebarDashboards" data-toggle="collapse" class="waves-effect">
|
||||||
<i class="fas fa-user-tie"></i>
|
<i class="fas fa-user-tie"></i>
|
||||||
<span class="badge badge-success badge-pill float-right">2</span>
|
<span class="badge badge-success badge-pill float-right">2</span>
|
||||||
<span> Members </span>
|
<span> Action on Policies </span>
|
||||||
</a>
|
</a>
|
||||||
<div class="collapse" id="sidebarDashboards">
|
<div class="collapse" id="sidebarDashboards">
|
||||||
<ul class="nav-second-level">
|
<ul class="nav-second-level">
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<a href="<?= base_url('/employee/upload') ?>">Upload</a>
|
<a href="<?= base_url('/employee/upload') ?>">View Inception</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="<?= base_url('/employee/list') ?>">List</a>
|
<a href="<?= base_url('/employee/list') ?>">View Members</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="<?= base_url('/employee/endorsement-list') ?>">Endorsement List</a>
|
<a href="<?= base_url('/employee/endorsement-list') ?>">View Endorsement</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="<?= base_url('/employee/enrollment-list') ?>">Enrollment List</a>
|
<a href="<?= base_url('/employee/enrollment-list') ?>">View Enrollment</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<?php if(get_role_id() == 1 || get_role_id() == 5) { ?>
|
||||||
<a href="#sidebarDashboards" data-toggle="collapse" class="waves-effect">
|
|
||||||
<i class="ri-database-2-line"></i>
|
<li>
|
||||||
<span class="badge badge-success badge-pill float-right">2</span>
|
<a href="#sidebarDashboards" data-toggle="collapse" class="waves-effect">
|
||||||
<span> Masters </span>
|
<i class="ri-database-2-line"></i>
|
||||||
</a>
|
<span class="badge badge-success badge-pill float-right">2</span>
|
||||||
<div class="collapse" id="sidebarDashboards">
|
<span> Masters </span>
|
||||||
<ul class="nav-second-level">
|
</a>
|
||||||
<li>
|
<div class="collapse" id="sidebarDashboards">
|
||||||
<a href="<?= base_url('/master/insurer/list') ?>">Insurer</a>
|
<ul class="nav-second-level">
|
||||||
</li>
|
<li>
|
||||||
<li>
|
<a href="<?= base_url('/master/insurer/list') ?>">Insurer</a>
|
||||||
<a href="<?= base_url('/master/tpa/list') ?>">TPA</a>
|
</li>
|
||||||
</li>
|
<li>
|
||||||
<li>
|
<a href="<?= base_url('/master/tpa/list') ?>">TPA</a>
|
||||||
<a href="<?= base_url('/master/kyc/list') ?>">KYC</a>
|
</li>
|
||||||
</li>
|
<li>
|
||||||
<li>
|
<a href="<?= base_url('/master/kyc/list') ?>">KYC</a>
|
||||||
<a href="<?= base_url('/master/policy/list') ?>">Policy</a>
|
</li>
|
||||||
</li>
|
<li>
|
||||||
<li>
|
<a href="<?= base_url('/master/policy/list') ?>">Policy</a>
|
||||||
<a href="<?= base_url('/master/cash_deposite/list') ?>">CD Master</a>
|
</li>
|
||||||
</li>
|
<li>
|
||||||
<li>
|
<a href="<?= base_url('/master/cash_deposite/list') ?>">CD Master</a>
|
||||||
<a href="<?= base_url('/user/list') ?>"> Users </a>
|
</li>
|
||||||
</li>
|
<li>
|
||||||
</ul>
|
<a href="<?= base_url('/user/list') ?>"> Users </a>
|
||||||
</div>
|
</li>
|
||||||
</li>
|
</ul>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<?php
|
<?php
|
||||||
$sessionData = get_session_userdata();
|
$sessionData = get_session_userdata();
|
||||||
|
|||||||
@ -107,7 +107,7 @@
|
|||||||
<thead class="bg-light">
|
<thead class="bg-light">
|
||||||
<tr>
|
<tr>
|
||||||
<th class="font-weight-medium">Date</th>
|
<th class="font-weight-medium">Date</th>
|
||||||
<!-- <th class="font-weight-medium">CD Account No</th> -->
|
<th class="font-weight-medium">Unit</th>
|
||||||
<th class="font-weight-medium">Policy</th>
|
<th class="font-weight-medium">Policy</th>
|
||||||
<th class="font-weight-medium">Endorsement No</th>
|
<th class="font-weight-medium">Endorsement No</th>
|
||||||
<th class="font-weight-medium">Sub Type</th>
|
<th class="font-weight-medium">Sub Type</th>
|
||||||
@ -122,6 +122,7 @@
|
|||||||
<?php foreach($depositdata as $row) { ?>
|
<?php foreach($depositdata as $row) { ?>
|
||||||
<tr id="<?php echo $row->id;?>">
|
<tr id="<?php echo $row->id;?>">
|
||||||
<td><?php echo date('d-M-Y h:i A', strtotime($row->created_at)); ?></td>
|
<td><?php echo date('d-M-Y h:i A', strtotime($row->created_at)); ?></td>
|
||||||
|
<td><?php echo $row->unit ?? ' - '; ?></td>
|
||||||
<!-- <td><?php echo $row->policy_name ?? '<center> - </center>'; ?></td> -->
|
<!-- <td><?php echo $row->policy_name ?? '<center> - </center>'; ?></td> -->
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user