bug fixed
This commit is contained in:
parent
e9fe97e261
commit
53ea691e44
@ -68,7 +68,7 @@ const UploadOpeningInventory = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Redirect or display success message
|
// Redirect or display success message
|
||||||
if (data?.errors && data?.errors.length > 0) {
|
if (data?.errors && data?.errors?.length > 0) {
|
||||||
setErrors(data?.errors);
|
setErrors(data?.errors);
|
||||||
swal({
|
swal({
|
||||||
title: "SpreadSheet Upload Successful",
|
title: "SpreadSheet Upload Successful",
|
||||||
@ -77,8 +77,8 @@ const UploadOpeningInventory = () => {
|
|||||||
button: "OK",
|
button: "OK",
|
||||||
});
|
});
|
||||||
} else if (
|
} else if (
|
||||||
data?.newlyCreated.length > 0 ||
|
data?.newlyCreated?.length > 0 ||
|
||||||
data?.updatedInventories.length > 0
|
data?.updatedOpeningInventories?.length > 0
|
||||||
) {
|
) {
|
||||||
swal({
|
swal({
|
||||||
title: "SpreadSheet Upload Successful",
|
title: "SpreadSheet Upload Successful",
|
||||||
|
Loading…
Reference in New Issue
Block a user