ปรับวินัย
This commit is contained in:
parent
58c2bfc467
commit
015d2d9857
9 changed files with 35 additions and 50 deletions
|
|
@ -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();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -264,9 +264,7 @@ function onSubmit() {
|
|||
emit("submit:disciplinary", formData);
|
||||
isSave.value = false;
|
||||
extendStatus.value = false;
|
||||
},
|
||||
"ยืนยันการบันทึกข้อมูล",
|
||||
"ต้องการยืนยันการบันทึกข้อมูลนี้หรือไม่ ?"
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue