เปิดคอมเม้น

This commit is contained in:
setthawutttty 2024-12-17 17:06:21 +07:00
parent 8e52ef1fa3
commit 40ca94ae80

View file

@ -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>