From 18efaa48b6d8c213f87918ef3f490b69dcf6d475 Mon Sep 17 00:00:00 2001 From: puriphatt Date: Tue, 20 Aug 2024 18:04:42 +0700 Subject: [PATCH] refactor: misc --- .../02_personnel-management/FormPerson.vue | 1 + .../FormEmployeePassport.vue | 9 +- .../FormEmployeeVisa.vue | 40 +++++-- .../employee/BasicInformation.vue | 5 +- src/components/DrawerInfo.vue | 9 +- src/components/shared/PersonCard.vue | 2 + src/layouts/MainLayout.vue | 12 +- src/layouts/ProfileMenu.vue | 80 +++++++++++-- .../02_personnel-management/MainPage.vue | 106 +++++++++++------- src/pages/03_customer-management/MainPage.vue | 18 ++- 10 files changed, 214 insertions(+), 68 deletions(-) diff --git a/src/components/02_personnel-management/FormPerson.vue b/src/components/02_personnel-management/FormPerson.vue index a7759872..8fa73a46 100644 --- a/src/components/02_personnel-management/FormPerson.vue +++ b/src/components/02_personnel-management/FormPerson.vue @@ -371,6 +371,7 @@ watch( const today = new Date(); const date = parseAndFormatDate(v, locale); birthDate = date && date > today ? today : date; + console.log(today); } } " diff --git a/src/components/03_customer-management/FormEmployeePassport.vue b/src/components/03_customer-management/FormEmployeePassport.vue index 02c02bf6..22fe8747 100644 --- a/src/components/03_customer-management/FormEmployeePassport.vue +++ b/src/components/03_customer-management/FormEmployeePassport.vue @@ -153,7 +153,14 @@ watch( hide-bottom-space class="col-6" :label="$t('formDialogInputPassportRef')" - v-model="previousPassportReference" + :model-value=" + readonly + ? previousPassportReference || '-' + : previousPassportReference + " + @update:model-value=" + (v) => (typeof v === 'string' ? (previousPassportReference = v) : '') + " /> {{ $t(`${title}`) }} @@ -107,7 +107,6 @@ watch( hide-selected hide-bottom-space input-debounce="0" - v-model="visaType" option-value="value" option-label="label" lazy-rules="ondemand" @@ -119,6 +118,11 @@ watch( :for="`${prefixId}-select-visa-type`" :label="$t('formDialogInputVisaType')" @filter="visaTypeFilter" + :model-value="readonly ? visaType || '-' : visaType" + @update:model-value=" + (v) => (typeof v === 'string' ? (visaType = v) : '') + " + @clear="visaType = ''" >