fix: update message spit
This commit is contained in:
parent
1230c219f7
commit
33f88feb60
|
|
@ -602,7 +602,7 @@ export default function FormConvertSPIT() {
|
|||
|
||||
try {
|
||||
setIsSaving(true);
|
||||
|
||||
loading();
|
||||
const description =
|
||||
selectedFileType === "original"
|
||||
? data.contentDescription
|
||||
|
|
@ -622,16 +622,26 @@ export default function FormConvertSPIT() {
|
|||
: getPlacementData("polda"),
|
||||
};
|
||||
|
||||
await convertSPIT(requestData);
|
||||
|
||||
MySwal.fire({
|
||||
title: "Success",
|
||||
text: "Data saved successfully",
|
||||
icon: "success",
|
||||
confirmButtonColor: "#3085d6",
|
||||
}).then(() => {
|
||||
loadDetail();
|
||||
});
|
||||
const res = await convertSPIT(requestData);
|
||||
close();
|
||||
if (res?.error) {
|
||||
console.error(res.message);
|
||||
MySwal.fire({
|
||||
title: "Error",
|
||||
text: res?.message,
|
||||
icon: "error",
|
||||
confirmButtonColor: "#3085d6",
|
||||
});
|
||||
} else {
|
||||
MySwal.fire({
|
||||
title: "Success",
|
||||
text: "Data saved successfully",
|
||||
icon: "success",
|
||||
confirmButtonColor: "#3085d6",
|
||||
}).then(() => {
|
||||
loadDetail();
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Failed to save:", error);
|
||||
MySwal.fire({
|
||||
|
|
|
|||
Loading…
Reference in New Issue