removed unwanted code
This commit is contained in:
parent
7e1bafe2fd
commit
74191af173
@ -2922,7 +2922,6 @@ const handleView = async (id) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
console.log('API Payload for creation:', apiPayload);
|
|
||||||
const apiResponse = await createEstablishment(apiPayload);
|
const apiResponse = await createEstablishment(apiPayload);
|
||||||
const successMessage = apiResponse?.message || 'Establishment added successfully.';
|
const successMessage = apiResponse?.message || 'Establishment added successfully.';
|
||||||
showToast('success', successMessage);
|
showToast('success', successMessage);
|
||||||
|
|||||||
@ -1066,10 +1066,10 @@ const handleExportCSV = () => {
|
|||||||
|
|
||||||
// Show success message and reload the page after a short delay
|
// Show success message and reload the page after a short delay
|
||||||
setToast({ show: true, message: 'Product updated successfully!', type: 'success' });
|
setToast({ show: true, message: 'Product updated successfully!', type: 'success' });
|
||||||
// closeModal();
|
closeModal();
|
||||||
// setTimeout(() => {
|
setTimeout(() => {
|
||||||
// window.location.reload();
|
window.location.reload();
|
||||||
// }, 1000);
|
}, 1000);
|
||||||
return;
|
return;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error updating product:', error);
|
console.error('Error updating product:', error);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user