CHANGES-in-employeeUpload-api-fixed-error:GWM

This commit is contained in:
bitbucket 2024-04-11 10:42:05 +05:30
parent 2d7845abef
commit 4fa06aa828
2 changed files with 5 additions and 6 deletions

View File

@ -236,11 +236,9 @@ $routes->group("/api", ["filter" => "authJWT"], function($routes){
$routes->post("/editEmployeeProfile", "EmployeeRestController::editEmployeeProfile");
$routes->group("employeeRest", ["filter" => "authJWT"], function($routes){
$routes->get("/getEmployeeProfile", "EmployeeRestController::getEmployeeProfile/$1");
$routes->get("getEmployeeProfile", "EmployeeRestController::getEmployeeProfile");
$routes->post("employeeUpload", "EmployeeRestController::employeeUpload");
$routes->get("relationshipList", "EmployeeRestController::relationshipList");
$routes->get("getEmployeeAndDependence", "EmployeeRestController::getEmployeeAndDependence");

View File

@ -570,7 +570,7 @@ class EmployeeRestController extends AdminController
$jwt = $this->request->getHeader('Authorization');
$jwtParts = explode(' ', $jwt);
$token = $jwtParts[1];
$token = $jwtParts[2];
$decodedPayload = json_decode(base64_decode(explode('.', $token)[1]), true);
@ -585,8 +585,9 @@ class EmployeeRestController extends AdminController
$policy = $this->policesModel->where('id', $client_policy['policy_id'])->first();
$policy_permium_1 = $this->policyPremium1Model->where(['client_id' => $client_id , 'client_policy_id' => $policy_id,'is_active' =>1])-> first();
$policy_permium_2 = $this->policyPremium2Model->where(['client_id' => $client_id , 'client_policy_id' => $policy_id,'is_active' =>1])-> first();
$sum_insured_amount_for_check_employee_1 = $policy_permium_1['si'];
$sum_insured_amount_for_check_employee_2 = $policy_permium_2['si'];
$sum_insured_amount_for_check_employee_1 = isset($policy_permium_1['si']) ? $policy_permium_1['si'] : null;
$sum_insured_amount_for_check_employee_2 = isset($policy_permium_2['si']) ? $policy_permium_2['si'] : null;
$is_moved = $file->move(WRITEPATH . 'uploads/import_excel');
$filename = $file->getName();