From 5ab256807a4c09589680ea2db2bd59264149e2a3 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Tue, 12 Dec 2023 09:38:42 +0700 Subject: [PATCH] validate --- .../09_leave/components/4_specialTime/DialogApprove.vue | 9 +++++++++ src/modules/09_leave/interface/response/specialTime.ts | 1 + 2 files changed, 10 insertions(+) diff --git a/src/modules/09_leave/components/4_specialTime/DialogApprove.vue b/src/modules/09_leave/components/4_specialTime/DialogApprove.vue index f0b422790..18e2243b1 100644 --- a/src/modules/09_leave/components/4_specialTime/DialogApprove.vue +++ b/src/modules/09_leave/components/4_specialTime/DialogApprove.vue @@ -27,6 +27,7 @@ const checkInRef = ref(null); const checkOutRef = ref(null); const checkInStatusRef = ref(null); const checkOutStatusRef = ref(null); +const reasonRef = ref(null); const formData = reactive({ checkIn: "", @@ -41,6 +42,7 @@ const objectRound: MyObjectRoundRef = { checkOut: checkOutRef, checkInStatus: checkInStatusRef, checkOutStatus: checkOutStatusRef, + note: reasonRef, }; function validateForm() { @@ -56,6 +58,7 @@ function validateForm() { } if (hasError.every((result) => result === true)) { onSubmit(); + console.log(hasError) } else { console.log(hasError); } @@ -263,6 +266,8 @@ watch( ref="checkInStatusRef" for="checkInStatus" emit-value + :rules="[(val) => !!val || 'กรุณาเลือกสถานะเข้างาน']" + hide-bottom-space map-options outlined full-width @@ -293,6 +298,8 @@ watch( map-options outlined dense + :rules="[(val) => !!val || 'กรุณาเลือกสถานะออกงาน']" + hide-bottom-space full-width v-model="SpecialTimeStore.checkOutStatus" :options="SpecialTimeStore.optionStatus" @@ -305,9 +312,11 @@ watch(