From de0c00baca143175c3b9ff1eae035511c76e1d8d Mon Sep 17 00:00:00 2001 From: AnandaTon <125332905+anandaAiemvong@users.noreply.github.com> Date: Fri, 28 Jul 2023 17:29:47 +0700 Subject: [PATCH] =?UTF-8?q?Set=20Date=20=E0=B9=80=E0=B8=9B=E0=B9=87?= =?UTF-8?q?=E0=B8=99=20null=20=E0=B9=83=E0=B8=99=E0=B8=AB=E0=B8=99?= =?UTF-8?q?=E0=B9=89=E0=B8=B2=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1?= =?UTF-8?q?=E0=B8=82=E0=B9=89=E0=B8=AD=E0=B8=A1=E0=B8=B9=E0=B8=A5=E0=B8=A5?= =?UTF-8?q?=E0=B8=B9=E0=B8=81=E0=B8=88=E0=B9=89=E0=B8=B2=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../04_registry/components/profileType.ts | 4 +- .../views/Information/Information.vue | 1132 +++++++++++++++++ .../08_registryEmployee/views/information.vue | 8 +- 3 files changed, 1140 insertions(+), 4 deletions(-) create mode 100644 src/modules/08_registryEmployee/views/Information/Information.vue diff --git a/src/modules/04_registry/components/profileType.ts b/src/modules/04_registry/components/profileType.ts index e0cefd668..ab3b28b22 100644 --- a/src/modules/04_registry/components/profileType.ts +++ b/src/modules/04_registry/components/profileType.ts @@ -14,7 +14,7 @@ interface Information { prefixId: string | null; firstname: string | null; lastname: string | null; - birthDate: Date; + birthDate: Date | null; genderId: string | null; bloodId: string | null; nationality: string | null; @@ -135,7 +135,7 @@ const defaultInformation: Information = { prefixId: null, firstname: null, lastname: null, - birthDate: new Date(), + birthDate: null, genderId: null, bloodId: null, nationality: null, diff --git a/src/modules/08_registryEmployee/views/Information/Information.vue b/src/modules/08_registryEmployee/views/Information/Information.vue new file mode 100644 index 000000000..ec7a1440b --- /dev/null +++ b/src/modules/08_registryEmployee/views/Information/Information.vue @@ -0,0 +1,1132 @@ + + diff --git a/src/modules/08_registryEmployee/views/information.vue b/src/modules/08_registryEmployee/views/information.vue index ade1f0cfd..6be674a11 100644 --- a/src/modules/08_registryEmployee/views/information.vue +++ b/src/modules/08_registryEmployee/views/information.vue @@ -117,7 +117,11 @@ lazy-rules :readonly="!edit" :borderless="!edit" - :model-value="date2Thai(informaData.birthDate)" + :model-value=" + informaData.birthDate == null + ? null + : date2Thai(informaData.birthDate) + " :rules="[(val:string) => !!val || `${'กรุณาเลือก วัน/เดือน/ปี เกิด'}`]" :label="`${'วัน/เดือน/ปี เกิด'}`" > @@ -692,7 +696,7 @@ const defaultAdd = () => { prefixId: null, firstname: null, lastname: null, - birthDate: new Date(), + birthDate: null, genderId: null, bloodId: null, nationality: null,