From ca8fa3b42013c5cd86007c882769f98f6a94e134 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Thu, 21 Aug 2025 09:28:54 +0700 Subject: [PATCH] =?UTF-8?q?fix=20bug=20KPI=20=E0=B9=84=E0=B8=A1=E0=B9=88?= =?UTF-8?q?=20fetch=20=E0=B8=82=E0=B9=89=E0=B8=AD=E0=B8=A1=E0=B8=B9?= =?UTF-8?q?=E0=B8=A5=20=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=9E=E0=B8=B1?= =?UTF-8?q?=E0=B8=92=E0=B8=99=E0=B8=B2=E0=B8=95=E0=B8=99=E0=B9=80=E0=B8=AD?= =?UTF-8?q?=E0=B8=87=E0=B9=80=E0=B8=A1=E0=B8=B7=E0=B9=88=E0=B8=AD=E0=B9=80?= =?UTF-8?q?=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../08_KPI/components/Tab/Dialog/DialogDevelop.vue | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/modules/08_KPI/components/Tab/Dialog/DialogDevelop.vue b/src/modules/08_KPI/components/Tab/Dialog/DialogDevelop.vue index 7ec9cbc..5d81430 100644 --- a/src/modules/08_KPI/components/Tab/Dialog/DialogDevelop.vue +++ b/src/modules/08_KPI/components/Tab/Dialog/DialogDevelop.vue @@ -198,7 +198,8 @@ function onSubmit() { ) { dialogMessageNotify($q, "กรุณาเลือกวิธีการพัฒนา อย่างน้อย 1 ตัวเลือก"); } else { - dialogConfirm($q, () => { + dialogConfirm($q, async () => { + showLoader(); const url = id.value ? config.API.kpiAchievementDevelop + `/${id.value}` : config.API.kpiAchievementDevelop; @@ -220,11 +221,11 @@ function onSubmit() { selectTypeYear: formData.year ? formData.year.toString() : null, selectTypeId: projectName.value ? projectName.value.id : null, }; - isLoadMain.value = true; - http[id.value ? "put" : "post"](url, body) - .then((res) => { - close(); + await http[id.value ? "put" : "post"](url, body) + .then(async () => { + await props?.getAll?.(); success($q, "บันทึกข้อมูลสำเร็จ"); + close(); }) .catch((e) => { messageError($q, e);