From 63069f50f4517c0ac4bb6b924c846462ffb3789e Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Tue, 30 Apr 2024 09:22:46 +0700 Subject: [PATCH] fix bug --- src/modules/08_KPI/store.ts | 6 +++++- src/modules/08_KPI/views/form.vue | 12 ++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/modules/08_KPI/store.ts b/src/modules/08_KPI/store.ts index 33da8a1..34b82ad 100644 --- a/src/modules/08_KPI/store.ts +++ b/src/modules/08_KPI/store.ts @@ -5,7 +5,11 @@ import type { DataOptions } from "./interface/index/Main"; export const useKpiDataStore = defineStore("KPIDate", () => { const tabMain = ref("1"); const dataProfile = ref(); - const dataEvaluation = ref(); + const dataEvaluation = ref({ + plannedPoint: 0, + rolePoint: 0, + specialPoint: 0, + }); const competencyType = ref([ { diff --git a/src/modules/08_KPI/views/form.vue b/src/modules/08_KPI/views/form.vue index 4eaf638..987307b 100644 --- a/src/modules/08_KPI/views/form.vue +++ b/src/modules/08_KPI/views/form.vue @@ -269,17 +269,17 @@ function onSubmitScore() { showLoader(); http .put(config.API.kpiScoreTotal() + `/${id.value}`, { - plannedPoint:plannedPoint.value, - rolePoint:rolePoint.value, - specialPoint:specialPoint.value, - capacityPoint:capacityPoint.value + plannedPoint: plannedPoint.value, + rolePoint: rolePoint.value, + specialPoint: specialPoint.value, + capacityPoint: capacityPoint.value, }) .then(async (res) => { await fetchEvaluation(); await getProfile(); await getOrgOp(); await success($q, "บันทึกสำเร็จ"); - modalScore.value = false + modalScore.value = false; }) .catch((e) => { messageError($q, e); @@ -332,7 +332,7 @@ onMounted(async () => { style="left: 2%; top: 50%; transform: translateY(-50%)" > - +