From 40ca94ae80aee99c4f77cb0f04f804eb60f0c57b Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Tue, 17 Dec 2024 17:06:21 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=80=E0=B8=9B=E0=B8=B4=E0=B8=94=E0=B8=84?= =?UTF-8?q?=E0=B8=AD=E0=B8=A1=E0=B9=80=E0=B8=A1=E0=B9=89=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../1_Complaint/AddComplaintPage.vue | 28 +++++++++---------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/src/modules/11_discipline/components/1_Complaint/AddComplaintPage.vue b/src/modules/11_discipline/components/1_Complaint/AddComplaintPage.vue index e0ab07f36..0ebf1eca0 100644 --- a/src/modules/11_discipline/components/1_Complaint/AddComplaintPage.vue +++ b/src/modules/11_discipline/components/1_Complaint/AddComplaintPage.vue @@ -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(); + }); }