CHANGE_GET_HR_DATA : RV

This commit is contained in:
VENKATESHWARAN 2025-07-10 14:44:59 +05:30
parent d73cd89f8f
commit 7ccb23434d
2 changed files with 3 additions and 1 deletions

View File

@ -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')

View File

@ -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