From 9bf933511c1df2749b45b30dddf4de9221c8d0ac Mon Sep 17 00:00:00 2001 From: Gowtham M Date: Mon, 30 Jun 2025 11:29:43 +0530 Subject: [PATCH] CHANGE_ hr access data empty handled : GWM --- app/Controllers/EmployeeRestController.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index be71528..240afca 100755 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -2506,6 +2506,11 @@ class EmployeeRestController extends AdminController $policyId = []; } + if(count($policyId) == 0){ + return $this->respond(['status' => 'failed','code' => (count($policyId) ? 200 : 404),'data' => [] ], 200); + } + + $ClientPolicyData = $this->clientPolicyModel->select('client_policy.id as client_policy_id , client_policy.client_id as client_id, client_policy.policy_type_id as policy_type_id, client_policy.is_addon as is_addon , client_policy.open_for_enrollment as OpenForEnrollment , client_policy.inception_type as inception_type ') ->where('client_policy.client_id', $this->request->getGet('client_id') )