CHNAGE_in client feedback
This commit is contained in:
parent
bb033fa8be
commit
0186713b91
@ -393,6 +393,7 @@ $routes->post("/employeeRest/verifyEmployeeNumber", "RestAuthenticationControlle
|
|||||||
$routes->post("/employeeRest/getVerifiedUserData", "RestAuthenticationController::getVerifiedUserData");
|
$routes->post("/employeeRest/getVerifiedUserData", "RestAuthenticationController::getVerifiedUserData");
|
||||||
$routes->post("/employeeRest/verifyMpin", "RestAuthenticationController::verifyMpin");
|
$routes->post("/employeeRest/verifyMpin", "RestAuthenticationController::verifyMpin");
|
||||||
$routes->post("/employeeRest/checkMpin", "RestAuthenticationController::checkMpin");
|
$routes->post("/employeeRest/checkMpin", "RestAuthenticationController::checkMpin");
|
||||||
|
$routes->post("/employeeRest/verifyEmployeeEmailId", "RestAuthenticationController::verifyEmployeeWithEmailId");
|
||||||
|
|
||||||
//HR login api's
|
//HR login api's
|
||||||
$routes->post("/employeeRest/verifyHrWithMobileNumber", "RestAuthenticationController::verifyHrWithMobileNumber");
|
$routes->post("/employeeRest/verifyHrWithMobileNumber", "RestAuthenticationController::verifyHrWithMobileNumber");
|
||||||
|
|||||||
@ -1050,9 +1050,11 @@ class EmployeeRestController extends AdminController
|
|||||||
|
|
||||||
|
|
||||||
// Construct value for policy type GPA
|
// Construct value for policy type GPA
|
||||||
if($getSlabAndGridData['grid_master']['policy_type'] == "GPA" && $this->request->getGet('policy') == 'GPA'){
|
// $getSlabAndGridData['grid_master']['policy_type'] == "GPA"
|
||||||
|
if($array->policy_type_id == 1 && $this->request->getGet('policy') == 'GPA')
|
||||||
|
{
|
||||||
|
|
||||||
// Filter employee data where the family_floater_key is 'self'
|
// Filter employee data where the family_floater_key is 'self'
|
||||||
$selfData = array_filter($empData, fn($arr) => trim(strtolower($arr['family_floater_key'])) === 'self');
|
$selfData = array_filter($empData, fn($arr) => trim(strtolower($arr['family_floater_key'])) === 'self');
|
||||||
$employee_policy = $this->employeePolicyModel->where('employee_id',$selfData[0]['id'])->where('client_policy_id',$array->ClientPolicyId)->where('is_active', 1 )->get()->getRow();
|
$employee_policy = $this->employeePolicyModel->where('employee_id',$selfData[0]['id'])->where('client_policy_id',$array->ClientPolicyId)->where('is_active', 1 )->get()->getRow();
|
||||||
|
|
||||||
@ -1087,7 +1089,9 @@ class EmployeeRestController extends AdminController
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Construct value for policy type GMC
|
// Construct value for policy type GMC
|
||||||
}else if($getSlabAndGridData['grid_master']['policy_type'] == "GMC" && $this->request->getGet('policy') == 'GMC' ){
|
// $getSlabAndGridData['grid_master']['policy_type'] == "GMC"
|
||||||
|
}else if($array->policy_type_id == 2 && $this->request->getGet('policy') == 'GMC' )
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -1461,6 +1465,9 @@ class EmployeeRestController extends AdminController
|
|||||||
foreach ($array as $key => $value) {
|
foreach ($array as $key => $value) {
|
||||||
if ($value > 0 && $key != 'elders_count') {
|
if ($value > 0 && $key != 'elders_count') {
|
||||||
if ($value != 0 && $key === 'childrens') {
|
if ($value != 0 && $key === 'childrens') {
|
||||||
|
|
||||||
|
if($value > 2){ $value = 2; }
|
||||||
|
|
||||||
for ($i = 1; $i <= $value; $i++) {
|
for ($i = 1; $i <= $value; $i++) {
|
||||||
$result[] = "child" . $i;
|
$result[] = "child" . $i;
|
||||||
}
|
}
|
||||||
@ -1617,6 +1624,7 @@ class EmployeeRestController extends AdminController
|
|||||||
$responce['OpenForEnrollment'] = $array['open_for_enrollment'];
|
$responce['OpenForEnrollment'] = $array['open_for_enrollment'];
|
||||||
$responce['policy_terms'] = $decodedArray;
|
$responce['policy_terms'] = $decodedArray;
|
||||||
$responce['policy_type_id'] = $array['policy_type_id'];
|
$responce['policy_type_id'] = $array['policy_type_id'];
|
||||||
|
$responce['is_member_modify_allowed'] = $array['is_member_modify_allowed'];
|
||||||
$responce['disclaimer'] = $array['disclaimer'];
|
$responce['disclaimer'] = $array['disclaimer'];
|
||||||
|
|
||||||
$tpaArray = $this->employeeModel->select('employees.name as name , employee_polices.tpa_id as tpa_id , employee_polices.rand_string as rand_string')
|
$tpaArray = $this->employeeModel->select('employees.name as name , employee_polices.tpa_id as tpa_id , employee_polices.rand_string as rand_string')
|
||||||
@ -1909,6 +1917,7 @@ class EmployeeRestController extends AdminController
|
|||||||
$this->employeeModel->where('emp_code', $emp_code )
|
$this->employeeModel->where('emp_code', $emp_code )
|
||||||
->where('client_id', $client_id )
|
->where('client_id', $client_id )
|
||||||
->where('is_active', 1 )
|
->where('is_active', 1 )
|
||||||
|
->where('emp_status', 'draft' )
|
||||||
->set(array('emp_status'=>'enrolled'))
|
->set(array('emp_status'=>'enrolled'))
|
||||||
->update();
|
->update();
|
||||||
|
|
||||||
@ -1927,6 +1936,7 @@ class EmployeeRestController extends AdminController
|
|||||||
$this->employeePolicyModel->where('client_policy_id', $value )
|
$this->employeePolicyModel->where('client_policy_id', $value )
|
||||||
->where('is_active', 1 )
|
->where('is_active', 1 )
|
||||||
->where('employee_id', $empDataValue['id'] )
|
->where('employee_id', $empDataValue['id'] )
|
||||||
|
->where('status', 'draft' )
|
||||||
->set(array('status'=>'enrolled'))
|
->set(array('status'=>'enrolled'))
|
||||||
->update();
|
->update();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -91,18 +91,58 @@ class RestAuthenticationController extends AdminController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function verifyEmployeeWithEmailId()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$email = $this->request->getJSON()->email;
|
||||||
|
|
||||||
|
|
||||||
|
$employeeData = $this->employeeModel->where('email', $email)
|
||||||
|
->where('relationship', 'self')
|
||||||
|
->where('emp_status !=', 'truncated')
|
||||||
|
->where('is_active', 1)
|
||||||
|
->first();
|
||||||
|
|
||||||
|
if ($employeeData) {
|
||||||
|
|
||||||
|
$result = ['user_verification' => true ,'message' => "Verified Successfully"];
|
||||||
|
return $this->respond(['status' => 'success','code' => 200,'data' => $result],200);
|
||||||
|
} else {
|
||||||
|
$result = ['user_verification' => false , 'message' => "User not found"];
|
||||||
|
return $this->respond(['status' => 'failed','code' => 404,'data' => $result],200);
|
||||||
|
|
||||||
|
}
|
||||||
|
} catch (\Throwable $th) {
|
||||||
|
return $this->respond(['status' => 'failed','code' => 500,'data' => $th],500);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getVerifiedUserData()
|
public function getVerifiedUserData()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$mobile_number = $this->request->getJSON()->mobile_number;
|
|
||||||
$otp_verification = $this->request->getJSON()->otp_verification;
|
$otp_verification = $this->request->getJSON()->otp_verification;
|
||||||
|
|
||||||
if (isset($this->request->getJSON()->login_by_hr))
|
if (isset($this->request->getJSON()->login_by_hr))
|
||||||
{
|
{
|
||||||
$employeeData = $this->employeeModel->where('id', $this->request->getJSON()->employee_id)->where('relationship', 'self')->first();
|
$employeeData = $this->employeeModel->where('id', $this->request->getJSON()->employee_id)->where('relationship', 'self')->first();
|
||||||
}else{
|
}else{
|
||||||
$employeeData = $this->employeeModel->where('mobile', $mobile_number)->where('relationship', 'self')->first();
|
$mobile_number = $this->request->getJSON()->mobile_number;
|
||||||
|
$email_id = $this->request->getJSON()->email_id;
|
||||||
|
|
||||||
|
|
||||||
|
$employeeData = $this->employeeModel->where('relationship', 'self');
|
||||||
|
|
||||||
|
if (isset($mobile_number)) {
|
||||||
|
$employeeData = $employeeData->where('mobile', $mobile_number);
|
||||||
|
} else {
|
||||||
|
$employeeData = $employeeData->where('email', $email_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
$employeeData = $employeeData->first();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -149,7 +149,7 @@ class EmployeeModel extends Model
|
|||||||
{
|
{
|
||||||
|
|
||||||
return $this->db->table('employee_polices')
|
return $this->db->table('employee_polices')
|
||||||
->select(' policy_type.long_name as Policy_Name , client_policy.policy_terms as Policy_Terms, client_policy.client_id as ClientId, client_policy.policy_id as PolicyId,client_policy.id as ClientPolicyId, client_policy.open_for_enrollment as OpenForEnrollment , employee_polices.tpa_id as tpa_id , employee_polices.rand_string as rand_string') // Select all columns from both tables
|
->select(' policy_type.long_name as Policy_Name , client_policy.policy_terms as Policy_Terms, client_policy.client_id as ClientId, client_policy.policy_id as PolicyId,client_policy.id as ClientPolicyId, client_policy.open_for_enrollment as OpenForEnrollment, client_policy.is_member_modify_allowed, client_policy.disclaimer,client_policy.policy_type_id , employee_polices.tpa_id as tpa_id , employee_polices.rand_string as rand_string') // Select all columns from both tables
|
||||||
->join('client_policy', 'client_policy.id = employee_polices.client_policy_id')
|
->join('client_policy', 'client_policy.id = employee_polices.client_policy_id')
|
||||||
->join('policy_type', 'policy_type.id = client_policy.policy_type_id')
|
->join('policy_type', 'policy_type.id = client_policy.policy_type_id')
|
||||||
->where('client_policy.policy_status', 1)
|
->where('client_policy.policy_status', 1)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user