ส่งเรื่องร้องเรียนไปยังขั้นตอนการสืบสวน

This commit is contained in:
setthawutttty 2023-11-23 17:48:24 +07:00
parent 418437486d
commit b876c951b0
4 changed files with 56 additions and 31 deletions

View file

@ -17,20 +17,20 @@ const router = useRouter();
async function onSubmit(data: any) {
/** post */
console.log(data)
// showLoader();
// http
// .post(config.API.complaintAdd(), data)
// .then((res) => {
// console.log(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) => {
console.log(res)
success($q, "บันทึกข้อมูลสำเร็จ");
router.push(`/discipline/complaints/${res.data.result}`);
})
.catch((e) => {
messageError($q, e);
})
.finally(async () => {
hideLoader();
});
}
</script>
<template>