From 4774fadf95cad17f61531c55554c0eefccf89311 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 14 Jan 2025 15:34:04 +0700 Subject: [PATCH 1/5] =?UTF-8?q?fix=20mindate=20=E0=B8=A5=E0=B8=B9=E0=B8=81?= =?UTF-8?q?=E0=B8=88=E0=B9=89=E0=B8=B2=E0=B8=87=E0=B8=8A=E0=B8=B1=E0=B9=88?= =?UTF-8?q?=E0=B8=A7=E0=B8=84=E0=B8=A3=E0=B8=B2=E0=B8=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/DialogAddEmployee.vue | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/modules/08_registryEmployee/components/DialogAddEmployee.vue b/src/modules/08_registryEmployee/components/DialogAddEmployee.vue index 1da8f2be4..59ec45930 100644 --- a/src/modules/08_registryEmployee/components/DialogAddEmployee.vue +++ b/src/modules/08_registryEmployee/components/DialogAddEmployee.vue @@ -223,15 +223,20 @@ function filterSelector(val: string, update: Function, refData: string) { } } -/** - * ฟังก์ชันคำนวนอายุ - */ +/** ฟังก์ชันคำนวนอายุ*/ function calculateMaxDate() { const today = new Date(); today.setFullYear(today.getFullYear() - 18); return today; } +/** function เช็คอายุไม่เกิน 60 ปี*/ +function calculateMinDate() { + const today = new Date(); + today.setFullYear(today.getFullYear() - 60); // ลดปีลงไป 60 ปี + return today; +} + /** * ฟังก์ชันบันทึกข้อมูลลูกจ้างชั่วคราว */ @@ -390,6 +395,7 @@ watch( Date: Wed, 15 Jan 2025 16:10:21 +0700 Subject: [PATCH 2/5] fix size Profile --- src/modules/04_registryPerson/views/detailView.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/04_registryPerson/views/detailView.vue b/src/modules/04_registryPerson/views/detailView.vue index a06fa80b6..1ca8790e8 100644 --- a/src/modules/04_registryPerson/views/detailView.vue +++ b/src/modules/04_registryPerson/views/detailView.vue @@ -168,8 +168,8 @@ function resizeImage(file: File): Promise { img.onload = () => { const canvas = document.createElement("canvas"); const ctx = canvas.getContext("2d"); - const width = 150; - const height = 200; + const width = 354; + const height = 472; // ปรับขนาดภาพ canvas.width = width; @@ -1111,7 +1111,7 @@ onMounted(async () => { From c4596b89980c16e487f159d3bd27722ba9badda2 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 15 Jan 2025 16:20:26 +0700 Subject: [PATCH 3/5] =?UTF-8?q?fix=20columns=20=E0=B8=88=E0=B8=B1=E0=B8=94?= =?UTF-8?q?=E0=B8=A5=E0=B8=B3=E0=B8=94=E0=B8=B1=E0=B8=9A=E0=B8=81=E0=B8=B2?= =?UTF-8?q?=E0=B8=A3=E0=B9=81=E0=B8=AA=E0=B8=94=E0=B8=87=E0=B8=9C=E0=B8=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DialogSortEducation.vue | 163 +++++++++--------- 1 file changed, 82 insertions(+), 81 deletions(-) diff --git a/src/modules/04_registryPerson/components/detail/PersonalInformation/DialogSortEducation.vue b/src/modules/04_registryPerson/components/detail/PersonalInformation/DialogSortEducation.vue index 0b9f5578a..c1960f4c4 100644 --- a/src/modules/04_registryPerson/components/detail/PersonalInformation/DialogSortEducation.vue +++ b/src/modules/04_registryPerson/components/detail/PersonalInformation/DialogSortEducation.vue @@ -108,18 +108,7 @@ const columns = ref([ sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, - { - name: "isEducation", - align: "left", - label: "เป็นวุฒิการศึกษาในตำแหน่ง", - sortable: true, - field: "isEducation", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - format: (v) => (v === true ? "ใช่" : "ไม่ใช่"), - sort: (a: string, b: string) => - a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), - }, + { name: "degree", align: "left", @@ -143,82 +132,94 @@ const columns = ref([ a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { - name: "fundName", + name: "isEducation", align: "left", - label: "ทุน", + label: "เป็นวุฒิการศึกษาในตำแหน่ง", sortable: true, - field: "fundName", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - sort: (a: string, b: string) => - a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), - }, - { - name: "gpa", - align: "left", - label: "เกรดเฉลี่ย", - sortable: true, - field: "gpa", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - sort: (a: string, b: string) => - a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), - }, - { - name: "country", - align: "left", - label: "ประเทศ", - sortable: true, - field: "country", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - sort: (a: string, b: string) => - a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), - }, - { - name: "other", - align: "left", - label: "ข้อมูลการติดต่อ", - sortable: true, - field: "other", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - sort: (a: string, b: string) => - a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), - }, - { - name: "duration", - align: "left", - label: "ระยะเวลา", - sortable: true, - field: "duration", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - sort: (a: string, b: string) => - a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), - }, - { - name: "durationYear", - align: "left", - label: "ระยะเวลาหลักสูตร (ปี)", - sortable: true, - field: "durationYear", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - sort: (a: string, b: string) => - a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), - }, - { - name: "note", - align: "left", - label: "หมายเหตุ", - sortable: true, - field: "note", + field: "isEducation", headerStyle: "font-size: 14px", style: "font-size: 14px", + format: (v) => (v === true ? "ใช่" : "ไม่ใช่"), sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, + // { + // name: "fundName", + // align: "left", + // label: "ทุน", + // sortable: true, + // field: "fundName", + // headerStyle: "font-size: 14px", + // style: "font-size: 14px", + // sort: (a: string, b: string) => + // a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + // }, + // { + // name: "gpa", + // align: "left", + // label: "เกรดเฉลี่ย", + // sortable: true, + // field: "gpa", + // headerStyle: "font-size: 14px", + // style: "font-size: 14px", + // sort: (a: string, b: string) => + // a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + // }, + // { + // name: "country", + // align: "left", + // label: "ประเทศ", + // sortable: true, + // field: "country", + // headerStyle: "font-size: 14px", + // style: "font-size: 14px", + // sort: (a: string, b: string) => + // a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + // }, + // { + // name: "other", + // align: "left", + // label: "ข้อมูลการติดต่อ", + // sortable: true, + // field: "other", + // headerStyle: "font-size: 14px", + // style: "font-size: 14px", + // sort: (a: string, b: string) => + // a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + // }, + // { + // name: "duration", + // align: "left", + // label: "ระยะเวลา", + // sortable: true, + // field: "duration", + // headerStyle: "font-size: 14px", + // style: "font-size: 14px", + // sort: (a: string, b: string) => + // a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + // }, + // { + // name: "durationYear", + // align: "left", + // label: "ระยะเวลาหลักสูตร (ปี)", + // sortable: true, + // field: "durationYear", + // headerStyle: "font-size: 14px", + // style: "font-size: 14px", + // sort: (a: string, b: string) => + // a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + // }, + // { + // name: "note", + // align: "left", + // label: "หมายเหตุ", + // sortable: true, + // field: "note", + // headerStyle: "font-size: 14px", + // style: "font-size: 14px", + // sort: (a: string, b: string) => + // a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + // }, ]); /** * fiunction จัดลำดับ From 7f004f48d151dcb72c0585686f982be6d948a41a Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Thu, 16 Jan 2025 14:20:05 +0700 Subject: [PATCH 4/5] =?UTF-8?q?fix=20=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=A7?= =?UTF-8?q?=E0=B8=B1=E0=B8=95=E0=B8=B4=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=A8?= =?UTF-8?q?=E0=B8=B6=E0=B8=81=E0=B8=A9=E0=B8=B2=E0=B8=9A=E0=B8=A3=E0=B8=A3?= =?UTF-8?q?=E0=B8=88=E0=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/PersonalDetail/DetailMain.vue | 26 +++++++++---------- .../PersonalDetail/Information/Certicate.vue | 4 +-- .../PersonalDetail/Information/Education.vue | 14 +++++++--- .../05_placement/interface/index/Main.ts | 4 +-- 4 files changed, 27 insertions(+), 21 deletions(-) diff --git a/src/modules/05_placement/components/PersonalDetail/DetailMain.vue b/src/modules/05_placement/components/PersonalDetail/DetailMain.vue index 4b75284f9..0e5bf0ce5 100644 --- a/src/modules/05_placement/components/PersonalDetail/DetailMain.vue +++ b/src/modules/05_placement/components/PersonalDetail/DetailMain.vue @@ -224,22 +224,22 @@ async function fetchData() { data.education.map((row: any) => { listRow.push({ id: guidCheck(row.id) ?? "", - educationLevel: row.educationLevel ?? "", - educationLevelId: guidCheck(row.educationLevelId) ?? "", - institute: row.institute ?? "", - degree: row.degree ?? "", - field: row.field ?? "", - gpa: row.gpa ?? "", - country: row.country ?? "", - duration: row.duration ?? "", - other: row.other ?? "", - fundName: row.fundName ?? "", + educationLevel: row.educationLevel ?? "-", + educationLevelId: guidCheck(row.educationLevelId) ?? "-", + institute: row.institute ?? "-", + degree: row.degree ?? "-", + field: row.field ?? "-", + gpa: row.gpa ?? "-", + country: row.country ?? "-", + duration: row.duration ?? "-", + other: row.other ?? "-", + fundName: row.fundName ?? "-", durationYear: row.durationYear ?? 0, finishDate: row.finishDate ?? new Date(), isDate: row.isDate ? "true" : "false", - startDate: row.startDate ? new Date(row.startDate) : new Date(), - endDate: row.endDate ? new Date(row.endDate) : new Date(), - positionPath: row.positionPath ?? "", + startDate: row.startDate ? new Date(row.startDate) : "", + endDate: row.endDate ? new Date(row.endDate) : "", + positionPath: row.positionPath ?? "-", isEducation: row.isEducation ? true : false, }); }); diff --git a/src/modules/05_placement/components/PersonalDetail/Information/Certicate.vue b/src/modules/05_placement/components/PersonalDetail/Information/Certicate.vue index e672d9044..446df1a7f 100644 --- a/src/modules/05_placement/components/PersonalDetail/Information/Certicate.vue +++ b/src/modules/05_placement/components/PersonalDetail/Information/Certicate.vue @@ -544,10 +544,10 @@ onMounted(() => { v-if="col.name == 'issueDate' || col.name == 'expireDate'" class="table_ellipsis" > - {{ date2Thai(col.value) }} + {{ col.value ? date2Thai(col.value) : "-" }}
- {{ col.value }} + {{ col.value ? col.value : "-" }}
diff --git a/src/modules/05_placement/components/PersonalDetail/Information/Education.vue b/src/modules/05_placement/components/PersonalDetail/Information/Education.vue index d9ab751de..1cd7825b1 100644 --- a/src/modules/05_placement/components/PersonalDetail/Information/Education.vue +++ b/src/modules/05_placement/components/PersonalDetail/Information/Education.vue @@ -696,7 +696,9 @@ watch(visibleColumns, (count: String[], prevCount: String[]) => { onMounted(async () => { await fetchLevel(); await fetchPositionPath(); + rows.value = props.data; + rowsData.value = props.data; });