FIX_HR_SMPL_DOWNLOAD_LINK
This commit is contained in:
parent
61a2a67e0b
commit
d38e253fbc
@ -462,6 +462,8 @@ $routes->post("employeeRest/changePassword", "RestAuthenticationController::chan
|
|||||||
$routes->post("employeeRest/verifyPassword", "RestAuthenticationController::verifyPassword");
|
$routes->post("employeeRest/verifyPassword", "RestAuthenticationController::verifyPassword");
|
||||||
$routes->post("employeeRest/verifyOtp", "RestAuthenticationController::verifyOtp");
|
$routes->post("employeeRest/verifyOtp", "RestAuthenticationController::verifyOtp");
|
||||||
$routes->post("employeeRest/checkPassword", "RestAuthenticationController::checkPassword");
|
$routes->post("employeeRest/checkPassword", "RestAuthenticationController::checkPassword");
|
||||||
|
$routes->get("employeeRest/downloadSampleExcel/(:any)", "EmployeeController::downloadSampleExcelFile/$1");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// $routes->post("employeeRest/createOrUpdateEmployeePolicySiAmount", "EmployeeRestController::createOrUpdateEmployeePolicySiAmount");
|
// $routes->post("employeeRest/createOrUpdateEmployeePolicySiAmount", "EmployeeRestController::createOrUpdateEmployeePolicySiAmount");
|
||||||
|
|||||||
@ -801,8 +801,16 @@ class EmployeeRestController extends AdminController
|
|||||||
$result = $empServiceController->excelFileFormatValidation(['file_id' => $file_id]);
|
$result = $empServiceController->excelFileFormatValidation(['file_id' => $file_id]);
|
||||||
if(isset($result['error_summary']) && count($result['error_summary']))
|
if(isset($result['error_summary']) && count($result['error_summary']))
|
||||||
{
|
{
|
||||||
$result = $empServiceController->getExcelErrorData($file_id);
|
if(isset($result['error_type'])){
|
||||||
return $this->respond(['status' => 'failed', 'code' => 404, 'message' => "file upload failed with errors",'data' => $result], 200);
|
$result = $empServiceController->getExcelErrorData($file_id);
|
||||||
|
return $this->respond(['status' => 'failed', 'code' => 404, 'message' => "file upload failed with errors",'data' => $result], 200);
|
||||||
|
}else {
|
||||||
|
$message = "file upload failed with errors";
|
||||||
|
if(isset($result['error_data'])){
|
||||||
|
$message = $result['error_data'];
|
||||||
|
}
|
||||||
|
return $this->respond(['status' => 'failed', 'code' => 404, 'message' => $message,'data' => $result], 200);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1094,9 +1102,19 @@ class EmployeeRestController extends AdminController
|
|||||||
}else{
|
}else{
|
||||||
return $this->respond(['status' => 'failed', 'code' => 404, 'message' => "Client id and Client Policy id is Not Match!" ], 404);
|
return $this->respond(['status' => 'failed', 'code' => 404, 'message' => "Client id and Client Policy id is Not Match!" ], 404);
|
||||||
}
|
}
|
||||||
} catch (\Exception $e) {
|
} catch (\Throwable $th) {
|
||||||
$this->myLogger->logme("error", ($e->getMessage().' --- '.$e->getLine() . '----' . $e->getTraceAsString()));
|
$this->myLogger->logme("error", ($th->getMessage().' --- '.$th->getLine() . '----' . $th->getTraceAsString()));
|
||||||
return $this->respond(['status' => 'failed','code' => 500,'data' => $e->getMessage()], 500);
|
$errorData = [
|
||||||
|
'message' => $th->getMessage(),
|
||||||
|
'file' => $th->getFile(),
|
||||||
|
'line' => $th->getLine(),
|
||||||
|
'code' => $th->getCode(),
|
||||||
|
'trace' => $th->getTraceAsString(),
|
||||||
|
'trace_array' => $th->getTrace(), // full array version (optional)
|
||||||
|
'function' => $th->getTrace()[0]['function'] ?? null,
|
||||||
|
'class' => $th->getTrace()[0]['class'] ?? null,
|
||||||
|
];
|
||||||
|
return $this->respond(['status' => 'failed','code' => 500,'data' => $th->getMessage(), 'error_data' => $errorData], 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user