From 425a4962094f54627ae3aeed51c4088beb7b547b Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Fri, 13 Dec 2024 16:51:58 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=20=E0=B8=9E?= =?UTF-8?q?=E0=B8=B1=E0=B8=92=E0=B8=99=E0=B8=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Tab/Dialog/DialogCommentProblem.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/modules/14_KPI/components/Tab/Dialog/DialogCommentProblem.vue b/src/modules/14_KPI/components/Tab/Dialog/DialogCommentProblem.vue index b5696f409..a656d831a 100644 --- a/src/modules/14_KPI/components/Tab/Dialog/DialogCommentProblem.vue +++ b/src/modules/14_KPI/components/Tab/Dialog/DialogCommentProblem.vue @@ -9,7 +9,7 @@ import config from "@/app.config"; import type { FormComment, FormCommentByRole, -} from "@/modules/14_KPI/interface/request/index"; +} from "@/modules/14_KPI/interface/request/Index"; import { useRoute } from "vue-router"; import { useQuasar } from "quasar"; @@ -82,7 +82,7 @@ function clickList(index: string, data: any) { reasonCommanderRef.value.reset(); reasonCommanderHighRef.value.reset(); } - count.value++; + showLoader(); setTimeout(() => { hideLoader(); @@ -116,12 +116,13 @@ function onSubmitAdd() { .then(async (res) => { success($q, "บันทึกข้อมูลสำเร็จ"); if (sendId.value) { - const id = res.data.result; + const id = await res.data.result; await closeAdd(); const data = listTarget.value.find((item: any) => item.id == id); + count.value = 0; clickList(id, data); } else { - sendId.value = res.data.result; + sendId.value = await res.data.result; getList(); } }) @@ -212,6 +213,7 @@ function onSubmitComment(role: string) { const data = listTarget.value.find( (item: any) => item.id == idCheck ); + count.value++; clickList(idCheck, data); } }, 200);