From 15d174a98c0c05ecc91aa587fc74b6e7e9daead4 Mon Sep 17 00:00:00 2001 From: "STW_TTTY\\stwtt" Date: Tue, 23 Apr 2024 18:15:57 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=20map?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../14_KPI/components/competency/03ListLinkGroup.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/modules/14_KPI/components/competency/03ListLinkGroup.vue b/src/modules/14_KPI/components/competency/03ListLinkGroup.vue index 6108b1ce1..9d788d0cc 100644 --- a/src/modules/14_KPI/components/competency/03ListLinkGroup.vue +++ b/src/modules/14_KPI/components/competency/03ListLinkGroup.vue @@ -214,7 +214,10 @@ function getDataEdit(id: string) { name: data.groupName, }; position.value = data.positions.map((i: any) => i.name); - competency.value = data.capacitys.map((i: any) => i.id); + competency.value = data.capacitys.map((i: any) => ({ + id:i.id, + name:i.name + })); }) .finally(() => { hideLoader(); @@ -228,7 +231,7 @@ function onSubmit() { const body = { kpiGroupId: groupName.value.id, positions: position.value, - kpiCapacityIds: competency.value, + kpiCapacityIds: competency.value.map((i:any)=> i.id) }; dialogConfirm($q, () => { http[editStatus.value ? "put" : "post"](url, body) @@ -241,6 +244,7 @@ function onSubmit() { }); } + function close() { modal.value = false; editStatus.value = false; @@ -543,7 +547,6 @@ onMounted(async () => { v-model="competency" label="สมรรถนะประจำกลุ่ม" outlined - emit-value multiple map-options option-label="name"