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