From 7afafb68e5fcf3f2620f27b4cbba15de6e747c3c Mon Sep 17 00:00:00 2001 From: "STW_TTTY\\stwtt" Date: Mon, 20 May 2024 10:49:45 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A=E0=B8=AB?= =?UTF-8?q?=E0=B8=99=E0=B9=89=E0=B8=B2=E0=B8=A3=E0=B8=B2=E0=B8=A2=E0=B8=A5?= =?UTF-8?q?=E0=B8=B0=E0=B9=80=E0=B8=AD=E0=B8=B5=E0=B8=A2=E0=B8=94=E0=B8=82?= =?UTF-8?q?=E0=B8=AD=E0=B8=87=E0=B8=9C=E0=B8=B9=E0=B9=89=E0=B8=AA=E0=B8=AD?= =?UTF-8?q?=E0=B8=9A=E0=B8=9C=E0=B9=88=E0=B8=B2=E0=B8=99=20=E0=B9=83?= =?UTF-8?q?=E0=B8=AB=E0=B9=89=E0=B9=80=E0=B8=9B=E0=B9=87=E0=B8=99=E0=B8=82?= =?UTF-8?q?=E0=B9=89=E0=B8=AD=E0=B8=A1=E0=B8=B9=E0=B8=A5=E0=B8=AB=E0=B8=A5?= =?UTF-8?q?=E0=B8=B1=E0=B8=81=E0=B8=88=E0=B8=B2=E0=B8=81=E0=B8=A3=E0=B8=B0?= =?UTF-8?q?=E0=B8=9A=E0=B8=9A=E0=B9=83=E0=B8=AB=E0=B8=A1=E0=B9=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/PersonalDetail/Detail.vue | 104 +++++++++--------- .../components/PersonalDetail/Education.vue | 47 ++++---- .../PersonalDetail/Information/Address.vue | 16 ++- .../PersonalDetail/Information/Certicate.vue | 103 ++++++++--------- .../PersonalDetail/Information/Family.vue | 40 +++++-- .../Information/Information.vue | 3 +- .../PersonalDetail/Qualification.vue | 64 +++++++---- 7 files changed, 204 insertions(+), 173 deletions(-) diff --git a/src/modules/05_placement/components/PersonalDetail/Detail.vue b/src/modules/05_placement/components/PersonalDetail/Detail.vue index 1185f776d..e492e8315 100644 --- a/src/modules/05_placement/components/PersonalDetail/Detail.vue +++ b/src/modules/05_placement/components/PersonalDetail/Detail.vue @@ -23,7 +23,6 @@ import Document from "@/modules/05_placement/components/PersonalDetail/Informati import { AddressDataDefualt, FamilyDataDefualt, - } from "@/modules/05_placement/interface/index/Main"; import type { @@ -34,7 +33,7 @@ import type { Address, Certificate, optionData, - InformationOps + InformationOps, } from "@/modules/05_placement/interface/index/Main"; import type { Information } from "@/modules/05_placement/components/PersonalDetail/profileType"; @@ -102,8 +101,6 @@ const FamilyData = ref(FamilyDataDefualt); const AddressData = ref
(AddressDataDefualt); const CertificateData = ref([]); - - const guidCheck = (id: string) => { if (id == "00000000-0000-0000-0000-000000000000") { return null; @@ -265,8 +262,7 @@ const fetchData = async () => { .catch((e: any) => { messageError($q, e); }) - .finally(() => { - }); + .finally(() => {}); }; const fetchDataByType = async (type: string) => { @@ -349,48 +345,48 @@ const fetchDataByType = async (type: string) => { ExamData.value.examNumber = data.examNumber; ExamData.value.examRound = data.examRound; ExamData.value.pass = data.pass; + } else if (type == "Certificate") { + let listCert: Certificate[] = []; + + data.certificates.map((row: any) => { + listCert.push({ + id: guidCheck(row.id) ?? "", + certificateNo: guidCheck(row.certificateNo) ?? "", + issuer: row.issuer ?? "", + issueDate: new Date(row.issueDate) ?? new Date(), + expireDate: new Date(row.expireDate) ?? new Date(), + certificateType: row.certificateType ?? "", + }); + }); + CertificateData.value = listCert; + } else if (type == "Education") { + let listRow: Education[] = []; + 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 ?? "", + 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 ?? "", + isEducation: row.isEducation ? true : false, + }); + }); + EducationData.value = listRow; + } else if (type == "Qualification") { + QualificationData.value = data.isProperty; } - - QualificationData.value = data.isProperty; - - let listRow: Education[] = []; - 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 ?? "", - 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 ?? "", - isEducation: row.isEducation ? true : false, - }); - }); - EducationData.value = listRow; - - let listCert: Certificate[] = []; - - data.certificates.map((row: any) => { - listCert.push({ - id: guidCheck(row.id) ?? "", - certificateNo: guidCheck(row.certificateNo) ?? "", - issuer: row.issuer ?? "", - issueDate: new Date(row.issueDate) ?? new Date(), - expireDate: new Date(row.expireDate) ?? new Date(), - certificateType: row.certificateType ?? "", - }); - }); - CertificateData.value = listCert; }) .catch((e: any) => { messageError($q, e); @@ -403,7 +399,7 @@ const fetchDataByType = async (type: string) => { /** * get รายการ ข้อมูลเกี่ยวกับบุคคล */ - const fetchPerson = async () => { +const fetchPerson = async () => { await http .get(config.API.profileNewMetaMain) .then((res) => { @@ -465,8 +461,7 @@ const fetchDataByType = async (type: string) => { OpsFilter.value.religionOps = optionreligions; }) .catch((e: any) => {}) - .finally(() => { - }); + .finally(() => {}); }; onMounted(async () => { @@ -474,9 +469,8 @@ onMounted(async () => { await fetchData(); await changeTab("information"); - await fetchPerson() + await fetchPerson(); }); -