เปิดคอมเม้น
This commit is contained in:
parent
8e52ef1fa3
commit
40ca94ae80
1 changed files with 13 additions and 15 deletions
|
|
@ -15,21 +15,19 @@ const { showLoader, hideLoader, success, messageError } = mixin;
|
|||
|
||||
/** บันทึกข้อมูล */
|
||||
async function onSubmit(data: any) {
|
||||
console.log(data);
|
||||
|
||||
// showLoader();
|
||||
// http
|
||||
// .post(config.API.complaintAdd(), data)
|
||||
// .then((res) => {
|
||||
// success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
// router.push(`/discipline/complaints/${res.data.result}`);
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(async () => {
|
||||
// hideLoader();
|
||||
// });
|
||||
showLoader();
|
||||
http
|
||||
.post(config.API.complaintAdd(), data)
|
||||
.then((res) => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
router.push(`/discipline/complaints/${res.data.result}`);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue