From 1b0a1c2099a5ef2ae0adb81ed3fc37d2957bba01 Mon Sep 17 00:00:00 2001 From: Gowtham M Date: Fri, 27 Jun 2025 14:56:52 +0530 Subject: [PATCH 01/25] CHANGES_ HR api Hr access control change : GWM --- app/Controllers/EmployeeRestController.php | 17 +++++++++++++ .../RestAuthenticationController.php | 25 ++++++++++++++++++- 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index 3f03147..be71528 100755 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -2490,12 +2490,29 @@ class EmployeeRestController extends AdminController public function getPolicyLevelEmployeeSummaryData() { + $hr_id = $this->request->getGet('hr_id'); + $restAuthController = new RestAuthenticationController; + //call and get allowed policy data from post enrollment + $queryParams = [ + 'hr_id' => $hr_id, + 'request_for' => 'pre_enrollment' + ]; + $HRAccessRes = $restAuthController->callThirdPartyGETAPI($queryParams,'getHRAccessData'); + $HRAccessData = json_decode($HRAccessRes,true); + if(isset($HRAccessData['data']['allowed_pre_policies'])) + { + $policyId = json_decode($HRAccessData['data']['allowed_pre_policies'],true); + }else{ + $policyId = []; + } + $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') ) ->where('client_policy.client_branch_id', $this->request->getGet('client_branch_id') ) ->where('client_policy.is_active', 1 ) ->where('client_policy.policy_status', 1) + ->whereIn('client_policy.id', $policyId) ->findAll(); $result = []; // dd( $ClientPolicyData); diff --git a/app/Controllers/RestAuthenticationController.php b/app/Controllers/RestAuthenticationController.php index 2c57f1a..6ebd109 100755 --- a/app/Controllers/RestAuthenticationController.php +++ b/app/Controllers/RestAuthenticationController.php @@ -73,6 +73,20 @@ class RestAuthenticationController extends AdminController return $response->getBody(); } + public function callThirdPartyGETAPI($queryParams, $endPoint) + { + $client = \Config\Services::curlrequest(); + $url = env('POST_ENROLLMENT_BASEURL') . $endPoint; + + $response = $client->get($url, [ + 'query' => $queryParams, // pass as query parameters + 'http_errors' => false // prevent exception on non-200 status + ]); + + return $response->getBody(); + } + + // employee auth api's start @@ -418,8 +432,17 @@ class RestAuthenticationController extends AdminController ->find(); } + //call and get allowed module data from post enrollment + $queryParams = [ + 'hr_id' => $hrData['0']['id'], + 'request_for' => 'pre_enrollment' + ]; + $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'] = []; } + $result = JWTToken::encode($hrData['0']); - + // Call the third-party API function $apiResponse = $this->callThirdPartyAPI($this->request->getJSON(),'getVerifiedHrData'); return $this->respond(['status' => 'success','code' => 200,'data' => $result , 'post_enrollment'=> json_decode($apiResponse, true)],200); From 9bf933511c1df2749b45b30dddf4de9221c8d0ac Mon Sep 17 00:00:00 2001 From: Gowtham M Date: Mon, 30 Jun 2025 11:29:43 +0530 Subject: [PATCH 02/25] 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') ) From 35af3ad88fddb92c9ec3d21fd06f12d94165e947 Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Mon, 30 Jun 2025 12:52:48 +0530 Subject: [PATCH 03/25] CHANGE_LOGO : RV --- app/Views/layout/header.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/Views/layout/header.php b/app/Views/layout/header.php index eb9311d..0a07011 100755 --- a/app/Views/layout/header.php +++ b/app/Views/layout/header.php @@ -91,6 +91,14 @@ min-height: 0; } + body[data-sidebar-size=condensed] .navbar-custom { + left: 155px !important; + } + + body[data-sidebar-size=condensed] .logo-box { + width: 155px !important; + } + .navbar-custom { top: -10px !important; height: 61px !important; @@ -536,7 +544,7 @@