From f80a07b55e9c10e84d84014fbd6cdf7ed665d444 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Mon, 1 Apr 2024 09:19:14 +0700 Subject: [PATCH 1/4] =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A=20form?= =?UTF-8?q?=20=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84=E0=B8=82=E0=B8=A3?= =?UTF-8?q?=E0=B8=B2=E0=B8=A2=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B9=82=E0=B8=84?= =?UTF-8?q?=E0=B8=A3=E0=B8=87=E0=B8=81=E0=B8=B2=E0=B8=A3/=E0=B8=AB?= =?UTF-8?q?=E0=B8=A5=E0=B8=B1=E0=B8=81=E0=B8=AA=E0=B8=B9=E0=B8=95=E0=B8=A3?= =?UTF-8?q?=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=9D=E0=B8=B6=E0=B8=81=E0=B8=AD?= =?UTF-8?q?=E0=B8=9A=E0=B8=A3=E0=B8=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/15_development/components/BasicInfo.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/15_development/components/BasicInfo.vue b/src/modules/15_development/components/BasicInfo.vue index 1a6ea723f..90022418a 100644 --- a/src/modules/15_development/components/BasicInfo.vue +++ b/src/modules/15_development/components/BasicInfo.vue @@ -88,9 +88,11 @@ onMounted(() => { label="ชื่อโครงการ/กิจกรรม/หลักสูตร" rows="6" type="textarea" + hide-bottom-space :rules="[ (val:string) => !!val || `${'กรุณากรอกชื่อโครงการ/กิจกรรม/หลักสูตร'}`, + ]" /> @@ -101,6 +103,7 @@ onMounted(() => { v-model="formData.reason" label="หลักการและเหตุผล" rows="6" + hide-bottom-space type="textarea" :rules="[ (val:string) => @@ -115,6 +118,7 @@ onMounted(() => { v-model="formData.objective" label="วัตถุประสงค์" rows="6" + hide-bottom-space type="textarea" :rules="[ (val:string) => From c885ecfffadc2139cf0a7c0b2fd08444ae9d1407 Mon Sep 17 00:00:00 2001 From: oat_dev Date: Mon, 1 Apr 2024 09:55:50 +0700 Subject: [PATCH 2/4] =?UTF-8?q?=E0=B8=97=E0=B8=B0=E0=B9=80=E0=B8=9A?= =?UTF-8?q?=E0=B8=B5=E0=B8=A2=E0=B8=99=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=A7?= =?UTF-8?q?=E0=B8=B1=E0=B8=95=E0=B8=B4:=20=E0=B9=81=E0=B8=81=E0=B9=89?= =?UTF-8?q?=E0=B8=A7=E0=B8=B1=E0=B8=99=E0=B9=80=E0=B8=94=E0=B8=B7=E0=B8=AD?= =?UTF-8?q?=E0=B8=99=E0=B8=9B=E0=B8=B5=E0=B9=80=E0=B8=81=E0=B8=B4=E0=B8=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/04_registryNew/components/DialogAddData.vue | 9 ++++++++- .../components/detail/PersonalInformation/01_Profile.vue | 8 ++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/modules/04_registryNew/components/DialogAddData.vue b/src/modules/04_registryNew/components/DialogAddData.vue index 44b9f34ab..0ddfae294 100644 --- a/src/modules/04_registryNew/components/DialogAddData.vue +++ b/src/modules/04_registryNew/components/DialogAddData.vue @@ -119,6 +119,12 @@ function closeDialog() { clearFormData(); } +const calculateMaxDate = () => { + const today = new Date(); + today.setFullYear(today.getFullYear() - 18); + return today; +}; + function clearFormData() { formData.prefix = ""; formData.firstName = ""; @@ -195,7 +201,6 @@ watch( hide-bottom-space :rules="[ (val) => { - console.log(val); return val.length > 0 || 'กรุณาเลือกคำนำหน้าชื่อ'; }, ]" @@ -265,6 +270,8 @@ watch( autoApply borderless week-start="0" + :max-date="calculateMaxDate()" + :enableTimePicker="false" menu-class-name="modalfix" v-model="formData.birthDate" :locale="'th'" diff --git a/src/modules/04_registryNew/components/detail/PersonalInformation/01_Profile.vue b/src/modules/04_registryNew/components/detail/PersonalInformation/01_Profile.vue index 8c2b3b577..952c8a71e 100644 --- a/src/modules/04_registryNew/components/detail/PersonalInformation/01_Profile.vue +++ b/src/modules/04_registryNew/components/detail/PersonalInformation/01_Profile.vue @@ -267,6 +267,12 @@ async function getData() { }); } +const calculateMaxDate = () => { + const today = new Date(); + today.setFullYear(today.getFullYear() - 18); + return today; +}; + async function editData() { showLoader(); await http @@ -550,7 +556,9 @@ onMounted(async () => {
Date: Mon, 1 Apr 2024 10:07:28 +0700 Subject: [PATCH 3/4] =?UTF-8?q?=E0=B8=97=E0=B8=B0=E0=B9=80=E0=B8=9A?= =?UTF-8?q?=E0=B8=B5=E0=B8=A2=E0=B8=99=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=A7?= =?UTF-8?q?=E0=B8=B1=E0=B8=95=E0=B8=B4:=20=E0=B8=9B=E0=B8=A3=E0=B8=B0?= =?UTF-8?q?=E0=B8=A7=E0=B8=B1=E0=B8=95=E0=B8=B4=E0=B8=AA=E0=B9=88=E0=B8=A7?= =?UTF-8?q?=E0=B8=99=E0=B8=95=E0=B8=B1=E0=B8=A7=20=E0=B8=A5=E0=B8=9A?= =?UTF-8?q?=E0=B8=82=E0=B9=89=E0=B8=AD=E0=B8=A1=E0=B8=B9=E0=B8=A5=E0=B9=80?= =?UTF-8?q?=E0=B8=81=E0=B8=B4=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/detail/PersonalInformation/01_Profile.vue | 1 - src/modules/04_registryNew/interface/request/Profile.ts | 4 ---- src/modules/04_registryNew/stores/profile.ts | 4 ---- 3 files changed, 9 deletions(-) diff --git a/src/modules/04_registryNew/components/detail/PersonalInformation/01_Profile.vue b/src/modules/04_registryNew/components/detail/PersonalInformation/01_Profile.vue index 952c8a71e..996adf546 100644 --- a/src/modules/04_registryNew/components/detail/PersonalInformation/01_Profile.vue +++ b/src/modules/04_registryNew/components/detail/PersonalInformation/01_Profile.vue @@ -278,7 +278,6 @@ async function editData() { await http .put(config.API.profileNewProfileById(id.value), { ...formData, - dateRetire: store.retireDate, }) .then((res) => { success($q, "บันทึกข้อมูลสำเร็จ"); diff --git a/src/modules/04_registryNew/interface/request/Profile.ts b/src/modules/04_registryNew/interface/request/Profile.ts index a9732ab0b..46dcb7a8c 100644 --- a/src/modules/04_registryNew/interface/request/Profile.ts +++ b/src/modules/04_registryNew/interface/request/Profile.ts @@ -2,19 +2,15 @@ interface RequestObject { birthDate: Date | null; bloodGroup: string | null; citizenId: string; - dateRetire: Date | null; email: string | null; ethnicity: string | null; firstName: string; gender: string | null; - isProbation: boolean; - keycloak: string; lastName: string; nationality: string | null; phone: string | null; posLevelId: string; posTypeId: string; - position: string; prefix: string; rank: string | null; relationship: string | null; diff --git a/src/modules/04_registryNew/stores/profile.ts b/src/modules/04_registryNew/stores/profile.ts index 195a099d0..590e43e9b 100644 --- a/src/modules/04_registryNew/stores/profile.ts +++ b/src/modules/04_registryNew/stores/profile.ts @@ -36,12 +36,8 @@ export const useProfileDataStore = defineStore("profile", () => { nationality: null, ethnicity: null, birthDate: null, - dateRetire: null, - isProbation: false, - keycloak: "", phone: null, email: null, - position: "", lastName: "", firstName: "", prefix: "", From f4f3174de1b0ab7b183cf67c0c7a28681ff6f6f2 Mon Sep 17 00:00:00 2001 From: "STW_TTTY\\stwtt" Date: Mon, 1 Apr 2024 11:21:55 +0700 Subject: [PATCH 4/4] no message --- src/api/registry/api.profile.ts | 1 + .../04_registry/components/TableProfile.vue | 40 ++++++++++++++----- src/modules/04_registry/views/Main.vue | 32 ++++++++++++--- 3 files changed, 56 insertions(+), 17 deletions(-) diff --git a/src/api/registry/api.profile.ts b/src/api/registry/api.profile.ts index 60d6650be..ca388d7cd 100644 --- a/src/api/registry/api.profile.ts +++ b/src/api/registry/api.profile.ts @@ -212,4 +212,5 @@ export default { /**ปรับรายการเงินเดือนขึ้น-ลง*/ salarySwap: (dierction: string, id: string) => `${profile}salary/swap/${dierction}/${id}`, + listProfileNew:(id:string,page:number,pageSize:number)=>`${profile}search/new-page/oc/${id}/officer?page=${page}&pageSize=${pageSize}` }; diff --git a/src/modules/04_registry/components/TableProfile.vue b/src/modules/04_registry/components/TableProfile.vue index 7f97f0cc0..f4a9f1e66 100644 --- a/src/modules/04_registry/components/TableProfile.vue +++ b/src/modules/04_registry/components/TableProfile.vue @@ -11,19 +11,19 @@ dense virtual-scroll :virtual-scroll-sticky-size-start="48" - :rows-per-page-options="[10, 25, 50, 100]" + :pagination-label="paginationLabel" v-model:pagination="pagination" > -