From 117247223649c2dfaa0b36bb503ad10861f97a79 Mon Sep 17 00:00:00 2001 From: Venkatesh Date: Mon, 11 May 2026 14:28:30 +0530 Subject: [PATCH 1/2] FIX_CORRECTION_SAMPLE_FILE_DOWNLOAD --- app/Controllers/EmployeeController.php | 3 ++- app/Views/file_list.php | 12 ++++++++---- ...sample_correction .xls => sample_correction.xls} | Bin 3 files changed, 10 insertions(+), 5 deletions(-) rename public/sample_excel/{sample_correction .xls => sample_correction.xls} (100%) diff --git a/app/Controllers/EmployeeController.php b/app/Controllers/EmployeeController.php index 25072e55..dda0402e 100755 --- a/app/Controllers/EmployeeController.php +++ b/app/Controllers/EmployeeController.php @@ -692,7 +692,8 @@ class EmployeeController extends AdminController return $this->response->download($filePath, null, $mimeType); } else { // File not found, show an error message or redirect - echo view('errors/html/production'); + echo view('errors/404.php', ['message' => 'Sample file not found']); + // return redirect()->back()->with('error', 'Sample file not found'); } } diff --git a/app/Views/file_list.php b/app/Views/file_list.php index 8292a6ae..dc389326 100755 --- a/app/Views/file_list.php +++ b/app/Views/file_list.php @@ -440,6 +440,9 @@ $fl_col_width_px = nhance_dt_column_widths_px($fl_header_labels, $fl_col_max_len title: "Deleted!", icon: "success" }); + + window.location.reload(true); + } else if (response.code === 404 && response.dataStatus === false) { console.error('No data found', response); handleNoDataFound(response, fileId); @@ -456,10 +459,8 @@ $fl_col_width_px = nhance_dt_column_widths_px($fl_header_labels, $fl_col_max_len console.error(xhr.responseText); console.error(status, error); - setTimeout(function() { - $('.loader').fadeOut(); - $('.loader-mask').delay(350).fadeOut('slow'); - }, 1000); + $('.loader').fadeOut(); + $('.loader-mask').delay(350).fadeOut('slow'); console.error('Error fetching data from API:', error); toastr.error('Something went wrong! Try later', 'Error'); @@ -502,6 +503,9 @@ $fl_col_width_px = nhance_dt_column_widths_px($fl_header_labels, $fl_col_max_len title: "Deleted!", icon: "success" }); + + window.location.reload(true); + } else if (response.code === 404 && response.dataStatus === false) { console.error('No data found', response); Swal.fire({ diff --git a/public/sample_excel/sample_correction .xls b/public/sample_excel/sample_correction.xls similarity index 100% rename from public/sample_excel/sample_correction .xls rename to public/sample_excel/sample_correction.xls From cb0cc204486ef27bc630ed50f38067fed39a9854 Mon Sep 17 00:00:00 2001 From: Venkatesh Date: Mon, 11 May 2026 14:41:07 +0530 Subject: [PATCH 2/2] FIX_THE_RELOAD_ISSUE --- app/Views/insurer_or_tpa_data.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/Views/insurer_or_tpa_data.php b/app/Views/insurer_or_tpa_data.php index 0d2daae7..988f5d32 100755 --- a/app/Views/insurer_or_tpa_data.php +++ b/app/Views/insurer_or_tpa_data.php @@ -1428,10 +1428,18 @@ toastr.error(response.message || 'Unable to fetch data', 'Error'); } + setTimeout(function() { + window.location.reload(); + }, 500); + }, function(xhr, status, error) { console.error('Error fetching data:', error); console.error(xhr.responseText); toastr.error('An error occurred while pushing.', 'Error'); + + setTimeout(function() { + window.location.reload(); + }, 500); });