From 7ccb23434d74e2f0190c36278611651817d54161 Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Thu, 10 Jul 2025 14:44:59 +0530 Subject: [PATCH] CHANGE_GET_HR_DATA : RV --- app/Controllers/EmployeeRestController.php | 1 + app/Controllers/RestAuthenticationController.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index 7a9a705..c3e165c 100755 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -3364,6 +3364,7 @@ class EmployeeRestController extends AdminController ->whereIn('employee_polices.status', ['draft', 'enrolled']) ->where('cp.enrolment_visibility', 1) ->where('cp.open_for_enrollment', 1) + ->where('cp.policy_status', 1) ->whereIn('cp.policy_type_id', [1, 2, 6, 7]) ->where('employees.mobile', $mobile_no) ->orderBy('employees.created_at', 'desc') diff --git a/app/Controllers/RestAuthenticationController.php b/app/Controllers/RestAuthenticationController.php index 7bc38d9..09566e9 100755 --- a/app/Controllers/RestAuthenticationController.php +++ b/app/Controllers/RestAuthenticationController.php @@ -512,7 +512,8 @@ class RestAuthenticationController extends AdminController $HRAccessRes = $this->callThirdPartyGETAPI($queryParams,'getHRAccessData'); $HRAccessData = json_decode($HRAccessRes,true); if(isset($HRAccessData['data']['allowed_modules'])){ $hrData['0']['allowed_modules'] = json_decode($HRAccessData['data']['allowed_modules'],true)['pre']; }else{ $hrData['0']['allowed_modules'] = []; } - + + $hrData['0']['token_type'] = 'pre'; $result = JWTToken::encode($hrData['0']); // Call the third-party API function