FIX_ISSUE

This commit is contained in:
VENKATESHWARAN 2026-02-04 17:02:52 +05:30
parent 1e4e0c6087
commit 9a4b46d7e0

View File

@ -5494,14 +5494,13 @@ class EmployeeRestController extends AdminController
$pt_files_data = $ptFilesModel->where('is_active', 1)->where('id', $pt_file_id)->first();
if(empty($pt_files_data)){
$data['message'] = 'The Physical File Not Found in server';
return view('errors/404', $data); }
return $this->respond(['status' => false, 'code' => 404, 'message' => 'The Physical File Not Found in server'], 200);
}
$filePath = $uploadFilePath . '/' . $pt_files_data['file_name'];
if (!file_exists($filePath)) {
$data['message'] = 'The Physical File Not Found in server';
return view('errors/404', $data);
return $this->respond(['status' => false, 'code' => 404, 'message' => 'The Physical File Not Found in server'], 200);
}
// Force file download
@ -5517,6 +5516,16 @@ class EmployeeRestController extends AdminController
return $this->respond(['status' => false, 'code' => 404, 'message' => 'client_policy_id or employee_policy_ids is required'], 200);
}
if(empty($received_data['hr_id'])){
return $this->respond(['status' => false, 'code' => 404, 'message' => 'hr_id is required'], 200);
}
$employee_data = $this->employeePolicyModel->getEmployeeDataWithPolicyUsingClientPolicyIdOrEmployeePolicyIds($received_data);
if(empty($employee_data)){
return $this->respond(['status' => false, 'code' => 404, 'message' => 'No employee data found for the policy'], 200);
}
return $this->respond(['status' => true, 'code' => 200, 'message' => 'Bulk E-card download process started. Link share your mail'], 200);