From 8fb195cca75e350a02a2a8d74d5168aaada97fed Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Wed, 26 Jun 2024 15:05:30 +0700 Subject: [PATCH 1/4] fixing kpi progress --- .../Tab/Dialog/DialogCommentProgress.vue | 48 +++++++++++++++---- 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/src/modules/08_KPI/components/Tab/Dialog/DialogCommentProgress.vue b/src/modules/08_KPI/components/Tab/Dialog/DialogCommentProgress.vue index be69cf2..45d2cf5 100644 --- a/src/modules/08_KPI/components/Tab/Dialog/DialogCommentProgress.vue +++ b/src/modules/08_KPI/components/Tab/Dialog/DialogCommentProgress.vue @@ -18,7 +18,14 @@ const numLevel = ref(""); const store = useKpiDataStore(); const $q = useQuasar(); const mixin = useCounterMixin(); -const { dialogConfirm, showLoader, hideLoader, messageError, success,dialogMessageNotify } = mixin; +const { + dialogConfirm, + showLoader, + hideLoader, + messageError, + success, + dialogMessageNotify, +} = mixin; const check = ref(""); const rows = defineModel("rows"); @@ -87,8 +94,12 @@ function clickList(index: string, data: any) { function onSubmitAdd() { // type - if (numLevel.value == "") { - dialogMessageNotify($q,'กรุณาเลือกคะแนน') + if ( + numLevel.value == "" && + type.value != "capacity" && + type.value != "development" + ) { + dialogMessageNotify($q, "กรุณาเลือกคะแนน"); } else { dialogConfirm($q, () => { showLoader(); @@ -139,6 +150,7 @@ function closeAdd() { modalAdd.value = false; formDataAdd.topic = ""; formDataAdd.reason = ""; + numLevel.value = ""; } function getList() { @@ -246,6 +258,13 @@ watch(