FIX_EXCEL_ERROR_FILE_ID_ERROR : RV

This commit is contained in:
VENKATESHWARAN 2024-04-26 13:36:27 +05:30
parent 6f319144f6
commit e17fd43594

View File

@ -131,8 +131,8 @@ class EmployeeController extends AdminController
// print_r($this->request->getPost('policies')); // print_r($this->request->getPost('policies'));
// print_r($this->request->getPost('upload-action-type')); // print_r($this->request->getPost('upload-action-type'));
// die(); // die();
$empServiceController = new EmployeeServiceController(); // $empServiceController = new EmployeeServiceController();
$res = $empServiceController->excelFileFormatValidation(['file_id' => '42']); // $res = $empServiceController->excelFileFormatValidation(['file_id' => '42']);
// dd($res); // dd($res);
// $empServiceController = new EmployeeServiceController(); // $empServiceController = new EmployeeServiceController();
@ -249,13 +249,13 @@ class EmployeeController extends AdminController
{ {
$file_id = $this->request->uri->getSegment(3); $file_id = $this->request->uri->getSegment(3);
$empServiceController = new EmployeeServiceController(); $empServiceController = new EmployeeServiceController();
$result['file_id'] = $file_id;
// Render views and capture output // Render views and capture output
$result = $empServiceController->getExcelErrorData($file_id); $result = $empServiceController->getExcelErrorData($file_id);
if ($result != 0) { if ($result != 0) {
$result['file_id'] = $file_id;
echo view('excel_errors', $result); echo view('excel_errors', $result);
} else if ($result == 0) { } else if ($result == 0) {
@ -811,7 +811,7 @@ class EmployeeController extends AdminController
// Create a new filename for the modified Excel file // Create a new filename for the modified Excel file
$newFileName = 'modified_' . $fileName; $newFileName = 'error_with_highlight_' . $fileName;
// Save the modified Excel file to a new location // Save the modified Excel file to a new location
$newFilePath = WRITEPATH . '/uploads/excel/' . $newFileName; $newFilePath = WRITEPATH . '/uploads/excel/' . $newFileName;