ปรับวินัย

This commit is contained in:
Warunee Tamkoo 2024-01-19 10:51:17 +07:00
parent 58c2bfc467
commit 015d2d9857
9 changed files with 35 additions and 50 deletions

View file

@ -220,25 +220,18 @@ async function fetchDetailComplaints() {
* @param data อม ใน form
*/
async function onSubmitDisciplinary(data: any) {
showLoader();
await http
.put(config.API.disciplineDisciplinaryById(id.value), data)
.then(() => {
.then(async () => {
await fetchDetailDisciplinary();
success($q, "บันทึกข้อมูลสำเร็จ");
})
.catch((err) => {})
.finally(async () => {
const fetchFunction =
store.tabMenu === "disciplinary"
? fetchDetailDisciplinary
: store.tabMenu === "investigatefacts"
? fetchDetailInvestigate
: store.tabMenu === "complaints"
? fetchDetailComplaints
: null;
if (fetchFunction) {
await fetchFunction();
}
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
}
@ -271,13 +264,14 @@ function confirmSentIssueGate() {
showLoader();
http
.get(config.API.disciplinaryApprove(id.value))
.then((res) => {})
.then((res) => {
// fetchDetailDisciplinary();
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
router.push(`/discipline/disciplinary`);
fetchDetailDisciplinary();
});
}

View file

@ -264,9 +264,7 @@ function onSubmit() {
emit("submit:disciplinary", formData);
isSave.value = false;
extendStatus.value = false;
},
"ยืนยันการบันทึกข้อมูล",
"ต้องการยืนยันการบันทึกข้อมูลนี้หรือไม่ ?"
}
);
}