MERGE_UAT_LIVE_ISSUES2

This commit is contained in:
Ubuntu 2026-05-11 14:44:27 +05:30
commit 8844a13164
4 changed files with 18 additions and 5 deletions

View File

@ -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');
}
}

View File

@ -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({

View File

@ -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);
});