diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index 6ef57201..b49b37d6 100644 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -960,7 +960,7 @@ public function getEmployeePolicy() // Construct value for policy type GPA - if($getSlabAndGridData['grid_master']['policy_type'] == "GPA"){ + if($getSlabAndGridData['grid_master']['policy_type'] == "GPA" && $this->request->getGet('policy') == 'GPA'){ // Filter employee data where the family_floater_key is 'self' $selfData = array_filter($empData, fn($arr) => trim(strtolower($arr['family_floater_key'])) === 'self'); @@ -985,7 +985,7 @@ public function getEmployeePolicy() } // Construct value for policy type GMC - }else if($getSlabAndGridData['grid_master']['policy_type'] == "GMC"){ + }else if($getSlabAndGridData['grid_master']['policy_type'] == "GMC" && $this->request->getGet('policy') == 'GMC' ){ @@ -1035,7 +1035,7 @@ public function getEmployeePolicy() } } } - // dd($data); + // Remove Unwanted floter key from floters array based on either-parents-pil term value