From 606064c77c3ac83821a544c800d62e4b782ee324 Mon Sep 17 00:00:00 2001 From: "STW_TTTY\\stwtt" Date: Tue, 10 Sep 2024 15:47:12 +0700 Subject: [PATCH] Refactoring code module 11_probation --- .../10_registry/Dialog/DialogDevelopmant.vue | 1 - .../component/addPage/01_addresult.vue | 30 +++++++++---------- .../component/editPage/01_result.vue | 15 +++++----- .../11_probation/interface/index/main.ts | 12 +++++++- src/modules/11_probation/views/mainDetail.vue | 24 ++++++--------- 5 files changed, 42 insertions(+), 40 deletions(-) diff --git a/src/modules/10_registry/Dialog/DialogDevelopmant.vue b/src/modules/10_registry/Dialog/DialogDevelopmant.vue index 3228a13..a88799d 100644 --- a/src/modules/10_registry/Dialog/DialogDevelopmant.vue +++ b/src/modules/10_registry/Dialog/DialogDevelopmant.vue @@ -383,7 +383,6 @@ function filterOptionFn(val: string, update: Function) { (new Date()); -const behavior_improve_desc = ref(""); const mixin = useCounterMixin(); const { showLoader, @@ -26,8 +25,9 @@ const { dialogMessageNotify, dateToISO, } = mixin; -const route = useRoute(); -const router = useRouter(); + +const dateAutherise = ref(new Date()); +const behavior_improve_desc = ref(""); const id = ref(route.params.id as string); const profileId = ref(route.params.profileId as string); @@ -200,7 +200,7 @@ function putformData() { self_learning: Number(self_learning.value), training_seminar: Number(training_seminar.value), other_training: Number(other_training.value), - assessor_dated: dateToISO(dateAutherise.value), + assessor_dated: dateToISO(dateAutherise.value as Date), }; dialogConfirm($q, async () => await saveformdata(data)); } @@ -434,7 +434,7 @@ onMounted(async () => { class="full-width datepicker col-3" :model-value="start_date != null ? date2Thai(start_date) : null" :label="`${'ระหว่างวันที่'}`" - :rules="[(val) => !!val || `${'กรุณาเลือกวันที่'}`]" + :rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่'}`]" >