Merge branch 'dev' of bitbucket.org:jubilian/nhance into dev
This commit is contained in:
commit
affbd87822
@ -232,6 +232,7 @@ $routes->group("/util", ["filter" => "authMVC"], function ($routes) {
|
||||
$routes->get("id-card", "EmployeeController::viewECard/$1");
|
||||
$routes->get("preview-card/(:any)", "EmployeeController::previewTemplate/$1");
|
||||
$routes->get("export-import-error-list/(:any)", "EmployeeController::errorListExportImport/$1");
|
||||
$routes->get("has_policy_config_completed/(:any)", "EmployeeController::hasPolicyConfigCompleted/$1");
|
||||
});
|
||||
|
||||
$routes->cli('cli/processjob', 'JobWorker::processJob');
|
||||
@ -288,6 +289,7 @@ $routes->group("employeeRest", ["filter" => "authJWT"], function ($routes) {
|
||||
$routes->post("calculatePremium", "EmployeeRestController::calculatePremium");
|
||||
|
||||
$routes->get("getEmployeeOldPolicy", "EmployeeRestController::getEmployeeOldPolicy");
|
||||
$routes->get("getEmployeeActiveOrInactivePolicy", "EmployeeRestController::getEmployeeActiveOrInactivePolicy");
|
||||
});
|
||||
|
||||
$routes->post("sendEmail", "EmployeeRestController::send_email");
|
||||
|
||||
@ -168,6 +168,8 @@ class ClientController extends AdminController
|
||||
|
||||
// echo "<pre>";
|
||||
// print_r($data); die;
|
||||
$data['placeHolders'] = ['member_name','nhance_logo','tpa_id','ecard_download_link', 'client_logo', 'policy_no', 'member_summary', 'app_link', 'client_name'];
|
||||
|
||||
|
||||
echo view('layout/header', $headerData);
|
||||
echo view('client_onboarding', $data);
|
||||
@ -651,6 +653,7 @@ class ClientController extends AdminController
|
||||
}
|
||||
|
||||
|
||||
$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_end_date'] = change_date_format($this->request->getPost('policy_end_date'), 'd-m-Y', 'Y-m-d');
|
||||
$data['created_by'] = get_session_userid();
|
||||
@ -694,6 +697,7 @@ class ClientController extends AdminController
|
||||
$data['tpa_id'] = $tpaId;
|
||||
$data['policy_id'] = $this->request->getPost('policy_id');
|
||||
$data['policy_type_id'] = $this->request->getPost('policy_type_id');
|
||||
$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_end_date'] = change_date_format($this->request->getPost('policy_end_date'), 'd-m-Y', 'Y-m-d');
|
||||
|
||||
@ -739,6 +743,7 @@ class ClientController extends AdminController
|
||||
|
||||
// dd($data);
|
||||
$data['updated_by'] = get_session_userid();
|
||||
// print_r($data);die;
|
||||
$insert = $this->clientPolicyModel->update($id,$data);
|
||||
$lastQuery = $this->clientPolicyModel->getLastQuery();
|
||||
|
||||
@ -1241,19 +1246,19 @@ class ClientController extends AdminController
|
||||
$client_policy_id = $this->request->getPost("client_policy_id");
|
||||
|
||||
$data['sum_insured'] =str_replace(',', '',$this->request->getPost("sum_insured"));
|
||||
$data['family_floater'] =$this->request->getPost("family_floater");
|
||||
$data['corporatebuffer'] = $this->request->getPost("corporatebuffer");
|
||||
$data['family_floater'] =$this->request->getPost("family_floater") ? $this->request->getPost("family_floater") : 0;
|
||||
$data['corporatebuffer'] = $this->request->getPost("corporatebuffer") ? $this->request->getPost("corporatebuffer") : 0;
|
||||
$data['family_floaters'] = $this->request->getPost("family_floaters") ?? [];
|
||||
|
||||
// print_r($this->request->getPost());die;
|
||||
$data['age_ratio']['self']['min'] = $this->request->getPost("self_min_age");
|
||||
$data['age_ratio']['self']['max'] = $this->request->getPost("self_max_age");
|
||||
$data['age_ratio']['spouse']['min'] = $this->request->getPost("spouse_min_age");
|
||||
$data['age_ratio']['spouse']['max'] = $this->request->getPost("spouse_max_age");
|
||||
$data['age_ratio']['child']['min'] = $this->request->getPost("child_min_age");
|
||||
$data['age_ratio']['child']['max'] = $this->request->getPost("child_max_age");
|
||||
$data['age_ratio']['elders']['min'] = $this->request->getPost("other_member_min_age");
|
||||
$data['age_ratio']['elders']['max'] = $this->request->getPost("other_member_max_age");
|
||||
$data['age_ratio']['self']['min'] = $this->request->getPost("self_min_age") ? $this->request->getPost("self_min_age") :0;
|
||||
$data['age_ratio']['self']['max'] = $this->request->getPost("self_max_age") ? $this->request->getPost("self_max_age") : 0;
|
||||
$data['age_ratio']['spouse']['min'] = $this->request->getPost("spouse_min_age") ? $this->request->getPost("spouse_min_age") : 0;
|
||||
$data['age_ratio']['spouse']['max'] = $this->request->getPost("spouse_max_age") ? $this->request->getPost("spouse_max_age") : 0;
|
||||
$data['age_ratio']['child']['min'] = $this->request->getPost("child_min_age") ? $this->request->getPost("child_min_age") : 0;
|
||||
$data['age_ratio']['child']['max'] = $this->request->getPost("child_max_age") ? $this->request->getPost("child_max_age") : 0;
|
||||
$data['age_ratio']['elders']['min'] = $this->request->getPost("other_member_min_age") ? $this->request->getPost("other_member_min_age") :0;
|
||||
$data['age_ratio']['elders']['max'] = $this->request->getPost("other_member_min_age") ? $this->request->getPost("other_member_min_age") : 0;
|
||||
|
||||
|
||||
|
||||
@ -1327,7 +1332,7 @@ class ClientController extends AdminController
|
||||
}
|
||||
}
|
||||
|
||||
$data['family_floaters']['elders_count'] =$this->request->getPost("member_count");
|
||||
$data['family_floaters']['elders_count'] =$this->request->getPost("member_count") ? $this->request->getPost("member_count") : 0;
|
||||
|
||||
$data['waiverofpreexistingdiseases'] =$this->request->getPost("waiverofpreexistingdiseases");
|
||||
if ($data['waiverofpreexistingdiseases'] == 1) {
|
||||
|
||||
@ -2091,10 +2091,12 @@ class EmpDataServiceController extends BaseController
|
||||
|
||||
$this->myLogger->logme('error', 'sendMailForDownloadingECard - inside try');
|
||||
$count = 0;
|
||||
$counts = 0;
|
||||
|
||||
foreach ($ids as $key => $id) {
|
||||
|
||||
$get_emp_email_and_other_details = $this->employeePolicyModel
|
||||
->select('employee_polices.client_policy_id, employees.emp_code, employees.email_corporate,employees.client_id as client_id, employees.name, employee_polices.rand_string, employee_polices.tpa_id')
|
||||
->select('employee_polices.client_policy_id, employees.relationship, employees.emp_code, employees.email_corporate,employees.client_id as client_id, employees.name, employee_polices.rand_string, employee_polices.tpa_id')
|
||||
->join('employees', 'employees.id = employee_polices.employee_id')
|
||||
->where('employees.emp_status', 'active')
|
||||
->where('employees.is_active', '1')
|
||||
@ -2119,19 +2121,28 @@ class EmpDataServiceController extends BaseController
|
||||
$params['notification'] = $notification;
|
||||
$params['notification'] = $notification;
|
||||
$params['get_emp_email_and_other_details'] = $get_emp_email_and_other_details;
|
||||
$wholeData[] = sendMailNotification::sendMailNotification('member_ecard_mail', $params);
|
||||
// $this->myLogger->logme('error', 'sendMailForDownloadingECard - Send Bulk Mail function end ',);
|
||||
|
||||
$count++;
|
||||
if (isset($get_emp_email_and_other_details['email_corporate']) && !empty($get_emp_email_and_other_details['email_corporate']) && $get_emp_email_and_other_details['relationship'] === 'Self') {
|
||||
$wholeData[] = sendMailNotification::sendMailNotification('member_ecard_mail', $params);
|
||||
|
||||
$count++;
|
||||
}
|
||||
$counts++;
|
||||
|
||||
|
||||
if ($count == 20 || $count == count($ids) - 1) {
|
||||
if ($count == 20 || $counts == count($ids) - 1) {
|
||||
if(count($wholeData) > 0){
|
||||
|
||||
$this->myLogger->logme('error', 'sendMailForDownloadingECard - create a job to bulk mail',);
|
||||
$this->myLogger->logme('error', 'sendMailForDownloadingECard - create a job to bulk mail',);
|
||||
|
||||
$job_details = new Jobs();
|
||||
$r = Jobs::addJob(['job_name' => 'bulk_mail', 'payload' => $wholeData]);
|
||||
$wholeData = [];
|
||||
$count = 0;
|
||||
|
||||
}
|
||||
|
||||
$job_details = new Jobs();
|
||||
$r = Jobs::addJob(['job_name' => 'bulk_mail', 'payload' => $wholeData]);
|
||||
$wholeData = [];
|
||||
$count = 0;
|
||||
}
|
||||
|
||||
$this->myLogger->logme('error', 'sendMailForDownloadingECard - Send Bulk Mail function end ',);
|
||||
|
||||
@ -11,6 +11,7 @@ use Psr\Log\LoggerInterface;
|
||||
use App\Models\EmployeeModel;
|
||||
use App\Models\EmployeePolicyModel;
|
||||
use App\Models\ClientModel;
|
||||
use App\Models\PolicesModel;
|
||||
use App\Models\FileModel;
|
||||
use App\Models\BatchListModel;
|
||||
use App\Models\BatchFileModel;
|
||||
@ -49,6 +50,7 @@ class EmployeeController extends AdminController
|
||||
protected $empEndorsementModel;
|
||||
protected $clientPolicyModel;
|
||||
protected $TPAModel;
|
||||
protected $policiesModel;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
@ -64,6 +66,7 @@ class EmployeeController extends AdminController
|
||||
$this->empEndorsementModel = new EmpEndorsementModel();
|
||||
$this->clientPolicyModel = new ClientPolicyModel();
|
||||
$this->TPAModel = new TPAModel();
|
||||
$this->policiesModel = new PolicesModel();
|
||||
}
|
||||
|
||||
public function list()
|
||||
@ -1148,4 +1151,29 @@ class EmployeeController extends AdminController
|
||||
echo view('export_import_error_list', $excelErrorData);
|
||||
}
|
||||
|
||||
public function hasPolicyConfigCompleted()
|
||||
{
|
||||
$client_policy_id = $this->request->uri->getSegment(3);
|
||||
$policy_details = $this->clientPolicyModel->find($client_policy_id);
|
||||
// print_r($policy_details);die();
|
||||
$policy_terms = isset($policy_details['policy_terms']) ? true : false;
|
||||
|
||||
$slab_details = $this->policiesModel->getPolicySlabRatesForEmpOnboard($client_policy_id,$policy_details['client_id']);
|
||||
|
||||
$message = null;
|
||||
|
||||
if (!isset($policy_terms)) {
|
||||
$message .= 'Policy terms';
|
||||
}
|
||||
|
||||
if($slab_details['slab_rates'] == null && $slab_details['grid_master'] == null)
|
||||
{
|
||||
$message = isset($message) ? ($message . ' and rack rates ') : ($message . ' Rack rates');
|
||||
}
|
||||
$message = isset($message) ? ($message . ' not defined for choosed policy') : null;
|
||||
|
||||
return $this->respond(['dataStatus' => true, 'code' => 200, 'message' => $message], 200);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -618,7 +618,6 @@ class EmployeeRestController extends AdminController
|
||||
|
||||
$client_data = $this->clientModel->where('id', $client_id)->first();
|
||||
|
||||
$notification = $this->notificationModel->where('client_id',$client_id)->where('template_name','member_welcome_mail')->first();
|
||||
|
||||
$jwt = $this->request->getHeader('Authorization');
|
||||
$jwtParts = explode(' ', $jwt);
|
||||
@ -874,10 +873,11 @@ class EmployeeRestController extends AdminController
|
||||
$emp_policy = $this->employeePolicyModel->insert($emp_policy_data);
|
||||
}
|
||||
|
||||
$notification = $this->notificationModel->where('client_id',$client_id)->where('template_name','member_welcome_mail')->first();
|
||||
|
||||
if ($notification['enabled'] == 1) {
|
||||
if (isset($notification) && $notification['enabled'] == 1) {
|
||||
//trigger
|
||||
if ($dataToInsert[$a]['relationship'] == 'Self') {
|
||||
if ($dataToInsert[$a]['relationship'] == 'Self' && isset($dataToInsert[$a]['email_corporate']) && !empty($dataToInsert[$a]['email_corporate'])) {
|
||||
|
||||
$params['dataToInsert'] = $dataToInsert[$a];
|
||||
$params['notification'] = $notification;
|
||||
@ -887,20 +887,18 @@ class EmployeeRestController extends AdminController
|
||||
$count++;
|
||||
}
|
||||
if($count == 20 || $a == count($dataToInsert)-1){
|
||||
$job_details = new Jobs();
|
||||
$r = Jobs::addJob(['job_name' => 'bulk_mail','payload' => $wholeData]);
|
||||
// $wholeData[]= $r;
|
||||
|
||||
// Mailhelper::bulk_mail($wholeData);
|
||||
$wholeData = [];
|
||||
$count = 0;
|
||||
if (count($wholeData) > 0) {
|
||||
$job_details = new Jobs();
|
||||
$r = Jobs::addJob(['job_name' => 'bulk_mail','payload' => $wholeData]);
|
||||
$wholeData = [];
|
||||
$count = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// if ($dataToInsert[$a]['email_corporate'] != null || $dataToInsert[$a]['email_corporate'] != '' && $dataToInsert[$a]['relationship'] == 'Self') {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
return $this->respond(['status' => 'success', 'code' => 200, 'message' => "Success" ], 200);
|
||||
}else{
|
||||
@ -917,7 +915,19 @@ class EmployeeRestController extends AdminController
|
||||
|
||||
|
||||
//-------------------------------------
|
||||
public function getAgeRange($terms,$familyFloatesValue)
|
||||
{
|
||||
$ageRangeArray = ['self' => ['min' => 18, 'max' => 60] , 'spouse' => ['min' => 18, 'max' => 60] , 'child' => ['min' => 0, 'max' => 25] , 'elders' => ['min' => 18, 'max' => 60] ];
|
||||
|
||||
$ageKey = (preg_replace('/\d/', '', $familyFloatesValue) == 'parent' || preg_replace('/\d/', '', $familyFloatesValue) == 'parent_in_law') ? 'elders' : preg_replace('/\d/', '', $familyFloatesValue);
|
||||
if(isset($terms->age_ratio)){
|
||||
return $terms->age_ratio->$ageKey;
|
||||
}else{
|
||||
return $ageRangeArray[$ageKey];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
public function getEmployeePolicy()
|
||||
{
|
||||
try {
|
||||
@ -1022,10 +1032,10 @@ public function getEmployeePolicy()
|
||||
$temp['data']['dob'] = $this->convertDateFormatDMY($value['dob']);
|
||||
$temp['data']['client_policy_id'] = $array->ClientPolicyId;
|
||||
$temp['data']['form_type'] = $dependent;
|
||||
$temp['data']['basic_cover_si'] = $employee_policy->basic_cover_si;
|
||||
$ageKey = ($dependent == 'parent' || $dependent == 'parent_in_law') ? 'elders' : $dependent;
|
||||
|
||||
$temp['data']['age_validation'] = $decodedArray->age_ratio->$ageKey;
|
||||
$temp['data']['basic_cover_si'] = $employee_policy->basic_cover_si;
|
||||
|
||||
|
||||
$temp['data']['age_validation'] = $this->getAgeRange($decodedArray,$familyFloatesValue);
|
||||
|
||||
array_push($data,$temp);
|
||||
unset($empData[$key]);
|
||||
@ -1064,9 +1074,9 @@ public function getEmployeePolicy()
|
||||
$temp2['data']['client_policy_id'] = $array->ClientPolicyId;
|
||||
$temp2['data']['button_name'] = 'Add '.ucfirst(str_replace('_', ' ', preg_replace('/\d/', '', $familyFloatesValue)));
|
||||
$temp2['data']['form_type'] = preg_replace('/\d/', '', $familyFloatesValue);
|
||||
$ageKey = (preg_replace('/\d/', '', $familyFloatesValue) == 'parent' || preg_replace('/\d/', '', $familyFloatesValue) == 'parent_in_law') ? 'elders' : preg_replace('/\d/', '', $familyFloatesValue);
|
||||
|
||||
$temp2['data']['age_validation'] = $decodedArray->age_ratio->$ageKey;
|
||||
|
||||
|
||||
$temp2['data']['age_validation'] = $this->getAgeRange($decodedArray,$familyFloatesValue);
|
||||
|
||||
array_push($data,$temp2);
|
||||
|
||||
@ -1194,8 +1204,8 @@ public function getGmcParrentsPolicy($GmcParrentsPolicy,$emp_code,$client_id)
|
||||
$temp['data']['client_policy_id'] = $array->ClientPolicyId;
|
||||
$temp['data']['form_type'] = $dependent;
|
||||
$temp['data']['basic_cover_si'] = $employee_policy->basic_cover_si;
|
||||
$ageKey = ($dependent == 'parent' || $dependent == 'parent_in_law') ? 'elders' : $dependent;
|
||||
$temp['data']['age_validation'] = $array->Policy_Terms->age_ratio->$ageKey;
|
||||
$temp['data']['age_validation'] = $this->getAgeRange($array->Policy_Terms,$familyFloatesValue);
|
||||
|
||||
|
||||
array_push($data,$temp);
|
||||
unset($empData[$key]);
|
||||
@ -1232,9 +1242,7 @@ public function getGmcParrentsPolicy($GmcParrentsPolicy,$emp_code,$client_id)
|
||||
$temp2['data']['client_policy_id'] = $array->ClientPolicyId;
|
||||
$temp2['data']['button_name'] = 'Add '.ucfirst(str_replace('_', ' ', preg_replace('/\d/', '', $familyFloatesValue)));
|
||||
$temp2['data']['form_type'] = preg_replace('/\d/', '', $familyFloatesValue);
|
||||
$ageKey = (preg_replace('/\d/', '', $familyFloatesValue) == 'parent' || preg_replace('/\d/', '', $familyFloatesValue) == 'parent_in_law') ? 'elders' : preg_replace('/\d/', '', $familyFloatesValue);
|
||||
|
||||
$temp2['data']['age_validation'] = $array->Policy_Terms->age_ratio->$ageKey;
|
||||
$temp2['data']['age_validation'] = $this->getAgeRange($array->Policy_Terms,$familyFloatesValue);
|
||||
array_push($data,$temp2);
|
||||
|
||||
}
|
||||
@ -1435,7 +1443,9 @@ public function getAddOnPolicy()
|
||||
$temp['data']['client_policy_id'] = $array['id'];
|
||||
$temp['data']['form_type'] = $dependent;
|
||||
$temp['data']['basic_cover_si'] = isset($employee_policy->basic_cover_si) ? $employee_policy->basic_cover_si : null;
|
||||
$temp['data']['premium'] = isset($employee_policy->premium) ? $employee_policy->premium : null;
|
||||
$temp['data']['premium'] = isset($employee_policy->premium) ? $employee_policy->premium : null;
|
||||
$temp['data']['age_validation'] = $this->getAgeRange($decodedArray,$familyFloatesValue);
|
||||
|
||||
array_push($data,$temp);
|
||||
unset($addOnEmployeeData[$key]);
|
||||
$floters = array_diff($floters, [$familyFloatesValue]);
|
||||
@ -1492,9 +1502,8 @@ public function getAddOnPolicy()
|
||||
$temp2['data']['client_policy_id'] = $array['id'];
|
||||
$temp2['data']['button_name'] = 'Add '.ucfirst(str_replace('_', ' ', preg_replace('/\d/', '', $familyFloatesValue)));
|
||||
$temp2['data']['form_type'] = preg_replace('/\d/', '', $familyFloatesValue);
|
||||
$ageKey = (preg_replace('/\d/', '', $familyFloatesValue) == 'parent' || preg_replace('/\d/', '', $familyFloatesValue) == 'parent_in_law') ? 'elders' : preg_replace('/\d/', '', $familyFloatesValue);
|
||||
|
||||
$temp2['data']['age_validation'] = $decodedArray->age_ratio->$ageKey;
|
||||
|
||||
$temp2['data']['age_validation'] = $this->getAgeRange($decodedArray,$familyFloatesValue);
|
||||
|
||||
array_push($data,$temp2);
|
||||
|
||||
@ -1658,26 +1667,33 @@ public function iAgreeForAddOn()
|
||||
$find = $this->employeeModel->getEmpFamilybyEmpCode(client_policy_id: $value,emp_code: $emp_code,client_id: $client_id,emp_status:['draft','enrolled'],policy_status:['draft','enrolled']);
|
||||
$array_list[] = $find;
|
||||
}
|
||||
$params ['array_list'] = $array_list;
|
||||
$params ['client_policy_id'] = $client_policy_id;
|
||||
$params ['emp_code'] = $emp_code;
|
||||
$params ['client_id'] = $client_id;
|
||||
$wholeData =sendMailNotification::sendMailNotification('member_review_and_summary_mail', $params);
|
||||
|
||||
MailHelper::send_email($wholeData[0]);
|
||||
$notification = $this->notificationModel->where('client_id' ,$client_id)->where('template_name', 'member_review_and_summary_mail')->first();
|
||||
|
||||
if (isset($wholeData[0])) {
|
||||
|
||||
$account_manager_wholeData =sendMailNotification::sendMailNotification('account_maneger_summary_mail', $params);
|
||||
|
||||
foreach ($account_manager_wholeData as $key => $value) {
|
||||
MailHelper::send_email($value);
|
||||
}
|
||||
if (isset($notification) && $notification['enabled'] == 1) {
|
||||
$params ['array_list'] = $array_list;
|
||||
$params ['client_policy_id'] = $client_policy_id;
|
||||
$params ['emp_code'] = $emp_code;
|
||||
$params ['client_id'] = $client_id;
|
||||
$params ['notification'] = $notification;
|
||||
|
||||
$client_hr_wholeData =sendMailNotification::sendMailNotification('client_hr_summary_mail', $params);
|
||||
$wholeData =sendMailNotification::sendMailNotification('member_review_and_summary_mail', $params);
|
||||
MailHelper::send_email($wholeData[0]);
|
||||
|
||||
foreach ($client_hr_wholeData as $key => $value) {
|
||||
MailHelper::send_email($value);
|
||||
if (isset($wholeData[0])) {
|
||||
|
||||
$account_manager_wholeData =sendMailNotification::sendMailNotification('account_maneger_summary_mail', $params);
|
||||
|
||||
foreach ($account_manager_wholeData as $key => $value) {
|
||||
MailHelper::send_email($value);
|
||||
}
|
||||
|
||||
$client_hr_wholeData =sendMailNotification::sendMailNotification('client_hr_summary_mail', $params);
|
||||
|
||||
foreach ($client_hr_wholeData as $key => $value) {
|
||||
MailHelper::send_email($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2031,6 +2047,83 @@ function getEmployeeOldPolicy()
|
||||
|
||||
}
|
||||
|
||||
function getEmployeeActiveOrInactivePolicy()
|
||||
{
|
||||
|
||||
if($this->request->getGet('type') == 'Active'){ $value = 1; }else{ $value = 0; }
|
||||
$ClientPolicyData = $this->clientPolicyModel->select('client_policy.* , policies.name as policy_name , policy_type.policy_type as policy_type')
|
||||
->join('policies', 'client_policy.policy_id = policies.id', 'left')
|
||||
->join('policy_type', 'client_policy.policy_type_id = policy_type.id', 'left')
|
||||
->where('client_policy.client_id', $this->request->getGet('client_id') )
|
||||
->where('client_policy.is_active', 1 )
|
||||
->where('client_policy.policy_status', $value)
|
||||
->orderby('client_policy.id' , 'ASC')
|
||||
->findAll();
|
||||
|
||||
// Retrieve employee and dependents data by passing the employee code
|
||||
$employeeData = $this->employeeModel->where('emp_code',$this->request->getGet('emp_code'))
|
||||
->where('client_id',$this->request->getGet('client_id'))
|
||||
->where('is_active', 1 )->findAll();
|
||||
$whereArrayForId = [];
|
||||
foreach ( $employeeData as $key => $value) { array_push($whereArrayForId, $value['id']); }
|
||||
|
||||
if(count($ClientPolicyData) > 0 && count($employeeData) > 0)
|
||||
{
|
||||
$result = [];
|
||||
foreach ($ClientPolicyData as $key => $ClientPolicyValue) {
|
||||
|
||||
$terms = json_decode($ClientPolicyValue['policy_terms']);
|
||||
// dd($terms);
|
||||
$data['client_id'] = $ClientPolicyValue['client_id'];
|
||||
$data['client_policy_id'] = $ClientPolicyValue['id'];
|
||||
$data['policy_name'] = $ClientPolicyValue['policy_name'];
|
||||
$data['policy_type'] = $ClientPolicyValue['policy_type'];
|
||||
$data['policy_type'] = $ClientPolicyValue['policy_type'];
|
||||
$data['policy_start_date'] = $this->convertDateFormatDisplay($ClientPolicyValue['policy_start_date']);
|
||||
$data['policy_end_date'] = $this->convertDateFormatDisplay($ClientPolicyValue['policy_end_date']);
|
||||
|
||||
if($ClientPolicyValue['policy_type_id'] == 1){ $data['heading'] = 'Group Personal Accident Coverage'; }else
|
||||
if($ClientPolicyValue['policy_type_id'] == 2){ $data['heading'] = 'Group Medical Coverage'; }else
|
||||
if($ClientPolicyValue['policy_type_id'] == 3){ $data['heading'] = 'Group Medical Coverage - Parents'; }else
|
||||
if($ClientPolicyValue['policy_type_id'] == 4){ $data['heading'] = 'Group Medical Coverage - Top Up'; }else
|
||||
if($ClientPolicyValue['policy_type_id'] == 5){ $data['heading'] = 'Group Medical Coverage - Parents (Top Up)'; }
|
||||
|
||||
if($ClientPolicyValue['policy_type_id'] == 1){ $data['floter_text_heading'] = 'Sum Insured'; }
|
||||
else
|
||||
{
|
||||
if($terms->family_floater == 1){ $data['floter_text_heading'] = 'Floter Sum Insured'; }else{ $data['floter_text_heading'] = 'Sum Insured'; }
|
||||
}
|
||||
|
||||
$employee_policy = $this->employeePolicyModel->select('employees.*,employee_polices.employee_id , employee_polices.basic_cover_si , employee_polices.premium , employee_polices.gst , employee_polices.tpa_id , employee_polices.rand_string')
|
||||
->join('employees', 'employee_polices.employee_id = employees.id', 'left')
|
||||
->whereIn('employee_polices.employee_id',$whereArrayForId)
|
||||
->where('employee_polices.client_policy_id',$ClientPolicyValue['id'])
|
||||
->where('employee_polices.is_active', 1 )->findAll();
|
||||
$si_value = 0;
|
||||
$si_premium_value = 0;
|
||||
$si_gst_value = 0;
|
||||
foreach ($employee_policy as $key => $value) {
|
||||
if(isset($value['basic_cover_si'])){ $si_value = $value['basic_cover_si']; }
|
||||
if(isset($value['premium'])){ $si_premium_value = $si_premium_value + $value['premium'];}
|
||||
if(isset($value['gst'])){ $si_gst_value = $si_gst_value + $value['gst'];}
|
||||
}
|
||||
|
||||
$data['si_value'] = $si_value;
|
||||
$data['si_premium_value'] = ($ClientPolicyValue['policy_type_id'] == 1 || $ClientPolicyValue['policy_type_id'] == 2) ? 0 : $si_premium_value;
|
||||
$data['si_gst_value'] = ($ClientPolicyValue['policy_type_id'] == 1 || $ClientPolicyValue['policy_type_id'] == 2) ? 0 : $si_gst_value;
|
||||
|
||||
$data['EmployeePolicy'] = $employee_policy;
|
||||
array_push($result, $data);
|
||||
}
|
||||
|
||||
return $this->respond(['status' => 'success','code' => 200,'data' => $result ], 200);
|
||||
|
||||
}else{
|
||||
return $this->respond(['status' => 'failed','code' => 404,'data' => [] ], 200);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
private function convertDateFormatDisplay($dateString)
|
||||
{
|
||||
|
||||
@ -8,6 +8,8 @@ class SubJob extends PublicController
|
||||
{
|
||||
public function handle($payload)
|
||||
{
|
||||
$log = \Config\Services::mylogger();
|
||||
$log->logme('error', 'handle called');
|
||||
return $payload['a'] - $payload['b'];
|
||||
}
|
||||
|
||||
|
||||
@ -427,6 +427,7 @@ class MasterController extends AdminController
|
||||
$data['tpa_logo'] = $file_name;
|
||||
$data['front_card'] = $front_card_file_name;
|
||||
$data['back_card'] = $back_card_file_name;
|
||||
$data['network_hospitals'] = $this->request->getPost('network_hospitals');
|
||||
|
||||
$insert = $this->tpaModel->insert($data);
|
||||
|
||||
@ -566,6 +567,7 @@ class MasterController extends AdminController
|
||||
$data['back_card'] = $back_card_file_name;
|
||||
}
|
||||
|
||||
$data['network_hospitals'] = $this->request->getPost('network_hospitals');
|
||||
$update = $this->tpaModel->update($id,$data);
|
||||
|
||||
|
||||
|
||||
@ -147,11 +147,14 @@ class NotificationController extends AdminController
|
||||
$count++;
|
||||
$temp_whole_data[] = $value;
|
||||
if($count == 20 || $whole_index == count($wholeData)-1 && $index == count($values)-1){
|
||||
$job_details = new Jobs();
|
||||
$r = Jobs::addJob(['job_name' => 'bulk_mail','payload' => $temp_whole_data]);
|
||||
if (count($temp_whole_data) > 0) {
|
||||
$job_details = new Jobs();
|
||||
$r = Jobs::addJob(['job_name' => 'bulk_mail','payload' => $temp_whole_data]);
|
||||
|
||||
$temp_whole_data = [];
|
||||
$count = 0;
|
||||
$temp_whole_data = [];
|
||||
$count = 0;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -58,7 +58,6 @@ class MailHelper
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static function bulk_mail(array $mails = [])
|
||||
{
|
||||
// print_r();die;
|
||||
@ -78,6 +77,5 @@ class MailHelper
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
@ -57,21 +57,32 @@ class sendMailNotification
|
||||
if ($value['relationship'] != 'Self') {
|
||||
|
||||
$emp_data = $EmployeeModel->where('client_id', $client_data['id'])->where('emp_code', $value['emp_code'])->where('is_active',1)->findAll();
|
||||
|
||||
foreach ($emp_data as $key => $value) {
|
||||
if ($value['relationship'] == 'Self') {
|
||||
$employee_name =$value['name'];
|
||||
$mail_content = str_replace("[[member_name]]", $employee_name, $mail_content);
|
||||
|
||||
$mail = $value['email_corporate'];
|
||||
if(count($emp_data) > 1){
|
||||
$mail ='';
|
||||
foreach ($emp_data as $key => $values) {
|
||||
if ($value['relationship'] == 'Self') {
|
||||
$employee_name =$values['name'];
|
||||
$mail_content = str_replace("[[member_name]]", $employee_name, $mail_content);
|
||||
|
||||
$mail = $values['email_corporate'];
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$mail ='';
|
||||
}
|
||||
|
||||
}else{
|
||||
$employee_name =$value['name'];
|
||||
$mail_content = str_replace("[[member_name]]", $employee_name, $mail_content);
|
||||
$mail = $value['email_corporate'];
|
||||
}
|
||||
if (isset($mail) && !empty($mail)) {
|
||||
$wholeData[] = ['mail' => $mail, 'subject' => $subject,'message'=> $mail_content, 'bcc'=> $client_data['common_mails']];
|
||||
}
|
||||
}
|
||||
if (count($wholeData) < 1) {
|
||||
$wholeData = [];
|
||||
}
|
||||
return $wholeData;
|
||||
}else{
|
||||
@ -194,8 +205,9 @@ class sendMailNotification
|
||||
|
||||
$mail_content = str_replace("[[member_summary]]", $table_content , $mail_content);
|
||||
// $mail = "aadhavanvalli@gmail.com";
|
||||
|
||||
$wholeData[] = ['mail' => $mail, 'subject' => $subject,'message'=> $mail_content, 'bcc'=> $client_data['common_mails']];
|
||||
// if (isset($mail) && !empty($mail)) {
|
||||
$wholeData[] = ['mail' => $mail, 'subject' => $subject,'message'=> $mail_content, 'bcc'=> $client_data['common_mails']];
|
||||
// }
|
||||
|
||||
return $wholeData;
|
||||
|
||||
|
||||
@ -40,7 +40,8 @@ class ClientPolicyModel extends Model
|
||||
"updated_by",
|
||||
"Is_active",
|
||||
"date_of_exit",
|
||||
"reason_for_exit"
|
||||
"reason_for_exit",
|
||||
"policy_no"
|
||||
];
|
||||
|
||||
public function getClientPolicyById($id){
|
||||
|
||||
@ -39,6 +39,7 @@ class PolicesModel extends Model
|
||||
{
|
||||
|
||||
$premium_slab_data = null;
|
||||
$grid_type = null;
|
||||
|
||||
$policyPremium1Model = new PolicyPremium1Model();
|
||||
$premium_slab_data = $policyPremium1Model->where(['client_id' => $client_id, 'client_policy_id' => $policy_id, 'is_active' => 1])->findAll();
|
||||
@ -50,9 +51,13 @@ class PolicesModel extends Model
|
||||
$premium_slab_data = $policyPremium2Model->where(['client_id' => $client_id, 'client_policy_id' => $policy_id, 'is_active' => 1])->findAll();
|
||||
}
|
||||
|
||||
$grid_id = $premium_slab_data[0]['policy_grid_id'];
|
||||
$policyGridModel = new PolicyGridModel();
|
||||
$results = $policyGridModel->find($grid_id);
|
||||
return ['slab_rates' => $premium_slab_data,'grid_master' => $results];
|
||||
if(isset($premium_slab_data[0]['policy_grid_id']))
|
||||
{
|
||||
$grid_id = $premium_slab_data[0]['policy_grid_id'];
|
||||
$policyGridModel = new PolicyGridModel();
|
||||
$grid_type = $policyGridModel->find($grid_id);
|
||||
}
|
||||
|
||||
return ['slab_rates' => $premium_slab_data,'grid_master' => $grid_type];
|
||||
}
|
||||
}
|
||||
|
||||
@ -15,6 +15,7 @@ class TPAModel extends Model
|
||||
"front_card",
|
||||
"back_card",
|
||||
"tpa_logo",
|
||||
"network_hospitals",
|
||||
"created_by",
|
||||
"updated_by",
|
||||
"is_active",
|
||||
|
||||
@ -201,11 +201,11 @@ body {
|
||||
|
||||
|
||||
if(check_client_id[0].value == '' || check_client_id[0].value == null || check_client_id[0].value == 0){
|
||||
$('#btnBranchAdd').hide();
|
||||
$('#notification-tab').hide();
|
||||
toastr.warning('Please Add the Client!', 'warning',{timeOut: 2000});
|
||||
}else{
|
||||
if ($('#btnBranchBack')[0].style.display == 'none') {
|
||||
$('#btnBranchAdd').show();
|
||||
if ($('#notification-tab')[0].style.display == 'none') {
|
||||
$('#notification-tab').show();
|
||||
}
|
||||
}
|
||||
|
||||
@ -236,10 +236,10 @@ body {
|
||||
client_branch_contact();
|
||||
});
|
||||
|
||||
// document.getElementById("notification_tab").addEventListener("click", function(event) {
|
||||
// event.preventDefault();
|
||||
// client_notification();
|
||||
// });
|
||||
document.getElementById("notification_tab").addEventListener("click", function(event) {
|
||||
event.preventDefault();
|
||||
client_notification();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
@ -92,15 +92,19 @@
|
||||
</div>
|
||||
|
||||
<div class="form-row" id="second" style="display: none;">
|
||||
<div class="form-group col-md-4">
|
||||
<div class="form-group col-md-3">
|
||||
<label for="policy_no">Policy No<span class="text-danger">*</span></label>
|
||||
<input value="" type="text" class="form-control" placeholder="Enter Policy Number " name="policy_no" id="policy_no" required>
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="policy_start_date">Policy Start Date<span class="text-danger">*</span></label>
|
||||
<input value="" type="text" class="form-control" placeholder="Enter Start Date " name="policy_start_date" id="start_date" required>
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<div class="form-group col-md-3">
|
||||
<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>
|
||||
</div>
|
||||
<div class="form-group col-md-4" id="policy_status_field">
|
||||
<div class="form-group col-md-3" id="policy_status_field">
|
||||
<label for="policy_status">Policy Status</label>
|
||||
<input value="" type="text" class="form-control" placeholder="Policy Status" id="policy_status" readonly>
|
||||
</div>
|
||||
@ -196,6 +200,7 @@
|
||||
$('.btnAdd').hide();
|
||||
$('#insurer').val('').change();
|
||||
$('#tpa').val('').change();
|
||||
$('#policy_no').val('').change();
|
||||
$('#start_date').val('').change();
|
||||
$('#end_date').val('').change();
|
||||
$('#policy').html('<option value="" selected>Select Policy</option>').change();
|
||||
@ -222,6 +227,7 @@
|
||||
$('.btnAdd').show();
|
||||
$('#insurer').val('').change();
|
||||
$('#tpa').val('').change();
|
||||
$('#policy_no').val('').change();
|
||||
$('#start_date').val('').change();
|
||||
$('#end_date').val('').change();
|
||||
$('#policy').html('<option value="" selected>Select Policy</option>');
|
||||
@ -461,6 +467,7 @@
|
||||
|
||||
$('#insurer').val('');
|
||||
$('#tpa').val('');
|
||||
$('#policy_no').val('');
|
||||
$('#start_date').val('');
|
||||
$('#end_date').val('');
|
||||
$('#policy').html('<option value="" selected>Select Policy</option>');
|
||||
@ -681,6 +688,7 @@
|
||||
|
||||
$('#policy_type_id').val(res.data.policy_type_id);
|
||||
$('#policy_PrimaryKey').val(res.data.id);
|
||||
$('#policy_no').val(res.data.policy_no);
|
||||
$('#start_date').val(rearrangeDateFormat(res.data.policy_start_date));
|
||||
$('#end_date').val(rearrangeDateFormat(res.data.policy_end_date));
|
||||
$('#policy_status').val(checkDateStatus(res.data.policy_end_date));
|
||||
@ -1254,6 +1262,7 @@
|
||||
|
||||
$('#insurer').val('').change();
|
||||
$('#tpa').val('').change();
|
||||
$('#policy_no').val('');
|
||||
$('#start_date').val('');
|
||||
$('#end_date').val('');
|
||||
$('#base_policy').val('').change();
|
||||
@ -1426,6 +1435,7 @@
|
||||
|
||||
$('#insurer').val(res.data.insurer_branch_id + '-' + res.data.insurer_id).change();
|
||||
$('#tpa').val(res.data.tpa_branch_id + '-' + res.data.tpa_id).change();
|
||||
$('#policy_no').val(res.data.policy_no).change();
|
||||
$('#start_date').val(rearrangeDateFormat(res.data.policy_start_date)).change();
|
||||
$('#end_date').val(rearrangeDateFormat(res.data.policy_end_date)).change();
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@ option:disabled {
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label>Policy</label> <br />
|
||||
<select name="policy_id" class="form-control" id="policy_id">
|
||||
<select name="policy_id" class="form-control" id="policy_id" onchange="checkPolicyTermsAndRackRatesHasDefiend(event)">
|
||||
<option value="0">Select</option>
|
||||
</select>
|
||||
</div>
|
||||
@ -727,10 +727,70 @@ $(document).ready(function() {
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
|
||||
function checkPolicyTermsAndRackRatesHasDefiend(event)
|
||||
{
|
||||
console.log(event.target.id);
|
||||
var policy_id = (event.target.value);
|
||||
console.log('checkPolicyTermsAndRackRatesHasDefiend called ' + policy_id);
|
||||
var apiURL = '<?php echo base_url();?>' + 'util/has_policy_config_completed/' + policy_id;
|
||||
console.log(apiURL);
|
||||
|
||||
$('.loader').fadeIn();
|
||||
$('.loader-mask').fadeIn();
|
||||
|
||||
|
||||
$.ajax({
|
||||
url: apiURL,
|
||||
method: 'GET',
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"X-Requested-With": "XMLHttpRequest"
|
||||
},
|
||||
success: function(response) {
|
||||
|
||||
setTimeout(function() {
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').delay(350).fadeOut('slow');
|
||||
}, 1000);
|
||||
|
||||
console.log('check policy responce', response);
|
||||
|
||||
if (response.code === 200 && response.dataStatus === true && response.message !== null) {
|
||||
toastr.error(response.message, 'Error');
|
||||
$('#emp_form_submit_button').prop('disabled', true);
|
||||
return false;
|
||||
}
|
||||
else if(response.code === 200 && response.dataStatus === true && response.message == null)
|
||||
{
|
||||
// toastr.error('Policy Terms or rack rate not defined!', 'Error');
|
||||
$('#emp_form_submit_button').prop('disabled', false);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
toastr.error('Policy Terms or rack rate not defined!', 'Error');
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
setTimeout(function() {
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').delay(350).fadeOut('slow');
|
||||
}, 1000);
|
||||
toastr.error('Something went wrong! Try Later', 'Error');
|
||||
console.error('Error fetching data from checkPolicyTermsAndRackRatesHasDefiend API:', error);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------
|
||||
</script>
|
||||
@ -25,6 +25,7 @@
|
||||
$member_review_and_summary_mail = 0;
|
||||
$account_maneger_summary_mail = 0;
|
||||
$client_hr_summary_mail = 0;
|
||||
if(isset($notification)){
|
||||
foreach($notification as $value){
|
||||
|
||||
if ($value['template_name'] == 'member_welcome_mail') {
|
||||
@ -50,6 +51,7 @@
|
||||
if ($value['template_name'] == 'client_hr_summary_mail') {
|
||||
$client_hr_summary_mail = $value['enabled'];
|
||||
}
|
||||
}
|
||||
}
|
||||
?></p>
|
||||
</div>
|
||||
@ -57,15 +59,15 @@
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="branch_name">Nhance team mail ID's<span class="text-danger">*</span></label>
|
||||
<textarea name="" id="nhance_team_mail_ids" class="form-control" placeholder="Example: jhon@gmail.com, dave@gmail.com"><?php echo $client['common_mails'] ?></textarea>
|
||||
<textarea name="" id="nhance_team_mail_ids" class="form-control" placeholder="Example: jhon@gmail.com, dave@gmail.com"><?php echo isset($client['common_mails']) ? $client['common_mails'] : ''; ?></textarea>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="branch_name">HR mail ID's<span class="text-danger">*</span></label>
|
||||
<textarea name="" id="hr_mail_id" class="form-control" placeholder="Example: jhon@gmail.com, dave@gmail.com"><?php echo $client['hr_mails'] ?></textarea>
|
||||
<textarea name="" id="hr_mail_id" class="form-control" placeholder="Example: jhon@gmail.com, dave@gmail.com"><?php echo isset($client['hr_mails']) ? $client['hr_mails'] : ''; ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-5">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="branch_name">Member welcome mail</label>
|
||||
<label class="switch">
|
||||
<input id="member_welcome_mail_btn" type="checkbox" name="member_welcome_mail_btn" <?= ($member_welcome_mail == 1) ? 'checked' : '' ?>>
|
||||
@ -81,8 +83,8 @@
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-5">
|
||||
<label for="branch_name">Member remider mail</label>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="branch_name">Member reminder mail</label>
|
||||
<label class="switch">
|
||||
<input id="member_reminder_mail_btn" type="checkbox" name="member_reminder_mail_btn" <?= $member_reminder_mail == 1 ? 'checked' : '' ?>>
|
||||
<span class="slider round" style="height: 27px;"></span>
|
||||
@ -96,7 +98,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-5">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="branch_name">Member ECard mail</label>
|
||||
<label class="switch">
|
||||
<input id="member_ecard_mail_btn" type="checkbox" name="member_ecard_mail_btn" <?= $member_ecard_mail == 1 ? 'checked' : '' ?>>
|
||||
@ -111,7 +113,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-5">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="branch_name">Member Review and summary mail</label>
|
||||
<label class="switch">
|
||||
<input id="member_review_and_summary_mail_btn" type="checkbox" name="member_review_and_summary_mail_btn" <?= $member_review_and_summary_mail == 1 ? 'checked' : '' ?>>
|
||||
@ -126,7 +128,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-5">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="branch_name">Account Maneger summary mail</label>
|
||||
<label class="switch">
|
||||
<input id="account_maneger_summary_mail_btn" type="checkbox" name="account_maneger_summary_mail_btn" <?= $account_maneger_summary_mail ? 'checked' : '' ?>>
|
||||
@ -141,7 +143,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-5">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="branch_name">Client HR summary mail</label>
|
||||
<label class="switch">
|
||||
<input id="client_hr_summary_mail_btn" type="checkbox" name="client_hr_summary_mail_btn" <?= $client_hr_summary_mail == 1 ? 'checked' : '' ?>>
|
||||
@ -210,7 +212,7 @@
|
||||
<div class="form-group col-md-12">
|
||||
<select id="member_welcome_mail_customButton" class="form-control" style="border:none;right: 6px;width: auto;position: absolute;z-index: 1;top: 17px;height: 32px;float: right;">
|
||||
<option value="">PlaceHolders</option>
|
||||
<?php foreach ($placeHolders as $value): ?>
|
||||
<?php foreach ($placeHolders as $value): ?>
|
||||
<?php if($value == 'member_name' || $value == 'nhance_logo' || $value == 'client_logo' || $value == 'app_link' || $value == 'client_name'){ ?>
|
||||
<?php $valueChange = str_replace('_', ' ', $value); $valueChange = ucwords($valueChange); ?>
|
||||
<option value="[[<?php echo $value; ?>]]"><?php echo $valueChange; ?></option>
|
||||
@ -265,7 +267,7 @@
|
||||
<label for="emp_code">Template Name</label>
|
||||
</div>
|
||||
<div class="form-group col-md-5">
|
||||
<input type="text" id="template_name" name="template_name" class="form-control" value="Member Remider Mail" readonly placeholder="Template Name">
|
||||
<input type="text" id="template_name" name="template_name" class="form-control" value="Member Reminder Mail" readonly placeholder="Template Name">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -293,7 +295,7 @@
|
||||
<div class="form-group col-md-12">
|
||||
<select id="member_reminder_mail_modal_customButton" class="form-control" style="border:none;right: 6px;width: auto;position: absolute;z-index: 1;top: 17px;height: 32px;float: right;">
|
||||
<option value="">PlaceHolders</option>
|
||||
<?php foreach ($placeHolders as $value): ?>
|
||||
<?php foreach ($placeHolders as $value): ?>
|
||||
<?php if($value == 'member_name' || $value == 'nhance_logo' || $value == 'client_logo' || $value == 'app_link' || $value == 'client_name'){ ?>
|
||||
<?php $valueChange = str_replace('_', ' ', $value); $valueChange = ucwords($valueChange); ?>
|
||||
<option value="[[<?php echo $value; ?>]]"><?php echo $valueChange; ?></option>
|
||||
|
||||
@ -136,13 +136,13 @@
|
||||
<tr>
|
||||
<td style="width: 11%;"><span style="margin-right: 20px;">Self:</span></td>
|
||||
<td style="width: 11%;"><input type="checkbox" style="margin-right: 70px;" name="family_floaters[]" value="self" id="self" checked> </td>
|
||||
<td style="width: 28%;" ><div class="self-age"><span style="margin-right: 20px;">Min Age:</span><input class="underline-input min_age" value="<?php echo isset($self_min_age) ? $self_min_age : '18'; ?>" style="width: 25%;;" type="number" name="self_min_age" id="self_min_age" oninput="this.value = this.value.replace(/\D/g, '').substring(0, 2)"></div></td>
|
||||
<td style="width: 28%;" ><div class="self-age"><span style="margin-right: 20px;">Min Age:</span><input class="underline-input min_age" value="<?php echo (isset($self_min_age) && $self_min_age > 0) ? $self_min_age : '18'; ?>" style="width: 25%;;" type="number" name="self_min_age" id="self_min_age" oninput="this.value = this.value.replace(/\D/g, '').substring(0, 2)"></div></td>
|
||||
<td style="width: 28%;" ><div class="self-age"><span style="margin-right: 20px;">Max Age:</span><input class="underline-input max_age" value="<?php echo isset($self_max_age) ? $self_max_age : '60'; ?>" style="width: 25%;;" type="number" name="self_max_age" id="self_max_age" oninput="this.value = this.value.replace(/\D/g, '').substring(0, 2)"></div></td>
|
||||
</tr><tr><td></td></tr><tr><td></td></tr><tr><td></td></tr>
|
||||
<tr>
|
||||
<td style="width: 11%;"><span style="margin-right: 20px;">Spouse:</span></td>
|
||||
<td style="width: 11%;"><input type="checkbox" style="margin-right: 70px;"name="family_floaters[]" value="spouse" id="spouse"></td>
|
||||
<td style="width: 28%;" ><div class="spouse-age"><span style="margin-right: 20px;">Min Age:</span><input class="underline-input min_age" value="<?php echo isset($spouse_min_age) ? $spouse_min_age : '18'; ?>" style="width: 25%;;" type="number" name="spouse_min_age" id="spouse_min_age" oninput="this.value = this.value.replace(/\D/g, '').substring(0, 2)"></div></td>
|
||||
<td style="width: 28%;" ><div class="spouse-age"><span style="margin-right: 20px;">Min Age:</span><input class="underline-input min_age" value="<?php echo (isset($spouse_min_age) && $spouse_min_age > 0) ? $spouse_min_age : '18'; ?>" style="width: 25%;;" type="number" name="spouse_min_age" id="spouse_min_age" oninput="this.value = Math.max(this.value.replace(/\D/g, '').substring(0, 2),18)"></div></td>
|
||||
<td style="width: 28%;" ><div class="spouse-age"><span style="margin-right: 20px;">Max Age:</span><input class="underline-input max_age" value="<?php echo isset($spouse_max_age) ? $spouse_max_age : '60'; ?>" style="width: 25%;;" type="number" name="spouse_max_age" id="spouse_max_age" oninput="this.value = this.value.replace(/\D/g, '').substring(0, 2)"></div></td>
|
||||
</tr><tr><td></td></tr><tr><td></td></tr><tr><td></td></tr>
|
||||
<tr>
|
||||
@ -686,8 +686,8 @@
|
||||
|
||||
|
||||
if (!$('#self').prop('checked')) {
|
||||
$('#self_min_age').removeAttr('name')
|
||||
$('#self_max_age').removeAttr('name')
|
||||
$('#self_min_age').removeAttr('name');
|
||||
$('#self_max_age').removeAttr('name');
|
||||
}
|
||||
|
||||
if (!$('#spouse').prop('checked')) {
|
||||
@ -1040,6 +1040,9 @@
|
||||
|
||||
if ($('#spouse').prop('checked')) {
|
||||
$('.spouse-age').css('display','');
|
||||
// $('#spouse_min_age').val(18);
|
||||
// $('#spouse_max_age').val(60);
|
||||
|
||||
} else {
|
||||
$('.spouse-age').css('display','none');
|
||||
}
|
||||
@ -1253,6 +1256,12 @@
|
||||
$('#spouse').change(function () {
|
||||
if ($(this).prop('checked')) {
|
||||
$('.spouse-age').css('display','');
|
||||
if($('#spouse_min_age').val() < 17 || $('#spouse_min_age').val() == '' ){
|
||||
$('#spouse_min_age').val(18);
|
||||
}
|
||||
if($('#spouse_max_age').val() < 17 || $('#spouse_max_age').val() == '' ){
|
||||
$('#spouse_max_age').val(60);
|
||||
}
|
||||
}else{
|
||||
$('.spouse-age').css('display','none');
|
||||
}
|
||||
@ -1262,6 +1271,13 @@
|
||||
$('#children').change(function () {
|
||||
if ($(this).val() != 0) {
|
||||
$('.child-age').css('display','');
|
||||
|
||||
if($('#child_min_age').val() < 0 || $('#child_min_age').val() == '' ){
|
||||
$('#child_min_age').val(0);
|
||||
}
|
||||
if($('#child_max_age').val() < 24 || $('#child_max_age').val() == '' ){
|
||||
$('#child_max_age').val(25);
|
||||
}
|
||||
}else{
|
||||
$('.child-age').css('display','none');
|
||||
}
|
||||
@ -1273,6 +1289,13 @@
|
||||
var family_floaters = $(this).val();
|
||||
if($('#family_floaters').val() != 0){
|
||||
$('.other-member-age').css('display','');
|
||||
if($('#other_member_min_age').val() < 17 || $('#other_member_min_age').val() == '' ){
|
||||
$('#other_member_min_age').val(18);
|
||||
}
|
||||
if($('#other_member_max_age').val() < 79 || $('#other_member_max_age').val() == '' ){
|
||||
$('#other_member_max_age').val(60);
|
||||
}
|
||||
|
||||
}else{
|
||||
$('.other-member-age').css('display','none');
|
||||
}
|
||||
|
||||
@ -13,24 +13,28 @@
|
||||
<input type="text" class="form-control" id="tpa_name" placeholder="Enter TPA Name" value="<?= isset($tpa['name']) ? $tpa['name'] : '' ?>" name="name" required>
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="short_name">TPA Short Name<span class="text-danger">*</span></label>
|
||||
<label for="tpa_short_name">TPA Short Name<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="short_name" placeholder="Enter Short Name" value="<?= isset($tpa['short_name']) ? $tpa['short_name'] : '' ?>" name="short_name" required>
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="short_name">TPA Logo<span class="text-danger"></span></label>
|
||||
<label for="tpa_logo">TPA Logo<span class="text-danger"></span></label>
|
||||
<input type="file" class="form-control" onchange="PreviewImage();" id="tpa_logo" name="tpa_logo" accept="image/jpeg, image/jpg, image/png">
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="tpa_network_hospitals">Network Hospitals<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="tpa_network_hospitals" name="network_hospitals" placeholder="Enter Network Hospitals" value="<?= isset($tpa['network_hospitals']) ? $tpa['network_hospitals'] : '' ?>" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-10">
|
||||
<label for="tpa_name">E-Card Template<span class="text-danger"></span></label>
|
||||
<label for="tpa_ecard_template">E-Card Template<span class="text-danger"></span></label>
|
||||
<textarea style="height: 100px;" class="form-control" id="ecard_content" placeholder="Enter E-card Content" name="ecard_content"><?= isset($template_data) ? $template_data : '' ?></textarea>
|
||||
</div>
|
||||
<div class="form-group col-md-2 float-right" style="position: relative;top: 0px;left: 40px;">
|
||||
<label for="short_name">Logo Preview<span class="text-danger"></span></label>
|
||||
<label for="tpa_logo_preview">Logo Preview<span class="text-danger"></span></label>
|
||||
<img src="<?= isset($tpa['tpa_logo']) && !empty($tpa['tpa_logo']) ? base_url() . "public/uploads/logo/" . $tpa['tpa_logo'] : base_url() . "public/assets/images/avatar_2x.png" ?>" width="100" height="100" id="uploadPreview" class="avatar img-circle img-thumbnail" alt="avatar" />
|
||||
</div>
|
||||
</div>
|
||||
@ -43,22 +47,22 @@
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="short_name">Front card Image<span class="text-danger"></span></label>
|
||||
<label for="tpa_front_card_image">Front card Image<span class="text-danger"></span></label>
|
||||
<input type="file" class="form-control" onchange="PreviewImage2();" id="fc" name="fc" accept="image/jpeg, image/jpg, image/png">
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="short_name">Back card Image<span class="text-danger"></span></label>
|
||||
<label for="tpa_back_card_image">Back card Image<span class="text-danger"></span></label>
|
||||
<input type="file" class="form-control" onchange="PreviewImage3();" id="bc" name="bc" accept="image/jpeg, image/jpg, image/png">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="short_name">Front card Preview<span class="text-danger"></span></label>
|
||||
<label for="tpa_front_card_preview">Front card Preview<span class="text-danger"></span></label>
|
||||
<img src="<?= isset($tpa['front_card']) && !empty($tpa['front_card']) ? base_url() . "public/uploads/template_bg/" . $tpa['front_card'] : base_url() . "public/assets/images/avatar_2x.png" ?>" width="100" height="100" id="uploadPreview2" class="avatar img-circle img-thumbnail" alt="avatar" />
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="short_name">Back card Preview<span class="text-danger"></span></label>
|
||||
<label for="tpa_back_card_preview">Back card Preview<span class="text-danger"></span></label>
|
||||
<img src="<?= isset($tpa['back_card']) && !empty($tpa['back_card']) ? base_url() . "public/uploads/template_bg/" . $tpa['back_card'] : base_url() . "public/assets/images/avatar_2x.png" ?>" width="100" height="100" id="uploadPreview3" class="avatar img-circle img-thumbnail" alt="avatar" />
|
||||
</div>
|
||||
</div>
|
||||
@ -111,6 +115,7 @@
|
||||
|
||||
var PrimaryKey = $('#tpa_General_PrimaryKey').val();
|
||||
var form_action = '';
|
||||
|
||||
if (isValid) {
|
||||
|
||||
if (PrimaryKey === '') {
|
||||
|
||||
0
writable/e_card_template/md_tpa.html
Normal file
0
writable/e_card_template/md_tpa.html
Normal file
0
writable/e_card_template/ttpanh.html
Normal file
0
writable/e_card_template/ttpanh.html
Normal file
Loading…
Reference in New Issue
Block a user