FIX_ISSUE
This commit is contained in:
parent
69f9e24f3e
commit
44ec953af4
@ -846,14 +846,16 @@ class EmployeeRestController extends AdminController
|
||||
$responce = $employeeController->employeesUplodWithEvents($post_data);
|
||||
// print_r($responce); die;
|
||||
|
||||
if(!$responce['status']){
|
||||
$file_data = $this->getDataFromFilesTable(['file_id' => $responce['file_id']]);
|
||||
$responce['data'] = $file_data;
|
||||
return $this->respond($responce, 200);
|
||||
}else{
|
||||
$responce['data'] = [];
|
||||
return $this->respond($responce, 200);
|
||||
}
|
||||
return $responce;
|
||||
|
||||
// if(!$responce['status']){
|
||||
// $file_data = $this->getDataFromFilesTable(['file_id' => $responce['file_id']]);
|
||||
// $responce['data'] = $file_data;
|
||||
// return $this->respond($responce, 200);
|
||||
// }else{
|
||||
// $responce['data'] = [];
|
||||
// return $this->respond($responce, 200);
|
||||
// }
|
||||
|
||||
|
||||
|
||||
@ -1273,7 +1275,11 @@ class EmployeeRestController extends AdminController
|
||||
}
|
||||
|
||||
if (isset($search_data['client_id']) && !empty($search_data['client_id'])) {
|
||||
$builder->where("files.client_id", $search_data['client_id']);
|
||||
if (is_string($search_data['client_id']) && preg_match('/^[a-f0-9]{32}$/i', $search_data['client_id'])) {
|
||||
$builder->where("MD5(files.client_id)", $search_data['client_id']);
|
||||
} else {
|
||||
$builder->where("files.client_id", $search_data['client_id']);
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($search_data['file_id']) && !empty($search_data['file_id'])) {
|
||||
@ -4263,6 +4269,28 @@ class EmployeeRestController extends AdminController
|
||||
public function hrFileList()
|
||||
{
|
||||
try {
|
||||
|
||||
$request = service('request');
|
||||
$search_data = $request->getGetPost() ?? [];
|
||||
|
||||
// Fetch results
|
||||
$data = $this->getDataFromFilesTable($search_data);
|
||||
|
||||
return $this->respond([
|
||||
'status' => true,
|
||||
'message' => 'File list fetched successfully',
|
||||
'data' => $data
|
||||
]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->failServerError($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public function hrFileListOld()
|
||||
{
|
||||
try {
|
||||
|
||||
$request = service('request');
|
||||
$builder = $this->hrFileUploadModel;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user