MERGE_CONFLICT_TWO_FILE_EMP_UPLOAD_AND_HEADER : RV
This commit is contained in:
commit
7f1073974e
@ -1250,7 +1250,6 @@ class ClientController extends AdminController
|
||||
$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") ? $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;
|
||||
@ -1258,7 +1257,7 @@ class ClientController extends AdminController
|
||||
$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;
|
||||
$data['age_ratio']['elders']['max'] = $this->request->getPost("other_member_max_age") ? $this->request->getPost("other_member_max_age") : 0;
|
||||
|
||||
|
||||
|
||||
@ -1334,6 +1333,8 @@ class ClientController extends AdminController
|
||||
|
||||
$data['family_floaters']['elders_count'] =$this->request->getPost("member_count") ? $this->request->getPost("member_count") : 0;
|
||||
|
||||
// print_r($data);die;
|
||||
|
||||
$data['waiverofpreexistingdiseases'] =$this->request->getPost("waiverofpreexistingdiseases");
|
||||
if ($data['waiverofpreexistingdiseases'] == 1) {
|
||||
$data['maternitycoverage'] =str_replace(',', '',$this->request->getPost("maternitycoverage"));
|
||||
|
||||
@ -216,13 +216,40 @@ class EmployeeController extends AdminController
|
||||
$data['import_or_export'] = ['import' => 'Import', 'export' => 'Export'];
|
||||
$data['insurer_or_tpa'] = ['insurer' => 'Insurer', 'tpa' => 'TPA'];
|
||||
|
||||
// $data['fileList'] = $this->fileModel
|
||||
// ->select(['files.*', 'up.emp_code', 'up.first_name', 'pm.name as policy_name', 'c.short_name', 'cp.id as client_policy_id'])
|
||||
// ->join('user_profiles up', 'files.created_by = up.id')
|
||||
// ->join('client_policy cp', 'files.policy_id = cp.id', 'left')
|
||||
// ->join('policies pm', 'cp.policy_id = pm.id', 'left')
|
||||
// ->join('clients c', 'files.client_id = c.id and files.client_id = cp.client_id', 'left')
|
||||
// ->where('files.created_by', get_session_userid())->orderBy('files.created_at', 'desc')->findAll();
|
||||
// dd($this->fileModel->getLastQuery());
|
||||
|
||||
$data['fileList'] = $this->fileModel
|
||||
->select(['files.*', 'up.emp_code', 'up.first_name', 'pm.name as policy_name', 'c.short_name', 'cp.id as client_policy_id'])
|
||||
->join('user_profiles up', 'files.created_by = up.id')
|
||||
->join('client_policy cp', 'files.policy_id = cp.id', 'left')
|
||||
->join('policies pm', 'cp.policy_id = pm.id', 'left')
|
||||
->join('clients c', 'files.client_id = c.id and files.client_id = cp.client_id', 'left')
|
||||
->where('files.created_by', get_session_userid())->orderBy('files.created_at', 'desc')->findAll();
|
||||
->select([
|
||||
'files.*',
|
||||
'up.emp_code',
|
||||
'up.first_name',
|
||||
'pm.name as policy_name',
|
||||
'c.short_name',
|
||||
'cp.id as client_policy_id',
|
||||
'(SELECT COUNT(*)
|
||||
FROM employees e
|
||||
JOIN employee_polices ep ON e.id = ep.employee_id
|
||||
WHERE e.file_id = files.id AND ep.client_policy_id = files.policy_id) as employee_count',
|
||||
'(SELECT SUM(ep.rata_premimum) + SUM(ep.gst)
|
||||
FROM employees e
|
||||
JOIN employee_polices ep ON e.id = ep.employee_id
|
||||
WHERE e.file_id = files.id AND ep.client_policy_id = files.policy_id) as total'
|
||||
])
|
||||
->join('user_profiles up', 'files.created_by = up.id')
|
||||
->join('client_policy cp', 'files.policy_id = cp.id', 'left')
|
||||
->join('policies pm', 'cp.policy_id = pm.id', 'left')
|
||||
->join('clients c', 'files.client_id = c.id and files.client_id = cp.client_id', 'left')
|
||||
->where('files.created_by', get_session_userid())
|
||||
->orderBy('files.created_at', 'desc')
|
||||
->findAll();
|
||||
// dd($data['fileList']);
|
||||
|
||||
$data['batch_list'] = $this->batchFileModel->select('batch_files.*, policies.name as policy_name, clients.short_name as client_short_name')
|
||||
->join('client_policy', 'client_policy.id = batch_files.client_policy_id')
|
||||
|
||||
@ -15,6 +15,7 @@ use App\Models\ClientPolicyModel;
|
||||
use App\Models\PolicesModel;
|
||||
use App\Models\FileModel;
|
||||
use App\Models\EmpEndorsementModel;
|
||||
use App\Models\MessageModel;
|
||||
|
||||
use App\Controllers\Jobs ;
|
||||
use App\Controllers\JobWorker ;
|
||||
@ -33,6 +34,7 @@ class EmployeeServiceController extends AdminController
|
||||
protected $clientPolicyModel;
|
||||
protected $policiesModel;
|
||||
protected $empEndorsementModel;
|
||||
protected $messageModel;
|
||||
protected $general_relationships = ['self' => ['name' => 'Self', 'gender' => 'M','age_min' => 18,'age_max' => null], 'spouse' => ['name' => 'Spouse', 'gender' => 'F','age_min' => 18,'age_max' => null], 'son' => ['name' => 'Son', 'gender' => 'M','age_min' => null,'age_max' => 25], 'daughter' => ['name' => 'Daughter', 'gender' => 'F','age_min' => null,'age_max' => 25], 'father' => ['name' => 'Father', 'gender' => 'M','age_min' => 18,'age_max' => null], 'mother' => ['name' => 'Mother', 'gender' => 'F','age_min' => 18,'age_max' => null], 'father-in-law' => ['name' => 'Father in Law', 'gender' => 'M','age_min' => 18,'age_max' => null], 'mother-in-law' => ['name' => 'Mother in Law', 'gender' => 'F','age_min' => 18,'age_max' => null]];
|
||||
protected $inception_excel_columns = ['sno'=>['col_idx'=>0,'col_cell_name'=>'A','col_name'=>'S.No','is_mandatory'=>true,'data_type'=>'str','format'=>null,'allowed_values'=>null],'emp_id'=>['col_idx'=>1,'col_cell_name'=>'B','col_name'=>'EMP ID','is_mandatory'=>true,'data_type'=>'str','format'=>null,'allowed_values'=>null],'name_of_emp_dep'=>['col_idx'=>2,'col_cell_name'=>'C','col_name'=>'NAME OF EMP/DEP','is_mandatory'=>true,'data_type'=>'str','format'=>null,'allowed_values'=>null],'dob'=>['col_idx'=>3,'col_cell_name'=>'D','col_name'=>'DOB','is_mandatory'=>['I','A','DA'],'data_type'=>'str','format'=>'d-M-Y','allowed_values'=>null,'custom'=>'check_dob_diff','params'=>['row','relationship','default_age_ratio']],'gender'=>['col_idx'=>4,'col_cell_name'=>'E','col_name'=>'Gender','is_mandatory'=>['I','A','DA'],'data_type'=>'str','format'=>null,'allowed_values'=>['M','F']],'relationship'=>['col_idx'=>5,'col_cell_name'=>'F','col_name'=>'RELATIONSHIP','is_mandatory'=>['I','A','DA'],'data_type'=>'str','format'=>null,'allowed_values'=>null,'custom'=>'check_relationship','params'=>['row','relationship','policy_terms']],'basic_cover_si'=>['col_idx'=>6,'col_cell_name'=>'G','col_name'=>'BASIC COVER SI','is_mandatory'=>['I','A','DA'],'data_type'=>'str','format'=>null,'allowed_values'=>null,'custom' => 'check_si','params' => ['row','policy_terms','slab_details']],'doc'=>['col_idx'=>7,'col_cell_name'=>'H','col_name'=>'Date of Coverage','is_mandatory'=>['A','DA'],'data_type'=>'str','format'=>'d-M-Y','allowed_values'=>null,'params'=>['row']],'doj'=>['col_idx'=>8,'col_cell_name'=>'I','col_name'=>'DOJ','is_mandatory'=>false,'data_type'=>'str','format'=>'d-M-Y','allowed_values'=>null,'custom'=>'check_doj','params'=>['row']],'basic_pay'=>['col_idx'=>9,'col_cell_name'=>'J','col_name'=>'Basic Pay','is_mandatory'=>false,'data_type'=>'str','format'=>null,'allowed_values'=>null,'custom'=>'check_basic_pay','params'=>['row','policy_terms','slab_details']],'band_grade'=>['col_idx'=>10,'col_cell_name'=>'K','col_name'=>'Band/Grade','is_mandatory'=>false,'data_type'=>'str','format'=>null,'allowed_values'=>null,'custom'=>'check_employee_band','params'=>['row','policy_terms','slab_details']],'designation'=>['col_idx'=>11,'col_cell_name'=>'L','col_name'=>'Designation','is_mandatory'=>false,'data_type'=>'str','format'=>null,'allowed_values'=>null],'phone'=>['col_idx'=>12,'col_cell_name'=>'M','col_name'=>'Phone','is_mandatory'=>false,'data_type'=>'str','format'=>null,'allowed_values'=>null,'custom' => 'check_dup_mobileno','params' => ['row','existing_mobilenos']],'email'=>['col_idx'=>13,'col_cell_name'=>'N','col_name'=>'Email','is_mandatory'=>false,'data_type'=>'str','format'=>null,'allowed_values'=>null],'pre_existing_ailments'=>['col_idx'=>14,'col_cell_name'=>'O','col_name'=>'PRE EXISTING AILMENTS','is_mandatory'=>['I','A','DA'],'data_type'=>'str','format'=>null,'allowed_values'=>['0','1']],'change_event'=>['col_idx'=>15,'col_cell_name'=>'P','col_name'=>'Change event','is_mandatory'=>['A','DA','D'],'data_type'=>'str','format'=>null,'allowed_values'=>null],'date_of_exit'=>['col_idx'=>16,'col_cell_name'=>'Q','col_name'=>'Date of exit','is_mandatory'=>['D'],'data_type'=>'str','format'=>'d-M-Y','allowed_values'=>null],'reason_for_exit'=>['col_idx'=>17,'col_cell_name'=>'R','col_name'=>'Reason for exit','is_mandatory'=>['D'],'data_type'=>'str','format'=>null,'allowed_values'=>null]];
|
||||
|
||||
@ -54,6 +56,7 @@ class EmployeeServiceController extends AdminController
|
||||
$this->clientPolicyModel = new ClientPolicyModel();
|
||||
$this->policiesModel = new PolicesModel();
|
||||
$this->empEndorsementModel = new EmpEndorsementModel();
|
||||
$this->messageModel = new MessageModel();
|
||||
}
|
||||
|
||||
public function excelFileFormatValidation($params)
|
||||
@ -143,7 +146,7 @@ class EmployeeServiceController extends AdminController
|
||||
$policy_details = $this->clientPolicyModel->getPolicyDetails($file['client_id'],$file['policy_id']);
|
||||
$policy_terms = json_decode($policy_details[0]->policy_terms);
|
||||
$policy_terms = (array) $policy_terms;// convert obj to array
|
||||
$default_age_ratio = isset($policy_details[0]->age_ratio) ? json_decode($policy_details[0]->age_ratio) : [];
|
||||
$default_age_ratio = isset($policy_terms['age_ratio']) ? json_decode(json_encode($policy_terms['age_ratio']),true) : [];
|
||||
//
|
||||
// dd($default_age_ratio);
|
||||
|
||||
@ -271,6 +274,9 @@ class EmployeeServiceController extends AdminController
|
||||
$failure_reason = ((json_encode($result)));
|
||||
$this->fileModel->where('id', $file_id)->set(['status' => $status,'reason' => $failure_reason])->update();
|
||||
$this->myLogger->logme("error",'{file_id} uploaded failed',['file_id' => $file_id]);
|
||||
|
||||
//set failure msg to pull notifications
|
||||
$this->setPullNotification($this->getFileMetaDataByFileId($file_id,'failure'));
|
||||
}
|
||||
else //trigger next data validation via job queue server
|
||||
{
|
||||
@ -376,26 +382,28 @@ class EmployeeServiceController extends AdminController
|
||||
}
|
||||
}
|
||||
|
||||
if(($file['action'] == 'inception' || $file['action'] == 'addition' || $file['action'] == 'dependent_addition') && ($policy_details['policy_type_id'] != 3)) // 3 is GMC parents (base policy or dep addon)
|
||||
//check self availbale in uploaded file
|
||||
if(($file['action'] == 'inception' || $file['action'] == 'addition') && ($policy_details['policy_type_id'] == 3 && $policy_details['base_policy'] == null)) // 3 is GMC parents dep addon)
|
||||
{
|
||||
// dd('file check');
|
||||
$res = check_self_available_in_family($family,$file['action']);
|
||||
// dd($res);
|
||||
if(!$res['is_self_found'])
|
||||
{
|
||||
array_push($result['error_summary'],14); // Self not found
|
||||
$result['error_data'][ $res['row_id'] ]['sno']['error'][] = "Self not found ";
|
||||
$result['error_data'][ $res['row_id'] ]['sno']['error'][] = "Self not found in uploaded file";
|
||||
}
|
||||
}
|
||||
|
||||
//check self avaialbe where self data is not available either in excel or same policy (i.e.) gMC parents
|
||||
if($policy_details['policy_type_id'] == 3) // 3 is GMC parents (base policy or dep addon)
|
||||
//check self avaialbe where self data is not available either same policy (i.e.) gMC parents
|
||||
if($file['action'] == 'dependent_addition' || ($policy_details['policy_type_id'] == 3 && $policy_details['base_policy'] == null)) // 3 is GMC parents as base policy not as dep addon)
|
||||
{
|
||||
$self_details = $this->employeeModel->getEmpFamilybyEmpCode(emp_code: $emp_id,client_id: $file['client_id'],emp_status: ['active'],policy_status:['active']);
|
||||
// dd($self_details);
|
||||
if(!count($self_details))
|
||||
{
|
||||
array_push($result['error_summary'],14); // Self not found
|
||||
$result['error_data'][ $family[0][0] ]['sno']['error'][] = "Self not found ";
|
||||
$result['error_data'][ $family[0][0] ]['sno']['error'][] = "Self not found in System";
|
||||
}
|
||||
}
|
||||
|
||||
@ -446,8 +454,8 @@ class EmployeeServiceController extends AdminController
|
||||
$failure_reason = ((json_encode($result)));
|
||||
$this->fileModel->where('id', $file_id)->set(['status' => $status,'reason' => $failure_reason])->update();
|
||||
$this->myLogger->logme("error",'{file_id} uploaded failed',['file_id' => $file_id]);
|
||||
//return $this->respond(['dataStatus' => true,'code' => 404,'data' => 'file upload failed with errors'], 200);
|
||||
// dd($failure_reason);
|
||||
//set failure msg to pull notifications
|
||||
$this->setPullNotification($this->getFileMetaDataByFileId($file_id,'failure'));
|
||||
}
|
||||
else if($file['action'] == 'deletion')
|
||||
{
|
||||
@ -571,6 +579,8 @@ class EmployeeServiceController extends AdminController
|
||||
$this->fileModel->where('id', $file_id)->set(['status' => 'success','reason' => ''])->update();
|
||||
$this->myLogger->logme("error",'{file_id} uploaded success',['file_id' => $file_id]);
|
||||
|
||||
$this->setPullNotification($this->getFileMetaDataByFileId($file_id,'success'));
|
||||
|
||||
|
||||
}
|
||||
else if(isset($params['client_policy_id']))//handle data from enrollment to inception
|
||||
@ -708,6 +718,9 @@ class EmployeeServiceController extends AdminController
|
||||
|
||||
$this->fileModel->where('id', $file_id)->set(['status' => 'success','reason' => ''])->update();
|
||||
$this->myLogger->logme("error",'{file_id} uploaded success',['file_id' => $file_id]);
|
||||
|
||||
//set success msg to pull notifications
|
||||
$this->setPullNotification($this->getFileMetaDataByFileId($file_id,'success'));
|
||||
return $endorsement_data;
|
||||
|
||||
}
|
||||
@ -768,6 +781,8 @@ class EmployeeServiceController extends AdminController
|
||||
}
|
||||
$this->fileModel->where('id', $file_id)->set(['status' => 'success','reason' => ''])->update();
|
||||
$this->myLogger->logme("error",'{file_id} uploaded success',['file_id' => $file_id]);
|
||||
//set success msg to pull notifications
|
||||
$this->setPullNotification($this->getFileMetaDataByFileId($file_id,'success'));
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -838,6 +853,8 @@ class EmployeeServiceController extends AdminController
|
||||
}
|
||||
$this->fileModel->where('id', $file_id)->set(['status' => 'success','reason' => ''])->update();
|
||||
$this->myLogger->logme("error",'{file_id} uploaded success',['file_id' => $file_id]);
|
||||
//set success msg to pull notifications
|
||||
$this->setPullNotification($this->getFileMetaDataByFileId($file_id,'success'));
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1088,6 +1105,54 @@ class EmployeeServiceController extends AdminController
|
||||
|
||||
// ---------------------------------------------------------------------------------
|
||||
|
||||
public function getFileMetaDataByFileId($file_id, $status = 'success'){
|
||||
|
||||
$data = $this->fileModel
|
||||
->select('files.*, clients.client_name, clients.short_name, policies.name as policy_name')
|
||||
->join('clients', 'clients.id = files.client_id')
|
||||
->join('client_policy', 'client_policy.id = files.policy_id')
|
||||
->join('policies', 'policies.id = client_policy.policy_id')
|
||||
->where('files.id', $file_id)
|
||||
->first();
|
||||
|
||||
if($status == 'success')
|
||||
{
|
||||
$msg_title = 'File Upload Success';
|
||||
}
|
||||
else if ($status == 'failure')
|
||||
{
|
||||
$msg_title = 'File Upload Failure';
|
||||
}
|
||||
|
||||
$msg_txt = $data['client_name'] . ' - ' . $data['policy_name'] . ' - ' . ucfirst($data['action']);
|
||||
$user_id = $data['created_by'];
|
||||
$url = 'employee/upload';
|
||||
|
||||
return ['msg_txt' => $msg_txt, 'user_id' => $user_id, 'url' => $url, 'status' => $status, 'title' => $msg_title];
|
||||
}
|
||||
|
||||
|
||||
public function setPullNotification($data){
|
||||
|
||||
|
||||
$array = ['message_text' => $data['msg_txt'], 'action_url' => $data['url'], 'msg_status' => $data['status'], 'msg_title' => $data['title']];
|
||||
$jsonEncodeData = json_encode($array);
|
||||
|
||||
$msg_data = [
|
||||
|
||||
'message_text' => $jsonEncodeData,
|
||||
'user_id' => $data['user_id'],
|
||||
'role_id' => NULL,
|
||||
'team_id' => NULL,
|
||||
'message_type' => '1to1',
|
||||
];
|
||||
|
||||
|
||||
$this->messageModel->insert($msg_data);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -185,7 +185,7 @@ class JobWorker extends AdminController
|
||||
//die();
|
||||
$job_status = self::STATUS_FAILED;
|
||||
$runtime = $runtime === null ? microtime(true) - $start : $runtime;
|
||||
$response = $e->getMessage();
|
||||
$response = ['file_name' => $e->getFile(),'error' => $e->getMessage(),'line_no' => $e->getLine(),'info' => $e->getTraceAsString()];
|
||||
}
|
||||
|
||||
$db->query("UPDATE jobs SET status=?, run_time=?, response=? WHERE id=? AND uuid=?", [
|
||||
|
||||
@ -6,10 +6,17 @@ use App\Controllers\PublicController;
|
||||
|
||||
class SubJob extends PublicController
|
||||
{
|
||||
protected $myLogger;
|
||||
public function __construct()
|
||||
{
|
||||
$this->myLogger = \Config\Services::mylogger();
|
||||
}
|
||||
public function handle($payload)
|
||||
{
|
||||
|
||||
$log = \Config\Services::mylogger();
|
||||
$log->logme('error', 'handle called');
|
||||
$log->logme('error', 'insdie handle called');
|
||||
$this->myLogger->logme('error', 'common handle called');
|
||||
return $payload['a'] - $payload['b'];
|
||||
}
|
||||
|
||||
|
||||
@ -185,6 +185,36 @@ if (!function_exists('get_base64_image')) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (!function_exists('format_indian_number')) {
|
||||
function format_indian_number($number) {
|
||||
// Round the number to two decimal places
|
||||
$number = round($number, 2);
|
||||
|
||||
// Split the number into integer and decimal parts
|
||||
$numberParts = explode('.', number_format($number, 2, '.', ''));
|
||||
$integerPart = $numberParts[0];
|
||||
$decimalPart = isset($numberParts[1]) ? $numberParts[1] : '00';
|
||||
|
||||
// Format the integer part with commas
|
||||
$length = strlen($integerPart);
|
||||
$formattedStr = '';
|
||||
$counter = 0;
|
||||
|
||||
for ($i = $length - 1; $i >= 0; $i--) {
|
||||
$formattedStr = $integerPart[$i] . $formattedStr;
|
||||
$counter++;
|
||||
if ($counter == 3 && $i != 0) {
|
||||
$formattedStr = ',' . $formattedStr;
|
||||
$counter = 0;
|
||||
} elseif ($counter == 2 && $i != 0 && $length - $i > 3) {
|
||||
$formattedStr = ',' . $formattedStr;
|
||||
$counter = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Combine the integer and decimal parts
|
||||
return $formattedStr . '.' . $decimalPart;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -41,8 +41,9 @@ class ClientModel extends Model
|
||||
|
||||
foreach ($clients as &$client) {
|
||||
$clientPolicyModel = new ClientPolicyModel();
|
||||
$clientPolicies = $clientPolicyModel->select(['client_policy.id','p.name'])
|
||||
$clientPolicies = $clientPolicyModel->select(['client_policy.id','p.name','pt.policy_type'])
|
||||
->join('policies p', 'p.id = client_policy.policy_id')
|
||||
->join('policy_type pt','client_policy.policy_type_id = pt.id')
|
||||
->where('client_policy.client_id',$client['id'])
|
||||
->where('client_policy.is_active', 1)
|
||||
->where('client_policy.policy_status', 1)
|
||||
|
||||
@ -537,7 +537,6 @@ function appendPolicies(data) {
|
||||
value: '0',
|
||||
text: 'Select'
|
||||
}));
|
||||
|
||||
$.each(data, function(index, item) {
|
||||
var option = $('<option>', {
|
||||
value: item.id,
|
||||
|
||||
@ -59,10 +59,15 @@
|
||||
|
||||
}else if( $file['status'] == 'inprogress'){
|
||||
|
||||
echo '<a data-toggle="tooltip" data-placement="top" data-id="' . $file['status'] . '" class="reload" title="Click to reload" href="#">' . $file['status'] . '</a>';
|
||||
$tool_tip_text = "Live(s) : {$file['employee_count']}" . " | Total premium : ₹ " . format_indian_number($file['total'],2,',') ." | Click to reload";
|
||||
echo '<a data-toggle="tooltip" data-placement="top" data-id="' . $file['status'] . '" class="reload" title="'.$tool_tip_text.'" href="#">' . $file['status'] . '</a>';
|
||||
|
||||
}else{
|
||||
echo $file['status'];
|
||||
|
||||
$tool_tip_text = "Live(s) : {$file['employee_count']}" . " | Total premium : ₹ " . format_indian_number($file['total'],2,',') ;
|
||||
// $tool_tip_text = "dssd";
|
||||
// Total Amount : $file['total']";
|
||||
echo '<span data-toggle="tooltip" data-placement="top" data-id="' . $file['status'] . '" title=" '. $tool_tip_text.' ">' . $file['status'] . '</span>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
|
||||
@ -159,6 +159,11 @@
|
||||
method: 'GET',
|
||||
success: function(response) {
|
||||
|
||||
// $(document).ready(function() {
|
||||
// $("#playMusic").get(0).play();
|
||||
// });
|
||||
|
||||
|
||||
console.log('responce', response)
|
||||
|
||||
let messagesList = $('#messages-list');
|
||||
@ -280,7 +285,7 @@
|
||||
|
||||
fetchMessages();
|
||||
|
||||
setInterval(fetchMessages, 5000); // Fetch messages every minute
|
||||
setInterval(fetchMessages, 10000); // Fetch messages every minute
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
@ -136,14 +136,14 @@
|
||||
<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 > 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;">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="lowerIsEighteen(this)"></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 > 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>
|
||||
<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="lowerIsEighteen(this)"></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" ></div></td>
|
||||
</tr><tr><td></td></tr><tr><td></td></tr><tr><td></td></tr>
|
||||
<tr>
|
||||
<td style="width: 11%;"><span for="children">Children:</span></td>
|
||||
@ -177,7 +177,7 @@
|
||||
<option value="2PIL">Only two parents in law (FIL + MIL)</option>
|
||||
<option value="2EPORPIL">Parents or PIL (Any two of Father, Mother, MIl, FIL)</option>
|
||||
<option value="EPORPIL">Either Parents or PIL (Parents or Parents In Law)</option>
|
||||
<option valueCONFLICT="4EPORPIL">Parents + PIL (Father + Mother + MIL + FIL)</option>
|
||||
<option value="4EPORPIL">Parents + PIL (Father + Mother + MIL + FIL)</option>
|
||||
</select>
|
||||
</div>
|
||||
<div style="margin-top:10px">
|
||||
@ -185,8 +185,8 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="width: 22%;" ><div class="other-member-age"><span style="margin-right: 20px;">Elders Count:</span><input class="underline-input" id="member_count" style="width: 25%;;" type="number" name="member_count" disabled id="member_count"></div></td>
|
||||
<td style="width: 28%;" ><div class="other-member-age"><span style="margin-right: 20px;">Min Age:</span><input class="underline-input min_age" value="<?php echo isset($other_member_min_age) ? $other_member_min_age : '18'; ?>" style="width: 25%;;" type="number" class="underline-input min_age" name="other_member_min_age" id="other_member_min_age" oninput="this.value = this.value.replace(/\D/g, '').substring(0, 2)"></div></td>
|
||||
<td style="width: 28%;" ><div class="other-member-age"><span style="margin-right: 20px;">Min Age:</span><input class="underline-input max_age" value="<?php echo isset($other_member_max_age) ? $other_member_max_age : '60'; ?>" style="width: 25%;;" type="number" class="underline-input max_age" name="other_member_max_age" id="other_member_max_age" oninput="this.value = this.value.replace(/\D/g, '').substring(0, 2)"></div></td>
|
||||
<td style="width: 28%;" ><div class="other-member-age"><span style="margin-right: 20px;">Min Age:</span><input class="underline-input min_age" value="<?php echo isset($other_member_min_age) ? $other_member_min_age : '18'; ?>" style="width: 25%;;" type="number" class="underline-input min_age" name="other_member_min_age" id="other_member_min_age" oninput="lowerIsEighteen(this)"></div></td>
|
||||
<td style="width: 28%;" ><div class="other-member-age"><span style="margin-right: 20px;">Max Age:</span><input class="underline-input max_age" value="<?php echo isset($other_member_max_age) ? $other_member_max_age : '60'; ?>" style="width: 25%;;" type="number" class="underline-input max_age" name="other_member_max_age" id="other_member_max_age" ></div></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
@ -1317,4 +1317,14 @@
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
function lowerIsEighteen(params) {
|
||||
|
||||
|
||||
if($(params).val() < 18){
|
||||
$(params).val(18);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
Loading…
Reference in New Issue
Block a user