เพิ่ม Dialog ดำเนินการสำเร็จ

This commit is contained in:
AnandaTon 2023-09-27 11:30:37 +07:00
parent b15dd6205f
commit 04ce570654

View file

@ -1021,27 +1021,60 @@ const closeKp7Short = () => {
dialogShort.value = false;
};
const helpPost = () => {
const helpPost = async () => {
const formData = new FormData();
formData.append("id", profileId.value);
dialogConfirm($q, async () => {
const formData = new FormData();
formData.append("id", profileId.value);
await http.post(config.API.placemenHelpGov, formData);
showLoader();
await http
.post(config.API.placemenHelpGov, formData)
.then(() => {
success($q, "ดำเนินการสำเร็จ");
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
});
};
const repatriationPost = async () => {
const formData = new FormData();
formData.append("id", profileId.value);
dialogConfirm($q, async () => {
const formData = new FormData();
formData.append("id", profileId.value);
await http.post(config.API.placemenRepatriation, formData);
showLoader();
await http
.post(config.API.placemenRepatriation, formData)
.then(() => {
success($q, "ดำเนินการสำเร็จ");
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
});
};
const appointPost = async () => {
const formData = new FormData();
formData.append("id", profileId.value);
dialogConfirm($q, async () => {
const formData = new FormData();
formData.append("id", profileId.value);
await http.post(config.API.placemenAppointment, formData);
showLoader();
await http
.post(config.API.placemenAppointment, formData)
.then(() => {
success($q, "ดำเนินการสำเร็จ");
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
});
};
@ -1054,34 +1087,78 @@ const appointPost = async () => {
// };
const outPost = async () => {
const formData = new FormData();
formData.append("id", profileId.value);
dialogConfirm($q, async () => {
const formData = new FormData();
formData.append("id", profileId.value);
await http.post(config.API.retirementOut, formData);
showLoader();
await http
.post(config.API.retirementOut, formData)
.then(() => {
success($q, "ดำเนินการสำเร็จ");
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
});
};
const dischargePost = async () => {
const formData = new FormData();
formData.append("id", profileId.value);
dialogConfirm($q, async () => {
const formData = new FormData();
formData.append("id", profileId.value);
await http.post(config.API.retirementDischarge, formData);
showLoader();
await http
.post(config.API.retirementDischarge, formData)
.then(() => {
success($q, "ดำเนินการสำเร็จ");
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
});
};
const expulsionPost = async () => {
const formData = new FormData();
formData.append("id", profileId.value);
dialogConfirm($q, async () => {
const formData = new FormData();
formData.append("id", profileId.value);
await http.post(config.API.retirementExpulsion, formData);
showLoader();
await http
.post(config.API.retirementExpulsion, formData)
.then(() => {
success($q, "ดำเนินการสำเร็จ");
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
});
};
const otherPost = async () => {
const formData = new FormData();
formData.append("id", profileId.value);
dialogConfirm($q, async () => {
const formData = new FormData();
formData.append("id", profileId.value);
await http.post(config.API.placemenOther, formData);
showLoader();
await http
.post(config.API.placemenOther, formData)
.then(() => {
success($q, "ดำเนินการสำเร็จ");
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
});
};