From 28a57f87deb4075f0f631ecf562c70498b34ca47 Mon Sep 17 00:00:00 2001 From: aadhavan valli Date: Tue, 23 Jul 2024 11:27:23 +0530 Subject: [PATCH 1/2] CHANGE_EMPLOYEE_UPLOAD : AADHAVAN --- app/Controllers/EmployeeRestController.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index 95e93d2e..93a9baaf 100644 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -787,7 +787,7 @@ class EmployeeRestController extends AdminController 'emp_status'=>'draft', 'band'=> $extra['10'][$index], 'basic_pay'=> $extra['11'][$index], - 'unit'=> $extra['12'][$index], + 'unit'=> isset($extra['12'][$index]) ? $extra['12'][$index] : null, 'client_branch_id' => $client_branch_id ]; @@ -2099,9 +2099,8 @@ class EmployeeRestController extends AdminController function getEmployeeActiveOrInactivePolicy() { - if($this->request->getGet('type') == 'Active'){ $policy_status = 1; }else{ $policy_status = 0; } - $ClientPolicyData = $this->clientPolicyModel->select('client_policy.* , policies.name as policy_name , policy_type.policy_type as policy_type') + $ClientPolicyData = $this->clientPolicyModel->select('client_policy.* , policies.name as policy_name , policy_type.policy_type as policy_type') ->join('policies', 'client_policy.policy_id = policies.id', 'left') ->join('policy_type', 'client_policy.policy_type_id = policy_type.id', 'left') ->where('client_policy.client_id', $this->request->getGet('client_id') ) @@ -2237,7 +2236,7 @@ class EmployeeRestController extends AdminController "waiverofpreexistingdiseases" => "Waiver of Pre-existing Diseases", "maternitycoverage" => "Maternity Coverage", "babyday1cover" => "Baby Day 1 Cover", - "9monthwaitingperiodwaived" => "9-month waiting Period –waived", + "9monthwaitingperiodwaived" => "9-month waiting Period �waived", "coverfromthedateofjoining" => "Cover from the date of Joining", "waiverof1,2,3&4thyearexclusions" => "Waiver of 1, 2, 3 & 4th year Exclusions", "waiverof30dayswaitingperiod" => "Waiver of 30 days waiting period", @@ -2363,7 +2362,7 @@ class EmployeeRestController extends AdminController return $this->respond(['status' => 'failed', 'code' => 500, 'message' => 'Failed to update employee data'], 500); } } else { - return $this->respond(['status' => 'failed', 'code' => 400, 'message' => 'New Firebase Token is the same as the current one'], 400); + return $this->respond(['status' => 'failed', 'code' => 400, 'message' => 'New Firebase Token is the same as the current one'], 200); } } else { return $this->respond(['status' => 'failed', 'code' => 400, 'message' => 'Firebase Token is required'], 400); From 6fd91f4ad6fcd20574d3cb4a100289aa43b9a1ee Mon Sep 17 00:00:00 2001 From: aadhavan valli Date: Tue, 23 Jul 2024 11:28:52 +0530 Subject: [PATCH 2/2] CHANGE_EMPLOYEE_UPLOAD_ROUTE : AADHAVAN --- app/Config/Routes.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 14f1ef6a..51f9d084 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -286,6 +286,7 @@ $routes->group("/api", ["filter" => "authJWT"], function ($routes) { +$routes->get("getEmployeeActiveOrInactivePolicy", "EmployeeRestController::getEmployeeActiveOrInactivePolicy"); $routes->get("getChatResponse", "ChatBotController::getChatResponse"); $routes->group("employeeRest", ["filter" => "authJWT"], function ($routes) {