From 9e27068e1ebbfc24cab693ebdb08bc8dd6158c75 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 6 Feb 2024 17:07:22 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=89=E0=B8=A1?= =?UTF-8?q?=20validate=20=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B9=80=E0=B8=A5?= =?UTF-8?q?=E0=B8=B7=E0=B8=AD=E0=B8=81=E0=B8=95=E0=B8=B3=E0=B9=81=E0=B8=AB?= =?UTF-8?q?=E0=B8=99=E0=B9=88=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/DialogFormPosition.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/modules/02_organizationalNew/components/DialogFormPosition.vue b/src/modules/02_organizationalNew/components/DialogFormPosition.vue index 1bc99c156..2a2ce85a9 100644 --- a/src/modules/02_organizationalNew/components/DialogFormPosition.vue +++ b/src/modules/02_organizationalNew/components/DialogFormPosition.vue @@ -46,6 +46,7 @@ const { messageError, success, dialogRemove, + dialogMessageNotify, } = mixin; const selected = ref([]); const search = ref(""); @@ -309,7 +310,11 @@ function validateForm() { } } if (hasError.every((result) => result === true)) { - onSubmit(); + if (rows.value.length !== 0) { + onSubmit(); + } else { + dialogMessageNotify($q, "กรุณาเลือกตำแหน่งอย่างน้อย 1 ตำแหน่ง"); + } } else { } } @@ -428,8 +433,6 @@ function onSubmitSelectEdit() { ); } - - /** input ค้นหา */ const searchRef = ref(null); async function searchInput() { @@ -724,7 +727,6 @@ async function clearFormPositionSelect() { :options="optionFilter" emit-value dense - map-options outlined option-label="name"