From 4c5f329a6a440e7118e74676d59c42100da2990a Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Thu, 26 Dec 2024 10:15:17 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=20=E0=B9=81?= =?UTF-8?q?=E0=B8=95=E0=B9=88=E0=B8=87=E0=B8=95=E0=B8=B1=E0=B9=89=E0=B8=87?= =?UTF-8?q?=E0=B8=84=E0=B8=93=E0=B8=B0=E0=B8=81=E0=B8=A3=E0=B8=A3=E0=B8=A1?= =?UTF-8?q?=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B9=80?= =?UTF-8?q?=E0=B8=A1=E0=B8=B4=E0=B8=99=E0=B8=9C=E0=B8=A5=E0=B8=81=E0=B8=B2?= =?UTF-8?q?=E0=B8=A3=E0=B8=97=E0=B8=94=E0=B8=A5=E0=B8=AD=E0=B8=87=E0=B8=9B?= =?UTF-8?q?=E0=B8=8F=E0=B8=B4=E0=B8=9A=E0=B8=B1=E0=B8=95=E0=B8=B4=E0=B8=AB?= =?UTF-8?q?=E0=B8=99=E0=B9=89=E0=B8=B2=E0=B8=97=E0=B8=B5=E0=B9=88=E0=B8=A3?= =?UTF-8?q?=E0=B8=B2=E0=B8=8A=E0=B8=81=E0=B8=B2=E0=B8=A3=20**=E0=B8=95?= =?UTF-8?q?=E0=B9=89=E0=B8=AD=E0=B8=87=E0=B8=A1=E0=B8=B5=203=20role=20?= =?UTF-8?q?=E0=B8=96=E0=B8=B6=E0=B8=87=E0=B8=88=E0=B8=B0=E0=B8=9A=E0=B8=B1?= =?UTF-8?q?=E0=B8=99=E0=B8=97=E0=B8=B6=E0=B8=81=E0=B9=84=E0=B8=94=E0=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../probation/FormAppoint/FormAppoint.vue | 32 +++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/src/modules/05_placement/components/probation/FormAppoint/FormAppoint.vue b/src/modules/05_placement/components/probation/FormAppoint/FormAppoint.vue index e1043ffe4..2320af0d5 100644 --- a/src/modules/05_placement/components/probation/FormAppoint/FormAppoint.vue +++ b/src/modules/05_placement/components/probation/FormAppoint/FormAppoint.vue @@ -64,6 +64,27 @@ const countRowLength = computed(() => { : false; }); +const findPerson = computed(() => { + const roles = ["chairman", "committee", "caregiver"]; + return roles.every((role) => rows.value.some((row) => row.role === role)); +}); + +const textAlert = computed(() => { + const roles = [ + { key: "chairman", label: "ประธาน" }, + { key: "committee", label: "ผู้บังคับบัญชา" }, + { key: "caregiver", label: "ผู้ดูแล" }, + ]; + + const missingRoles = roles + .filter((role) => !rows.value.some((row) => row.role === role.key)) + .map((role) => role.label); + + return missingRoles.length > 0 + ? `กรุณาเพิ่มรายชื่อ : ${missingRoles.join(", ")}` + : ""; +}); + const optionsTypeMain = ref([]); const optionsType = ref([ { id: "chairman", value: "ประธาน" }, @@ -599,7 +620,15 @@ onMounted(async () => { - + {{ textAlert }} + บันทึก @@ -657,7 +686,6 @@ onMounted(async () => { v-model="filterKeyword" ref="filterRef" outlined - placeholder="ค้นหา" @keydown.enter.prevent="(pagination.page = 1), getPerson()" >