From 9273639703d4a3543273fcbdd3bb7b0e7e5928ec Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Wed, 2 Jul 2025 10:28:30 +0530 Subject: [PATCH] CHANGE_ADD_INSURER_NAME_HR : RV --- app/Config/Routes.php | 1 + app/Controllers/EmployeeRestController.php | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 98e80cc..c7e7882 100755 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -494,6 +494,7 @@ $routes->group("employeeRest", ["filter" => "authJWT"], function ($routes) { $routes->get("getEmployeeActiveOrInactivePolicy", "EmployeeRestController::getEmployeeActiveOrInactivePolicy"); $routes->get("sendPushNotification", "EmployeeRestController::sendPushNotification"); $routes->post("sendEmail", "EmployeeRestController::send_email"); +$routes->get("getPolicyLevelEmployeeSummaryData", "EmployeeRestController::getPolicyLevelEmployeeSummaryData"); $routes->get("getBackToEnrolledDetails", "EmployeeRestController::getBackToEnrolledDetails"); diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index 240afca..183440b 100755 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -31,6 +31,7 @@ use App\Models\AddImgModel; use App\Models\ClientBranchModel; use App\Models\AuditHistoryModel; use App\Models\SIMappingModel; +use App\Models\InsurerModel; use App\Controllers\Jobs ; @@ -77,6 +78,7 @@ class EmployeeRestController extends AdminController protected $auditHistoryModel; protected $siMappingModel; protected $employeeHelper; + protected $insurerModel; public function __construct() @@ -103,6 +105,7 @@ class EmployeeRestController extends AdminController $this->auditHistoryModel = new AuditHistoryModel(); $this->siMappingModel = new SIMappingModel(); $this->employeeHelper = new EmployeeHelper(); + $this->insurerModel = new InsurerModel(); } @@ -2512,7 +2515,7 @@ class EmployeeRestController extends AdminController - $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 ') + $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, client_policy.policy_no as policy_no, client_policy.insurer_id as insurer_id ') ->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 ) @@ -2524,8 +2527,12 @@ class EmployeeRestController extends AdminController foreach ($ClientPolicyData as $key => $value) { $policyTypeData = $this->policyTypeModel->where('id',$value['policy_type_id'])->get()->getRow(); + $insurerData = $this->insurerModel->where('id',$value['insurer_id'])->get()->getRow(); + $value['type'] = $policyTypeData->policy_type; $value['policy_name'] = $policyTypeData->long_name; + $value['insurer_name'] = $insurerData->name; + $value['insurer_short_name'] = $insurerData->short_name; $employeeDetails = $this->employeePolicyModel->getEmployeePolicy( client_id:$value['client_id'],policy_id: $value['client_policy_id'],status:0,branch_id:$this->request->getGet('client_branch_id')); $enrolledCount = 0; $draftCount = 0;