GPA_GMC_CONFLICT : AADHAVAN
This commit is contained in:
commit
6221ae98e6
@ -186,7 +186,7 @@ $routes->group("/util", ["filter" => "authMVC"], function($routes){
|
|||||||
$routes->get("get-file-error/(:any)", "EmployeeController::getUploadedFileError/$1");
|
$routes->get("get-file-error/(:any)", "EmployeeController::getUploadedFileError/$1");
|
||||||
$routes->get("kyc-other-docs-delete/(:any)", "ClientController::deleteClientKycOtherDocs/$1");
|
$routes->get("kyc-other-docs-delete/(:any)", "ClientController::deleteClientKycOtherDocs/$1");
|
||||||
$routes->get("policy-premium", "ClientController::getpolicyGridData/$1");
|
$routes->get("policy-premium", "ClientController::getpolicyGridData/$1");
|
||||||
$routes->get("update-policy-status/(:any)", "ClientController::updateClientPolicyStatus/$1");
|
$routes->get("update-policy-status", "ClientController::updateClientPolicyStatus/$1");
|
||||||
});
|
});
|
||||||
|
|
||||||
$routes->cli('processjob', 'JobWorker::processJob');
|
$routes->cli('processjob', 'JobWorker::processJob');
|
||||||
|
|||||||
@ -670,9 +670,6 @@ class ClientController extends AdminController
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function getKycDocsById($id=null)
|
public function getKycDocsById($id=null)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -729,12 +726,12 @@ class ClientController extends AdminController
|
|||||||
public function getpolicyGridData()
|
public function getpolicyGridData()
|
||||||
{
|
{
|
||||||
|
|
||||||
$policy_id = $this->request->getGet('policy_id');
|
$client_policy_id = $this->request->getGet('client_policy_id');
|
||||||
$client_id = $this->request->getGet('client_id');
|
$record = $this->clientPolicyModel->where('id', $client_policy_id)->first();
|
||||||
|
|
||||||
$emp_count = $this->employeeModel ->join('client_policy cp',"employees.client_id = cp.client_id")
|
$emp_count = $this->employeeModel ->join('client_policy cp',"employees.client_id = cp.client_id")
|
||||||
->join('employee_polices ep',"cp.id = ep.client_policy_id AND employees.id = ep.employee_id")
|
->join('employee_polices ep',"cp.id = ep.client_policy_id AND employees.id = ep.employee_id")
|
||||||
->where("employees.client_id",$client_id)
|
->where("employees.client_id",$record['client_id'])
|
||||||
->where("employees.emp_status",'active')
|
->where("employees.emp_status",'active')
|
||||||
->countAllResults();
|
->countAllResults();
|
||||||
|
|
||||||
@ -745,7 +742,7 @@ class ClientController extends AdminController
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$data = $this->policesModel->getPolicyPremium($policy_id);
|
$data = $this->policesModel->getPolicyPremium($record['policy_id']);
|
||||||
$policy_name = $data[0]->policy_name;
|
$policy_name = $data[0]->policy_name;
|
||||||
$pattern = '/gmc/i';
|
$pattern = '/gmc/i';
|
||||||
$subject = $data[0]->policy_type;
|
$subject = $data[0]->policy_type;
|
||||||
@ -757,9 +754,9 @@ class ClientController extends AdminController
|
|||||||
$results = $this->policyGridModel->like('policy_type', $search_term)->findAll();
|
$results = $this->policyGridModel->like('policy_type', $search_term)->findAll();
|
||||||
|
|
||||||
if($search_term === 'GPA'){
|
if($search_term === 'GPA'){
|
||||||
$premiumData = $this->policyPremium1Model->where(['client_id' => $client_id, 'client_policy_id' => $policy_id, 'is_active' => 1])->findAll();
|
$premiumData = $this->policyPremium1Model->where(['client_id' => $record['client_id'], 'client_policy_id' => $client_policy_id, 'is_active' => 1])->findAll();
|
||||||
}else{
|
}else{
|
||||||
$premiumData = $this->policyPremium2Model->where(['client_id' => $client_id, 'client_policy_id' => $policy_id, 'is_active' => 1])->findAll();
|
$premiumData = $this->policyPremium2Model->where(['client_id' => $record['client_id'], 'client_policy_id' => $client_policy_id, 'is_active' => 1])->findAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -776,19 +773,14 @@ class ClientController extends AdminController
|
|||||||
try {
|
try {
|
||||||
|
|
||||||
$this->myLogger->logme('error','Terms CREATE function called');
|
$this->myLogger->logme('error','Terms CREATE function called');
|
||||||
// print_r($this->request->getPost());
|
|
||||||
$client_id = $this->request->getPost("client_id");
|
/*** Client Policy Table Primary Key(ID) ***/
|
||||||
$policy_id = $this->request->getPost("policy_id");
|
$client_policy_id = $this->request->getPost("client_policy_id");
|
||||||
|
|
||||||
$data['sum_insured'] =$this->request->getPost("sum_insured");
|
$data['sum_insured'] =$this->request->getPost("sum_insured");
|
||||||
$data['family_floater'] =$this->request->getPost("family_floater");
|
$data['family_floater'] =$this->request->getPost("family_floater");
|
||||||
// print_r($data['familyfloater']);
|
|
||||||
// if (!$data['family_floater'] || $data['family_floater'] == 0) {
|
|
||||||
// $data['corporatebuffer'] = "";
|
|
||||||
// $data['family_floaters'] = "";
|
|
||||||
// }else{
|
|
||||||
$data['corporatebuffer'] = $this->request->getPost("corporatebuffer");
|
$data['corporatebuffer'] = $this->request->getPost("corporatebuffer");
|
||||||
$data['family_floaters'] = $this->request->getPost("family_floaters") ?? [];
|
$data['family_floaters'] = $this->request->getPost("family_floaters") ?? [];
|
||||||
// }
|
|
||||||
|
|
||||||
$data['waiverofpreexistingdiseases'] =$this->request->getPost("waiverofpreexistingdiseases");
|
$data['waiverofpreexistingdiseases'] =$this->request->getPost("waiverofpreexistingdiseases");
|
||||||
if ($data['waiverofpreexistingdiseases'] == 1) {
|
if ($data['waiverofpreexistingdiseases'] == 1) {
|
||||||
@ -840,14 +832,12 @@ class ClientController extends AdminController
|
|||||||
$jsonData = json_encode($data);
|
$jsonData = json_encode($data);
|
||||||
$dataa = array(
|
$dataa = array(
|
||||||
'policy_terms' => $jsonData,
|
'policy_terms' => $jsonData,
|
||||||
'client_id' => $client_id,
|
|
||||||
'policy_id' => $policy_id
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$record = $this->clientPolicyModel->where(['client_id' => $client_id, 'policy_id' => $policy_id])->first();
|
$record = $this->clientPolicyModel->where('id', $client_policy_id)->first();
|
||||||
|
|
||||||
if ($record) {
|
if ($record) {
|
||||||
$update = $this->clientPolicyModel->update($record['id'], $dataa);
|
$update = $this->clientPolicyModel->update($client_policy_id, $dataa);
|
||||||
if ($update) {
|
if ($update) {
|
||||||
return $this->respond(['status' => true,'code' => 200,'message' => 'Data updated successfully'], 200);
|
return $this->respond(['status' => true,'code' => 200,'message' => 'Data updated successfully'], 200);
|
||||||
} else {
|
} else {
|
||||||
@ -872,16 +862,16 @@ class ClientController extends AdminController
|
|||||||
|
|
||||||
public function getterms()
|
public function getterms()
|
||||||
{
|
{
|
||||||
|
$client_policy_id = $this->request->getVar('client_policy_id');
|
||||||
|
$record = $this->clientPolicyModel->where('id', $client_policy_id)->first();
|
||||||
|
$policy_name = $this->policesModel->select('name')->where('id', $record['policy_id'])->first();
|
||||||
|
|
||||||
$client_id = $this->request->getVar('client_id');
|
|
||||||
$policy_id = $this->request->getVar('policy_id');
|
|
||||||
$policy_name = $this->policesModel->select('name')->where('id', $policy_id)->first();
|
|
||||||
$record = $this->clientPolicyModel->where(['client_id' => $client_id, 'policy_id' => $policy_id])->first();
|
|
||||||
$emp_count = $this->employeeModel ->join('client_policy cp',"employees.client_id = cp.client_id")
|
$emp_count = $this->employeeModel ->join('client_policy cp',"employees.client_id = cp.client_id")
|
||||||
->join('employee_polices ep',"cp.id = ep.client_policy_id AND employees.id = ep.employee_id")
|
->join('employee_polices ep',"cp.id = ep.client_policy_id AND employees.id = ep.employee_id")
|
||||||
->where("employees.client_id",$client_id)
|
->where("employees.client_id", $record['client_id'])
|
||||||
->where("employees.emp_status",'active')
|
->where("employees.emp_status",'active')
|
||||||
->countAllResults();
|
->countAllResults();
|
||||||
|
|
||||||
if($emp_count = 0){
|
if($emp_count = 0){
|
||||||
$emp_count = true;
|
$emp_count = true;
|
||||||
}else{
|
}else{
|
||||||
@ -902,9 +892,8 @@ class ClientController extends AdminController
|
|||||||
try {
|
try {
|
||||||
$this->myLogger->logme('error','Policy GPA Terms CREATE function called');
|
$this->myLogger->logme('error','Policy GPA Terms CREATE function called');
|
||||||
|
|
||||||
// print_r($this->request->getPost());
|
/*** Client Policy Table Primary Key(ID) ***/
|
||||||
$client_id = $this->request->getPost("client_id");
|
$client_policy_id = $this->request->getPost("client_policy_id");
|
||||||
$policy_id = $this->request->getPost("policy_id");
|
|
||||||
|
|
||||||
$data['sumInsured2'] =$this->request->getPost("sumInsured2");
|
$data['sumInsured2'] =$this->request->getPost("sumInsured2");
|
||||||
$data['totalSumInsured'] =$this->request->getPost("totalSumInsured");
|
$data['totalSumInsured'] =$this->request->getPost("totalSumInsured");
|
||||||
@ -954,38 +943,30 @@ class ClientController extends AdminController
|
|||||||
$data['terrorism'] = $this->request->getPost("terrorism");
|
$data['terrorism'] = $this->request->getPost("terrorism");
|
||||||
$data['worldwideCover'] = $this->request->getPost("worldwideCover");
|
$data['worldwideCover'] = $this->request->getPost("worldwideCover");
|
||||||
|
|
||||||
|
|
||||||
print_r($data);
|
|
||||||
|
|
||||||
// print_r($this->request->getPost());
|
|
||||||
// die();
|
|
||||||
|
|
||||||
$jsonData = json_encode($data);
|
$jsonData = json_encode($data);
|
||||||
$dataa = array(
|
$dataa = array(
|
||||||
'policy_terms' => $jsonData,
|
'policy_terms' => $jsonData,
|
||||||
'client_id' => $client_id,
|
|
||||||
'policy_id' => $policy_id
|
|
||||||
);
|
);
|
||||||
$record = $this->clientPolicyModel->where(['client_id' => $client_id, 'policy_id' => $policy_id])->first();
|
|
||||||
|
$record = $this->clientPolicyModel->where('id', $client_policy_id)->first();
|
||||||
if ($record) {
|
if ($record) {
|
||||||
$update = $this->clientPolicyModel->update($record['id'], $dataa);
|
$update = $this->clientPolicyModel->update($client_policy_id, $dataa);
|
||||||
if ($update) {
|
if ($update) {
|
||||||
return $this->respond(['status' => true,'code' => 200,'message' => 'Data updated successfully'], 200);
|
return $this->respond(['status' => true, 'code' => 200, 'message' => 'Data updated successfully', 'client_policy_id' => $client_policy_id], 200);
|
||||||
} else {
|
} else {
|
||||||
return $this->respond(['status' => false,'code' => 404, 'message' => 'Failed to update data'], 200);
|
return $this->respond(['status' => false,'code' => 404, 'message' => 'Failed to update data'], 200);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
$insert = $this->clientPolicyModel->insert($dataa);
|
$insert = $this->clientPolicyModel->insert($dataa);
|
||||||
if ($insert) {
|
if ($insert) {
|
||||||
return $this->respond(['status' => true,'code' => 200,'message' => 'Data stored successfully'], 200);
|
return $this->respond(['status' => true,'code' => 200,'message' => 'Data stored successfully', 'client_policy_id' => $client_policy_id], 200);
|
||||||
} else {
|
} else {
|
||||||
return $this->respond(['status' => false,'code' => 404, 'message' => 'Failed to store data'], 200);
|
return $this->respond(['status' => false,'code' => 404, 'message' => 'Failed to store data'], 200);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
// Handle the exception
|
|
||||||
echo "Failed to insert data: " . $e->getMessage();
|
echo "Failed to insert data: " . $e->getMessage();
|
||||||
// Log the error
|
|
||||||
log_message('error', 'Failed to insert data: ' . $e->getMessage());
|
log_message('error', 'Failed to insert data: ' . $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1006,11 +987,63 @@ class ClientController extends AdminController
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function updateClientPolicyStatus($id=null){
|
public function updateClientPolicyStatus(){
|
||||||
|
|
||||||
|
$client_policy_id = $this->request->getGet('client_policy_id');
|
||||||
|
$record = $this->clientPolicyModel->where('id', $client_policy_id)->first();
|
||||||
|
|
||||||
|
|
||||||
|
$data = $this->policesModel->getPolicyPremium($record['policy_id']);
|
||||||
|
$pattern = '/gmc/i';
|
||||||
|
$subject = $data[0]->policy_type;
|
||||||
|
if (preg_match($pattern, $subject)) {
|
||||||
|
$search_term = 'GMC';
|
||||||
|
} else {
|
||||||
|
$search_term = 'GPA';
|
||||||
|
}
|
||||||
|
|
||||||
|
if($search_term === 'GPA'){
|
||||||
|
$racRate = $this->policyPremium1Model->where(['client_id' => $record['client_id'], 'client_policy_id' => $client_policy_id, 'is_active' => 1])->countAllResults();
|
||||||
|
}else if($search_term === 'GMC'){
|
||||||
|
$racRate = $this->policyPremium2Model->where(['client_id' => $record['client_id'], 'client_policy_id' => $client_policy_id, 'is_active' => 1])->countAllResults();
|
||||||
|
}
|
||||||
|
|
||||||
|
$termsData = $this->clientPolicyModel->where(['id' => $client_policy_id, 'is_active' => 1])->first();
|
||||||
|
if(empty($termsData['policy_terms'])){
|
||||||
|
return $this->respond(['status' => false,'code' => 200,'message' => 'This Policy does not Create Terms'], 200);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$termsData = json_decode($termsData['policy_terms']);
|
||||||
|
|
||||||
|
if (isset($termsData->sum_insured) && empty($termsData->sum_insured)) {
|
||||||
|
return $this->respond(['status' => false,'code' => 200,'message' => 'The Policy terms Sum Insured field is empty', 'data' => $record], 200);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($termsData->SumInsured) && empty($termsData->sum_insured)) {
|
||||||
|
return $this->respond(['status' => false,'code' => 200,'message' => 'The Policy terms Sum Insured field is empty'], 200);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if 'family_floater' key exists and has a value
|
||||||
|
if (isset($termsData->family_floater) && empty($termsData->family_floater)) {
|
||||||
|
return $this->respond(['status' => false,'code' => 200,'message' => 'The Policy terms Family Floater field is empty'], 200);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if 'family_floaters' key exists and has a value
|
||||||
|
if (isset($termsData->family_floaters) && is_array($termsData->family_floaters) && count($termsData->family_floaters) <= 0) {
|
||||||
|
return $this->respond(['status' => false,'code' => 200,'message' => 'The Policy terms Family Members field is empty'], 200);
|
||||||
|
$familyFloatersCount = count($termsData->family_floaters);
|
||||||
|
}
|
||||||
|
|
||||||
|
if($racRate == 0){
|
||||||
|
|
||||||
|
return $this->respond(['status' => false,'code' => 200,'message' => 'The Policy has no Data for Rac Rate'], 200);
|
||||||
|
}
|
||||||
|
|
||||||
|
$policy_status = $this->clientPolicyModel->where('id', $client_policy_id )->set('policy_status', 1)->update();
|
||||||
|
return $this->respond(['status' => true,'code' => 200, 'message' => 'Policy Status Updated Successfully', 'data' => $termsData, 'racRate' => $racRate], 200);
|
||||||
|
|
||||||
|
|
||||||
$policy_status = $this->clientPolicyModel->where('id', $id )->set('policy_status', 1)->update();
|
|
||||||
return $this->respond(['status' => true,'code' => 200,'data' => $id], 200);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -18,9 +18,10 @@ use App\Controllers\JobWorker ;
|
|||||||
use App\Controllers\Jobs\SubJob;
|
use App\Controllers\Jobs\SubJob;
|
||||||
use App\Controllers\EmployeeServiceController;
|
use App\Controllers\EmployeeServiceController;
|
||||||
|
|
||||||
|
|
||||||
use CodeIgniter\API\ResponseTrait;
|
use CodeIgniter\API\ResponseTrait;
|
||||||
|
|
||||||
|
use PhpOffice\PhpSpreadsheet\Spreadsheet;
|
||||||
|
|
||||||
class EmployeeController extends AdminController
|
class EmployeeController extends AdminController
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -192,9 +193,68 @@ class EmployeeController extends AdminController
|
|||||||
|
|
||||||
public function getExcelFileErrors()
|
public function getExcelFileErrors()
|
||||||
{
|
{
|
||||||
|
|
||||||
$file_id = $this->request->uri->getSegment(3);
|
$file_id = $this->request->uri->getSegment(3);
|
||||||
|
$file = $this->fileModel->find($file_id);
|
||||||
|
$error_data = json_decode($file['reason']);
|
||||||
|
$file_name_with_path = WRITEPATH."/uploads/excel/".$file['file_name'];
|
||||||
|
|
||||||
echo view('excel_errors');
|
//check the file exist or not
|
||||||
|
if(!file_exists($file_name_with_path))
|
||||||
|
{
|
||||||
|
$error_message = "File not found";
|
||||||
|
$this->myLogger->logme('error',($error_message . ' for file id ' . $file_id));
|
||||||
|
}
|
||||||
|
|
||||||
|
$spreadsheet = \PhpOffice\PhpSpreadsheet\IOFactory::load($file_name_with_path);
|
||||||
|
$sheet = $spreadsheet->getActiveSheet();
|
||||||
|
|
||||||
|
$highestRowAndColumn = $sheet->getHighestRowAndColumn();
|
||||||
|
$excel_data = $sheet->rangeToArray('A1:' . $highestRowAndColumn['column'] . $highestRowAndColumn['row']);
|
||||||
|
$data['excel_header'] = $excel_data[0];
|
||||||
|
unset($excel_data[0]);
|
||||||
|
$data['excel_data'] = $excel_data;
|
||||||
|
|
||||||
|
|
||||||
|
echo '<pre>';
|
||||||
|
|
||||||
|
// foreach ($error_data->error_data as $key => $value) {
|
||||||
|
// print_r($excel_data[$key]);
|
||||||
|
// foreach($value as $key2 => $value2){
|
||||||
|
// // echo '<pre>';
|
||||||
|
// // print_r($excel_data[$key][$value2->col_idx]);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// }
|
||||||
|
$finalArray = [];
|
||||||
|
foreach ($error_data->error_data as $key => $value) {
|
||||||
|
foreach($value as $key2 => $value2){
|
||||||
|
$error_data = $value2->error;
|
||||||
|
|
||||||
|
echo '<pre>';
|
||||||
|
// print_r([$value2->col_idx]);
|
||||||
|
$excel_data[$key][$value2->col_idx] = $error_data;
|
||||||
|
// print_r($excel_data[$key]);
|
||||||
|
|
||||||
|
}
|
||||||
|
// print_r($excel_data[$key]);
|
||||||
|
// array_push($finalArray, $excel_data);
|
||||||
|
}
|
||||||
|
|
||||||
|
print_r($excel_data);
|
||||||
|
|
||||||
|
die;
|
||||||
|
|
||||||
|
|
||||||
|
// echo '###################################################################### <br>';
|
||||||
|
// print_r($excel_data);
|
||||||
|
// echo '###################################################################### <br>';
|
||||||
|
// print_r($error_data->error_data); die;
|
||||||
|
|
||||||
|
$headerData['page_name'] = 'Excel Error';
|
||||||
|
echo view('layout/header', $headerData);
|
||||||
|
echo view('excel_errors', $data);
|
||||||
|
echo view('layout/footer');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -203,10 +203,10 @@
|
|||||||
<div class="btn-group dropdown">
|
<div class="btn-group dropdown">
|
||||||
<a href="javascript: void(0);" class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown"aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>
|
<a href="javascript: void(0);" class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown"aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>
|
||||||
<div class="dropdown-menu dropdown-menu-right">
|
<div class="dropdown-menu dropdown-menu-right">
|
||||||
<a href="#" data-id="${item.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.policy_id}" class="dropdown-item btnPolicyMaster" data-toggle="modal" id="${item.policy_type_id}"><i class="mdi mdi-wrench mr-2 text-muted font-18 vertical-middle"></i>Terms</a>
|
<a href="#" data-id="${item.id}" id="${item.policy_type_id}" class="dropdown-item btnPolicyMaster" data-toggle="modal" id="${item.policy_type_id}"><i class="mdi mdi-wrench mr-2 text-muted font-18 vertical-middle"></i>Terms</a>
|
||||||
<a href="#" data-id="${item.policy_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>Rac Rate</a>
|
<a href="#" data-id="${item.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>Rac Rate</a>
|
||||||
<a href="#" data-id="${item.id}" class="dropdown-item btnOpenEnroll"><i class="mdi mdi-file-lock mr-2 text-muted font-18 vertical-middle"></i>Open Enrollment</a>
|
<a href="#" data-id="${item.id}" id="${item.policy_id}" class="dropdown-item btnOpenEnroll"><i class="mdi mdi-file-lock mr-2 text-muted font-18 vertical-middle"></i>Open Enrollment</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@ -286,11 +286,17 @@
|
|||||||
<td>${item.policy_name}</td>
|
<td>${item.policy_name}</td>
|
||||||
<td>${item.tpa_short} - ${item.tpa_branch_code}</td>
|
<td>${item.tpa_short} - ${item.tpa_branch_code}</td>
|
||||||
<td>${rearrangeDateFormat(item.policy_start_date)} - ${rearrangeDateFormat(item.policy_end_date)}</td>
|
<td>${rearrangeDateFormat(item.policy_start_date)} - ${rearrangeDateFormat(item.policy_end_date)}</td>
|
||||||
<td>${checkDateStatus(item.policy_end_date)}</td>
|
<td>${checkDateStatus(item.policy_end_date, 1)}</td>
|
||||||
<td>
|
<td>
|
||||||
<a data-id="${item.id}" class="btnPolicyEdit mdi mdi-lead-pencil" href="#" style="font-size:18px;"></a>
|
<div class="btn-group dropdown">
|
||||||
<a data-id="${item.policy_id}" class="btnPolicyMaster mdi mdi-wrench" href="#" data-toggle="modal" data-target="${item.policy_type_id}" style="font-size:18px; margin-left: 7px;"></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 data-id="${item.policy_id}" class="btnPolicyModel mdi mdi-book-open" href="#" data-toggle="modal" data-target="#bs-example-modal-lg" style="font-size:18px;"></a>
|
<div class="dropdown-menu dropdown-menu-right">
|
||||||
|
<a href="#" data-id="${item.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.policy_id}" class="dropdown-item btnPolicyMaster" data-toggle="modal" id="${item.policy_type_id}"><i class="mdi mdi-wrench mr-2 text-muted font-18 vertical-middle"></i>Terms</a>
|
||||||
|
<a href="#" data-id="${item.policy_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>Rac Rate</a>
|
||||||
|
<a href="#" data-id="${item.id}" class="dropdown-item btnOpenEnroll"><i class="mdi mdi-file-lock mr-2 text-muted font-18 vertical-middle"></i>Open Enrollment</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
`;
|
`;
|
||||||
@ -300,6 +306,17 @@
|
|||||||
error: function(xhr, status, error) {
|
error: function(xhr, status, error) {
|
||||||
console.error(xhr.responseText);
|
console.error(xhr.responseText);
|
||||||
console.error(status, error);
|
console.error(status, error);
|
||||||
|
setTimeout(function() {
|
||||||
|
$('.loader').fadeOut();
|
||||||
|
$('.loader-mask').delay(350).fadeOut('slow');
|
||||||
|
if (xhr.status === 404) {
|
||||||
|
toastr.warning('Resource not found', 'Warning');
|
||||||
|
} else if (xhr.status === 500) {
|
||||||
|
toastr.warning('Internal server error', 'Warning');
|
||||||
|
} else {
|
||||||
|
toastr.warning('Unknown error occurred', 'Warning');
|
||||||
|
}
|
||||||
|
}, 1000);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -406,22 +423,53 @@
|
|||||||
|
|
||||||
$('body').on('click', '.btnOpenEnroll', function () {
|
$('body').on('click', '.btnOpenEnroll', function () {
|
||||||
|
|
||||||
var policy_id = $(this).attr('data-id');
|
var client_policy_id = $(this).attr('data-id');
|
||||||
console.log(policy_id)
|
var policy_id = $(this).attr('id');
|
||||||
if(policy_id){
|
var client_id = $('#client_id_policy').val()
|
||||||
|
|
||||||
|
|
||||||
|
console.log('client_policy_id', client_policy_id);
|
||||||
|
|
||||||
|
if(client_policy_id){
|
||||||
$('.loader').fadeIn();
|
$('.loader').fadeIn();
|
||||||
$('.loader-mask').fadeIn();
|
$('.loader-mask').fadeIn();
|
||||||
}
|
}
|
||||||
|
|
||||||
$.get('<?php echo base_url('util/update-policy-status/');?>'+policy_id, function (data) {
|
$.ajax({
|
||||||
if(data){
|
url: '<?php echo base_url('util/update-policy-status');?>',
|
||||||
|
type: 'GET',
|
||||||
|
data: {
|
||||||
|
client_policy_id : client_policy_id,
|
||||||
|
},
|
||||||
|
success: function(res) {
|
||||||
|
console.log(res);
|
||||||
|
if(res) {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
$('.loader').fadeOut();
|
$('.loader').fadeOut();
|
||||||
$('.loader-mask').delay(350).fadeOut('slow');
|
$('.loader-mask').delay(350).fadeOut('slow');
|
||||||
toastr.success('Policy Status Updated Successfully', 'Success');
|
if(res.status === true){
|
||||||
|
toastr.success(res.message, 'Success');
|
||||||
|
}else if(res.status === false){
|
||||||
|
toastr.warning(res.message, 'Warning');
|
||||||
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
})
|
},
|
||||||
|
error: function(xhr, status, error) {
|
||||||
|
console.error(xhr.responseText);
|
||||||
|
setTimeout(function() {
|
||||||
|
$('.loader').fadeOut();
|
||||||
|
$('.loader-mask').delay(350).fadeOut('slow');
|
||||||
|
if (xhr.status === 404) {
|
||||||
|
toastr.warning('Resource not found', 'Warning');
|
||||||
|
} else if (xhr.status === 500) {
|
||||||
|
toastr.warning('Internal server error', 'Warning');
|
||||||
|
} else {
|
||||||
|
toastr.warning('Unknown error occurred', 'Warning');
|
||||||
|
}
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -1,131 +1,34 @@
|
|||||||
<!DOCTYPE html>
|
<div class="row" id="List-page">
|
||||||
<html lang="en">
|
<div class="col-12">
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<title>nHANCE</title>
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<meta content="A fully featured admin theme which can be used to build CRM, CMS, etc." name="description" />
|
|
||||||
<meta content="Coderthemes" name="author" />
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
||||||
<!-- App favicon -->
|
|
||||||
<link rel="shortcut icon" href="<?= base_url()."public"; ?>/assets/images/favicon.ico">
|
|
||||||
|
|
||||||
<!-- App css -->
|
|
||||||
<link href="<?= base_url()."public"; ?>/assets/css/bootstrap-material.min.css" rel="stylesheet" type="text/css"
|
|
||||||
id="bs-default-stylesheet" />
|
|
||||||
<link href="<?= base_url()."public"; ?>/assets/css/app-material.min.css" rel="stylesheet" type="text/css"
|
|
||||||
id="app-default-stylesheet" />
|
|
||||||
|
|
||||||
<link href="<?= base_url()."public"; ?>/assets/css/bootstrap-material-dark.min.css" rel="stylesheet" type="text/css"
|
|
||||||
id="bs-dark-stylesheet" />
|
|
||||||
<link href="<?= base_url()."public"; ?>/assets/css/app-material-dark.min.css" rel="stylesheet" type="text/css"
|
|
||||||
id="app-dark-stylesheet" />
|
|
||||||
|
|
||||||
<!-- icons -->
|
|
||||||
<link href="<?= base_url()."public"; ?>/assets/css/icons.min.css" rel="stylesheet" type="text/css" />
|
|
||||||
|
|
||||||
<style>
|
|
||||||
a:hover {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body class="loading auth-fluid-pages pb-0">
|
|
||||||
|
|
||||||
<!-- <div class="auth-fluid"> -->
|
|
||||||
<div class="col-lg-12">
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="header-title">Contextual classes</h4>
|
<div class="row" style="margin-bottom:1rem;">
|
||||||
<p class="sub-header">
|
<div class="col-6" style="align-self: center;">
|
||||||
Use contextual classes to color table rows or individual cells.
|
<h4 class="header-title" style="position: relative;">Excel Error List</h4>
|
||||||
</p>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table mb-0">
|
<table class="table table-sm table-hover m-0 table-centered dt-responsive nowrap w-100" cellspacing="0" id="tickets-table">
|
||||||
<thead>
|
<thead class="bg-light">
|
||||||
<tr>
|
<tr>
|
||||||
<th>#</th>
|
<?php foreach ($excel_header as $header): ?>
|
||||||
<th>Column heading</th>
|
<th><?php echo $header; ?></th>
|
||||||
<th>Column heading</th>
|
<?php endforeach; ?>
|
||||||
<th>Column heading</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr class="table-active">
|
<?php for ($i = 1; $i < count($excel_data); $i++): ?>
|
||||||
<th scope="row">1</th>
|
|
||||||
<td>Column content</td>
|
|
||||||
<td>Column content</td>
|
|
||||||
<td>Column content</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">2</th>
|
<?php foreach ($excel_data[$i] as $data): ?>
|
||||||
<td>Column content</td>
|
<td><?php echo $data; ?></td>
|
||||||
<td>Column content</td>
|
<?php endforeach; ?>
|
||||||
<td>Column content</td>
|
|
||||||
</tr>
|
|
||||||
<tr class="table-success">
|
|
||||||
<th scope="row">3</th>
|
|
||||||
<td>Column content</td>
|
|
||||||
<td>Column content</td>
|
|
||||||
<td>Column content</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">4</th>
|
|
||||||
<td>Column content</td>
|
|
||||||
<td>Column content</td>
|
|
||||||
<td>Column content</td>
|
|
||||||
</tr>
|
|
||||||
<tr class="table-info">
|
|
||||||
<th scope="row">5</th>
|
|
||||||
<td>Column content</td>
|
|
||||||
<td>Column content</td>
|
|
||||||
<td>Column content</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">6</th>
|
|
||||||
<td>Column content</td>
|
|
||||||
<td>Column content</td>
|
|
||||||
<td>Column content</td>
|
|
||||||
</tr>
|
|
||||||
<tr class="table-warning">
|
|
||||||
<th scope="row">7</th>
|
|
||||||
<td>Column content</td>
|
|
||||||
<td>Column content</td>
|
|
||||||
<td>Column content</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">8</th>
|
|
||||||
<td>Column content</td>
|
|
||||||
<td>Column content</td>
|
|
||||||
<td>Column content</td>
|
|
||||||
</tr>
|
|
||||||
<tr class="table-danger">
|
|
||||||
<th scope="row">9</th>
|
|
||||||
<td>Column content</td>
|
|
||||||
<td>Column content</td>
|
|
||||||
<td>Column content</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
|
<?php endfor; ?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div> <!-- end table-responsive-->
|
<div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div> <!-- end card -->
|
|
||||||
</div> <!-- end col -->
|
|
||||||
</div>
|
</div>
|
||||||
<!-- </div> -->
|
</div>
|
||||||
<!-- end auth-fluid-->
|
<!-- end col -->
|
||||||
|
</div>
|
||||||
<!-- Vendor js -->
|
|
||||||
<script src="<?= base_url()."public"; ?>/assets/js/vendor.min.js"></script>
|
|
||||||
<!-- App js -->
|
|
||||||
<script src="<?= base_url()."public"; ?>/assets/js/app.min.js"></script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
||||||
|
|
||||||
@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
|
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<title>nHance</title>
|
<title><?= isset($page_name) ? $page_name : 'nHance'; ?></title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<meta content="" name="description" />
|
<meta content="" name="description" />
|
||||||
<meta content="nHANCE" name="nHANCE" />
|
<meta content="nHANCE" name="nHANCE" />
|
||||||
|
|||||||
@ -79,7 +79,7 @@
|
|||||||
<form role="form" class="parsley-examples" method="post" id="policyJsonForm" enctype="multipart/form-data" >
|
<form role="form" class="parsley-examples" method="post" id="policyJsonForm" enctype="multipart/form-data" >
|
||||||
<input type="hidden" value="<?= csrf_hash() ?>" name="<?= csrf_token() ?>"/>
|
<input type="hidden" value="<?= csrf_hash() ?>" name="<?= csrf_token() ?>"/>
|
||||||
<input type="hidden" name="client_id" id="Client_id" value="<?= isset($client['id']) ? $client['id'] : '' ?>"/>
|
<input type="hidden" name="client_id" id="Client_id" value="<?= isset($client['id']) ? $client['id'] : '' ?>"/>
|
||||||
<input type="hidden" name="client_policy_id" id="client_policy_id" />
|
<input type="hidden" name="client_policy_id" id="gmc_client_policy_id" />
|
||||||
<input type="hidden" name="policy_id" id="policy_id"/>
|
<input type="hidden" name="policy_id" id="policy_id"/>
|
||||||
<input type="hidden" id="gmc_emp_count"/>
|
<input type="hidden" id="gmc_emp_count"/>
|
||||||
|
|
||||||
@ -128,7 +128,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="row" style="margin-bottom: 10px;">
|
<div class="row" style="margin-bottom: 10px;display:none;">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<label for="totalSumInsured">Corporate Buffer</label>
|
<label for="totalSumInsured">Corporate Buffer</label>
|
||||||
</div>
|
</div>
|
||||||
@ -148,7 +148,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row" style="margin-bottom: 10px;">
|
<div class="row" style="margin-bottom: 10px;display:none;">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<label for="totalSumInsured">Maternity Coverage</label>
|
<label for="totalSumInsured">Maternity Coverage</label>
|
||||||
</div>
|
</div>
|
||||||
@ -157,7 +157,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row" style="margin-bottom: 10px;">
|
<div class="row" style="margin-bottom: 10px;display:none;">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<label for="totalSumInsured">Twin Delivery</label>
|
<label for="totalSumInsured">Twin Delivery</label>
|
||||||
</div>
|
</div>
|
||||||
@ -166,7 +166,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row" style="margin-bottom: 10px;">
|
<div class="row" style="margin-bottom: 10px;display:none;">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<label for="totalSumInsured">Pre and Post natal</label>
|
<label for="totalSumInsured">Pre and Post natal</label>
|
||||||
</div>
|
</div>
|
||||||
@ -175,7 +175,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row" style="margin-bottom: 10px;">
|
<div class="row" style="margin-bottom: 10px;display:none;">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<label for="totalSumInsured">Baby Day 1 Cover</label>
|
<label for="totalSumInsured">Baby Day 1 Cover</label>
|
||||||
</div>
|
</div>
|
||||||
@ -486,6 +486,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <hr> -->
|
<!-- <hr> -->
|
||||||
|
|
||||||
<!-- <div class="form-row" id="grid_content_input">
|
<!-- <div class="form-row" id="grid_content_input">
|
||||||
@ -615,16 +616,14 @@ var grid_html = '';
|
|||||||
|
|
||||||
$('body').on('click', '.btnPolicyMaster', function () {
|
$('body').on('click', '.btnPolicyMaster', function () {
|
||||||
|
|
||||||
var policy_id = $(this).data('id');
|
var client_policy_id = $(this).data('id');
|
||||||
$('#policy_id').val(policy_id);
|
console.log('gmc_client_policy_id :' ,client_policy_id);
|
||||||
|
|
||||||
|
$('#gmc_client_policy_id').val(client_policy_id)
|
||||||
|
|
||||||
|
|
||||||
var client_id = $('#Client_id').val();
|
|
||||||
$('#client_policy_id').val(policy_id);
|
|
||||||
|
|
||||||
var gmc_policy_type_id = $(this).attr('id');
|
var gmc_policy_type_id = $(this).attr('id');
|
||||||
console.log('gmc_policy_type_id', typeof gmc_policy_type_id)
|
|
||||||
|
|
||||||
|
|
||||||
if(gmc_policy_type_id >= '2'){
|
if(gmc_policy_type_id >= '2'){
|
||||||
|
|
||||||
$('#policyGMCTerms').css('display', '');
|
$('#policyGMCTerms').css('display', '');
|
||||||
@ -636,11 +635,12 @@ var grid_html = '';
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: '<?= base_url("client/policy/getterms") ?>',
|
url: '<?= base_url("client/policy/getterms") ?>',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
data: { policy_id : policy_id , client_id: client_id},
|
data: {client_policy_id: client_policy_id},
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
|
|
||||||
$('#nameOfThePolicyInGMC').html(' - ' + response.policy_name.name);
|
$('#nameOfThePolicyInGMC').html(' - ' + response.policy_name.name);
|
||||||
$('gmc_emp_count').val(response.count)
|
$('gmc_emp_count').val(response.count);
|
||||||
|
|
||||||
if(response.count){
|
if(response.count){
|
||||||
|
|
||||||
$('emp_count').val(response.count)
|
$('emp_count').val(response.count)
|
||||||
|
|||||||
@ -287,156 +287,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div class="form-column">
|
|
||||||
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label for="sumInsured" class=" " style="width: 400px;">Sum Insured</label>
|
|
||||||
<input type="text" name="sumInsured2" id="sumInsured2" class="form-control form-control-client-policy-master" onkeypress = "return onlyNumbers(event)"> <br>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id='numberToWord' class="text-danger" style="float: right;position: relative;right: 25px;bottom: 10px;"></div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label for="totalSumInsured" class=" " style="width: 400px;">Total Sum Insured</label>
|
|
||||||
<input type="text" name="totalSumInsured" id="totalSumInsured" class="form-control form-control-client-policy-master">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label class="form-check-label " for="corporatebuffer" style="width: 400px;">Accidental Death Benefit</label>
|
|
||||||
<div class="radiobuttondiv">
|
|
||||||
<input type="radio" name="accidentalDeathBenefit" value="1"> Yes
|
|
||||||
<input type="radio" name="accidentalDeathBenefit" value="0" style="margin-left:10px" checked> No
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label for="permanentTotalDisablement" class=" " style="width: 400px;">Permanent Total Disablement</label>
|
|
||||||
<input type="text" name="permanentTotalDisablement" id="permanentTotalDisablement" class="form-control form-control-client-policy-master">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master" >
|
|
||||||
<label for="permanentPartialDisablement" class=" " style="width: 400px;">Permanent Partial Disablement</label>
|
|
||||||
<input type="text" name="permanentPartialDisablement" id="permanentPartialDisablement" class="form-control form-control-client-policy-master">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master" >
|
|
||||||
<label for="temporaryTotalDisablementBenefit" class=" " style="width: 400px;">Temporary Total Disablement benefit</label>
|
|
||||||
<input type="text" name="temporaryTotalDisablementBenefit" id="temporaryTotalDisablementBenefit" class="form-control form-control-client-policy-master">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label for="accidentalHospitalizationExpenses" class=" " style="width: 400px;">Accidental Hospitalization Expenses</label>
|
|
||||||
<select name="accidentalHospitalizationExpenses" id="accidentalHospitalizationExpenses" class="form-control form-control-client-policy-master">
|
|
||||||
<option value="">Select an option</option>
|
|
||||||
<option value="No">No</option>
|
|
||||||
<option value="10%-40%">Covered upto 10% of SI or 40% of actual which ever is less</option>
|
|
||||||
<option value="20%-50%">Covered upto 20% of SI or 50% of actual which ever is less</option>
|
|
||||||
<option value="50K-500k">INR 50K, to vary in multiples of 25K till 5 Lacs</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label for="childrenEducationWelfareFund" class=" " style="width: 400px;">Children Education Welfare Fund</label>
|
|
||||||
<select name="childrenEducationWelfareFund" id="childrenEducationWelfareFund" class="form-control form-control-client-policy-master">
|
|
||||||
<option value="">Select an option</option>
|
|
||||||
<option value="No">No</option>
|
|
||||||
<option value="10000">Covered upto 10,000/ per child ( Restricted to 2 children)</option>
|
|
||||||
<option value="5000">Covered upto 5,000/ per child ( Restricted to 2 children)</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label class="form-check-label " for="compassionateVisitExpenses" style="width: 400px;">Compassionate Visit Expenses</label>
|
|
||||||
<div class="radiobuttondiv">
|
|
||||||
<input type="radio" name="compassionateVisitExpenses" value="1"> Yes
|
|
||||||
<input type="radio" name="compassionateVisitExpenses" value="0" style="margin-left:10px" checked> No
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
|
|
||||||
<label for="compassionateVisitExpensesData" class=" " style="width: 400px; ">Compassionate Visit Expenses Data</label>
|
|
||||||
<input type="text" name="compassionateVisitExpensesData" id="compassionateVisitExpensesData" class="form-control form-control-client-policy-master">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label class="form-check-label " for="brokenBoneExpenses" style="width: 400px;">Broken Bone Expenses</label>
|
|
||||||
<div class="radiobuttondiv">
|
|
||||||
<input type="radio" name="brokenBoneExpenses" value="1"> Yes
|
|
||||||
<input type="radio" name="brokenBoneExpenses" value="0" style="margin-left:10px" checked> No
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
|
|
||||||
<label for="brokenBoneExpensesData" class=" " style="width: 400px; ">Broken Bone Expenses Data</label>
|
|
||||||
<input type="text" name="brokenBoneExpensesData" id="brokenBoneExpensesData" class="form-control form-control-client-policy-master">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label class="form-check-label " for="ambulanceCharges" style="width: 400px;">Ambulance charges</label>
|
|
||||||
<div class="radiobuttondiv">
|
|
||||||
<input type="radio" name="ambulanceCharges" value="1"> Yes
|
|
||||||
<input type="radio" name="ambulanceCharges" value="0" style="margin-left:10px" checked> No
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
|
|
||||||
<label for="ambulanceChargesData" class=" " style="width: 400px; ">Ambulance charges Data</label>
|
|
||||||
<input type="text" name="ambulanceChargesData" id="ambulanceChargesData" class="form-control form-control-client-policy-master">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label class="form-check-label " for="burnExpenses" style="width: 400px;">Burn Expenses</label>
|
|
||||||
<div class="radiobuttondiv">
|
|
||||||
<input type="radio" name="burnExpenses" value="1"> Yes
|
|
||||||
<input type="radio" name="burnExpenses" value="0" style="margin-left:10px" checked> No
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
|
|
||||||
<label for="burnExpensesData" class=" " style="width: 400px; ">Burn Expenses Data</label>
|
|
||||||
<input type="text" name="burnExpensesData" id="burnExpensesData" class="form-control form-control-client-policy-master">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label class="form-check-label " for="carriageOfDeadBody" style="width: 400px;">Carriage of Dead Body</label>
|
|
||||||
<div class="radiobuttondiv">
|
|
||||||
<input type="radio" name="carriageOfDeadBody" value="1"> Yes
|
|
||||||
<input type="radio" name="carriageOfDeadBody" value="0" style="margin-left:10px" checked> No
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
|
|
||||||
<label for="carriageOfDeadBodyData" class=" " style="width: 400px; ">Carriage of Dead Body Data</label>
|
|
||||||
<input type="text" name="carriageOfDeadBodyData" id="carriageOfDeadBodyData" class="form-control form-control-client-policy-master">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label class="form-check-label " for="animalSnakeInsectBite" style="width: 400px;">Animal/Snake/Insect bite</label>
|
|
||||||
<div class="radiobuttondiv">
|
|
||||||
<input type="radio" name="animalSnakeInsectBite" value="1"> Yes
|
|
||||||
<input type="radio" name="animalSnakeInsectBite" value="0" style="margin-left:10px" checked> No
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label class="form-check-label" for="terrorism" style="width: 400px;">Terrorism</label>
|
|
||||||
<div class="radiobuttondiv">
|
|
||||||
<input type="radio" name="terrorism" value="1"> Yes
|
|
||||||
<input type="radio" name="terrorism" value="0" style="margin-left:10px" checked> No
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label for="worldwideCover" class=" " style="width: 400px;">Worldwide Cover</label>
|
|
||||||
<div class="radiobuttondiv">
|
|
||||||
<input type="radio" name="worldwideCover" value="1"> Yes
|
|
||||||
<input type="radio" name="worldwideCover" value="0" style="margin-left:10px" checked> No
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div> -->
|
|
||||||
|
|
||||||
<div class="form-group text-right m-b-0" style="margin-top: -49px;">
|
<div class="form-group text-right m-b-0" style="margin-top: -49px;">
|
||||||
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1" id="btnGPATermsSubmit" style="margin-top: 100px;">Submit</button>
|
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1" id="btnGPATermsSubmit" style="margin-top: 100px;">Submit</button>
|
||||||
@ -590,16 +441,15 @@
|
|||||||
|
|
||||||
$('body').on('click', '.btnPolicyMaster', function () {
|
$('body').on('click', '.btnPolicyMaster', function () {
|
||||||
|
|
||||||
var policy_id = $(this).data('id');
|
var client_policy_id = $(this).data('id');
|
||||||
console.log('policy_id :' ,policy_id);
|
console.log('client_policy_id :' ,client_policy_id);
|
||||||
$('#gpa_policy_id').val(policy_id);
|
|
||||||
|
|
||||||
var client_id = $('#Client_id').val();
|
$('#gpa_client_policy_id').val(client_policy_id);
|
||||||
$('#gpa_client_policy_id').val(client_id);
|
|
||||||
|
|
||||||
var policy_type_id = $(this).attr('id');
|
var gpa_policy_type_id = $(this).attr('id');
|
||||||
|
console.log('gpa_policy_type_id', gpa_policy_type_id)
|
||||||
|
|
||||||
if(policy_type_id == '1'){
|
if(gpa_policy_type_id == '1'){
|
||||||
|
|
||||||
$('#policyGPATermsForm').css('display', '');
|
$('#policyGPATermsForm').css('display', '');
|
||||||
$('#police-tab').css('display', 'none');
|
$('#police-tab').css('display', 'none');
|
||||||
@ -610,7 +460,7 @@
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: '<?= base_url("client/policy/getterms") ?>',
|
url: '<?= base_url("client/policy/getterms") ?>',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
data: { policy_id : policy_id , client_id: client_id},
|
data: {client_policy_id: client_policy_id},
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
|
|
||||||
console.log(res)
|
console.log(res)
|
||||||
|
|||||||
@ -428,8 +428,6 @@
|
|||||||
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
console.log($('#grid_emp_count').val());
|
|
||||||
|
|
||||||
if($('#grid_emp_count').val() == 'true'){
|
if($('#grid_emp_count').val() == 'true'){
|
||||||
console.log('test')
|
console.log('test')
|
||||||
toastr.warning('Client has active employees', 'Warning');
|
toastr.warning('Client has active employees', 'Warning');
|
||||||
@ -476,6 +474,17 @@
|
|||||||
error: function(xhr, status, error) {
|
error: function(xhr, status, error) {
|
||||||
console.error(xhr.responseText);
|
console.error(xhr.responseText);
|
||||||
console.error(status, error);
|
console.error(status, error);
|
||||||
|
setTimeout(function() {
|
||||||
|
$('.loader').fadeOut();
|
||||||
|
$('.loader-mask').delay(350).fadeOut('slow');
|
||||||
|
if (xhr.status === 404) {
|
||||||
|
toastr.warning('Resource not found', 'Warning');
|
||||||
|
} else if (xhr.status === 500) {
|
||||||
|
toastr.warning('Internal server error', 'Warning');
|
||||||
|
} else {
|
||||||
|
toastr.warning('Unknown error occurred', 'Warning');
|
||||||
|
}
|
||||||
|
}, 1000);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -484,14 +493,13 @@
|
|||||||
$('body').on('click', '.btnPolicyModel', function () {
|
$('body').on('click', '.btnPolicyModel', function () {
|
||||||
|
|
||||||
|
|
||||||
var policy_id = $(this).data('id');
|
var client_policy_id = $(this).data('id');
|
||||||
var client_id = $('#Client_id').val();
|
$('#client_policy_id').val(client_policy_id);
|
||||||
$('#client_policy_id').val(policy_id);
|
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '<?= base_url("util/policy-premium") ?>' ,
|
url: '<?= base_url("util/policy-premium") ?>' ,
|
||||||
type: "GET",
|
type: "GET",
|
||||||
data: { policy_id: policy_id, client_id: client_id },
|
data: { client_policy_id: client_policy_id},
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user