FIX_WELLNESS_ALLOWED_FOR_ANY_POLICY
This commit is contained in:
parent
abfe890a1a
commit
99e2b13153
@ -3867,6 +3867,7 @@ class EmployeeRestController extends AdminController
|
||||
{
|
||||
|
||||
$emp_id = $this->request->getGet('emp_id');
|
||||
|
||||
$db = \Config\Database::connect();
|
||||
$data = $db->table('employees e')
|
||||
->select('pt.policy_type,
|
||||
@ -3883,11 +3884,12 @@ class EmployeeRestController extends AdminController
|
||||
->get()
|
||||
->getResultArray();
|
||||
|
||||
|
||||
// print_r($db->getLastQuery());die();
|
||||
// print_r($data);die();
|
||||
// Loop through $data and check for policy_type = GMC
|
||||
$userParams = [];
|
||||
foreach ($data as $row) {
|
||||
if ($row['policy_type'] === 'GMC') {
|
||||
// if ($row['policy_type'] === 'GMC') {
|
||||
$userParams['name'] = $row['name'];
|
||||
$userParams['email'] = $row['email'];
|
||||
$userParams['phone'] = $row['phone'];
|
||||
@ -3906,14 +3908,14 @@ class EmployeeRestController extends AdminController
|
||||
|
||||
$userParams['moduleName'] = 'home';
|
||||
break; // stop after first GMC match
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
if (empty($userParams)) {
|
||||
return $this->respond(['status' => 'failed','message' => 'Coming soon........!'], 200);
|
||||
}
|
||||
|
||||
|
||||
// echo 'coming';die();
|
||||
// Derive 32-byte key from SHA256
|
||||
$derivedKey = hash('sha256', env('VISIT_SECRET_KEY'), true);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user