FIX_POLICY_LIST_HIDE
This commit is contained in:
parent
c15121aa1a
commit
bd8c36a432
@ -3187,25 +3187,26 @@ class EmployeeRestController extends AdminController
|
||||
return $this->respond(['status' => 'failed','code' => 200,'data' => [] ], 200);
|
||||
}
|
||||
|
||||
$openEnrollmentPolicies = $this->employeePolicyModel
|
||||
->select('employee_polices.client_policy_id')
|
||||
->join('employees', 'employee_polices.employee_id = employees.id')
|
||||
->whereIn('employee_polices.client_policy_id', $allowedPolicyIds)
|
||||
->where('md5(employees.client_id)', $client_id)
|
||||
->where('employees.client_branch_id', $client_branch_id)
|
||||
->where('employee_polices.enrollment_open_date <= CURDATE()', null, false)
|
||||
->where('employee_polices.enrollment_close_date >= CURDATE()', null, false)
|
||||
->where('employee_polices.enrollment_open_date IS NOT NULL', null, false)
|
||||
->where('employee_polices.enrollment_close_date IS NOT NULL', null, false)
|
||||
->where('employees.is_active', 1)
|
||||
->where('employee_polices.is_active', 1)
|
||||
->whereIn('employee_polices.status', ['draft', 'enrolled'])
|
||||
->whereIn('employees.emp_status', ['draft', 'enrolled'])
|
||||
->groupBy('employee_polices.client_policy_id')
|
||||
->findAll();
|
||||
|
||||
$policyId = array_column($openEnrollmentPolicies, 'client_policy_id');
|
||||
// $openEnrollmentPolicies = $this->employeePolicyModel
|
||||
// ->select('employee_polices.client_policy_id')
|
||||
// ->join('employees', 'employee_polices.employee_id = employees.id')
|
||||
// ->whereIn('employee_polices.client_policy_id', $allowedPolicyIds)
|
||||
// ->where('md5(employees.client_id)', $client_id)
|
||||
// ->where('employees.client_branch_id', $client_branch_id)
|
||||
// ->where('employee_polices.enrollment_open_date <= CURDATE()', null, false)
|
||||
// ->where('employee_polices.enrollment_close_date >= CURDATE()', null, false)
|
||||
// ->where('employee_polices.enrollment_open_date IS NOT NULL', null, false)
|
||||
// ->where('employee_polices.enrollment_close_date IS NOT NULL', null, false)
|
||||
// ->where('employees.is_active', 1)
|
||||
// ->where('employee_polices.is_active', 1)
|
||||
// ->whereIn('employee_polices.status', ['draft', 'enrolled'])
|
||||
// ->whereIn('employees.emp_status', ['draft', 'enrolled'])
|
||||
// ->groupBy('employee_polices.client_policy_id')
|
||||
// ->findAll();
|
||||
|
||||
// $policyId = array_column($openEnrollmentPolicies, 'client_policy_id');
|
||||
|
||||
$policyId = $allowedPolicyIds;
|
||||
if(empty($policyId)){
|
||||
return $this->respond(['status' => 'failed','code' => 200,'data' => [] ], 200);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user