diff --git a/src/assets/05_modules.pdf b/src/assets/05_modules.pdf new file mode 100644 index 000000000..74cddeb33 Binary files /dev/null and b/src/assets/05_modules.pdf differ diff --git a/src/modules/05_placement/components/OrderPlacement/step/step04.vue b/src/modules/05_placement/components/OrderPlacement/step/step04.vue index 62502cd72..d7521a80d 100644 --- a/src/modules/05_placement/components/OrderPlacement/step/step04.vue +++ b/src/modules/05_placement/components/OrderPlacement/step/step04.vue @@ -439,9 +439,7 @@ onMounted(async () => { // myEventHandler(e); // }); - const pdfData = usePDF( - "https://raw.githubusercontent.com/mozilla/pdf.js/ba2edeae/web/compressed.tracemonkey-pldi-09.pdf" - ); + const pdfData = usePDF("/src/assets/05_modules.pdf"); setTimeout(() => { pdfSrc.value = pdfData.pdf.value; diff --git a/src/modules/05_placement/components/PersonalDetail/Detail.vue b/src/modules/05_placement/components/PersonalDetail/Detail.vue index 826e1226a..940f34337 100644 --- a/src/modules/05_placement/components/PersonalDetail/Detail.vue +++ b/src/modules/05_placement/components/PersonalDetail/Detail.vue @@ -101,6 +101,13 @@ onMounted(async () => { await changeTab("information"); }); +const guidCheck = (id: string) => { + if (id == "0000-0000-0000-0000") { + return null; + } + return id; +}; + const fetchData = async () => { showLoader(); await http @@ -118,11 +125,12 @@ const fetchData = async () => { InformationData.value.lastname = data.lastname; InformationData.value.nationality = data.nationality; InformationData.value.race = data.race; - InformationData.value.genderId = data.genderId; - InformationData.value.prefixId = data.prefixId; - InformationData.value.relationshipId = data.relationshipId; - InformationData.value.religionId = data.religionId; - InformationData.value.bloodGroupId = data.bloodGroupId; + InformationData.value.genderId = guidCheck(data.genderId) ?? ""; + InformationData.value.prefixId = guidCheck(data.prefixId) ?? ""; + InformationData.value.relationshipId = + guidCheck(data.relationshipId) ?? ""; + InformationData.value.religionId = guidCheck(data.religionId) ?? ""; + InformationData.value.bloodGroupId = guidCheck(data.bloodGroupId) ?? ""; InformationData.value.dateOfBirth = new Date(data.dateOfBirth); InformationData.value.age = data.age; InformationData.value.telephone = data.telephone; @@ -131,33 +139,39 @@ const fetchData = async () => { AddressData.value.currentAddress = data.currentAddress ?? ""; AddressData.value.registSame = data.registSame ? "1" : "0"; AddressData.value.registSubDistrict = data.registSubDistrict ?? ""; - AddressData.value.registSubDistrictId = data.registSubDistrictId ?? ""; + AddressData.value.registSubDistrictId = + guidCheck(data.registSubDistrictId) ?? ""; AddressData.value.registZipCode = data.registZipCode ?? ""; AddressData.value.registDistrict = data.registDistrict ?? ""; - AddressData.value.registDistrictId = data.registDistrictId ?? ""; + AddressData.value.registDistrictId = + guidCheck(data.registDistrictId) ?? ""; AddressData.value.registProvince = data.registProvince ?? ""; - AddressData.value.registProvinceId = data.registProvinceId ?? ""; + AddressData.value.registProvinceId = + guidCheck(data.registProvinceId) ?? ""; AddressData.value.currentSubDistrict = data.currentSubDistrict ?? ""; - AddressData.value.currentSubDistrictId = data.currentSubDistrictId ?? ""; + AddressData.value.currentSubDistrictId = + guidCheck(data.currentSubDistrictId) ?? ""; AddressData.value.currentZipCode = data.currentZipCode ?? ""; AddressData.value.currentDistrict = data.currentDistrict ?? ""; - AddressData.value.currentDistrictId = data.currentDistrictId ?? ""; + AddressData.value.currentDistrictId = + guidCheck(data.currentDistrictId) ?? ""; AddressData.value.currentProvince = data.currentProvince ?? ""; - AddressData.value.currentProvinceId = data.currentProvinceId ?? ""; + AddressData.value.currentProvinceId = + guidCheck(data.currentProvinceId) ?? ""; FamilyData.value.couple = data.couple ? "1" : "0"; FamilyData.value.marryPrefix = data.marryPrefix ?? ""; - FamilyData.value.marryPrefixId = data.marryPrefixId ?? ""; + FamilyData.value.marryPrefixId = guidCheck(data.marryPrefixId) ?? ""; FamilyData.value.marryFirstName = data.marryFirstName ?? ""; FamilyData.value.marryLastName = data.marryLastName ?? ""; FamilyData.value.marryOccupation = data.marryOccupation ?? ""; FamilyData.value.fatherPrefix = data.fatherPrefix ?? ""; - FamilyData.value.fatherPrefixId = data.fatherPrefixId ?? ""; + FamilyData.value.fatherPrefixId = guidCheck(data.fatherPrefixId) ?? ""; FamilyData.value.fatherFirstName = data.fatherFirstName ?? ""; FamilyData.value.fatherLastName = data.fatherLastName ?? ""; FamilyData.value.fatherOccupation = data.fatherOccupation ?? ""; FamilyData.value.motherPrefix = data.motherPrefix ?? ""; - FamilyData.value.motherPrefixId = data.motherPrefixId ?? ""; + FamilyData.value.motherPrefixId = guidCheck(data.motherPrefixId) ?? ""; FamilyData.value.motherFirstName = data.motherFirstName ?? ""; FamilyData.value.motherLastName = data.motherLastName ?? ""; FamilyData.value.motherOccupation = data.motherOccupation ?? ""; @@ -179,8 +193,9 @@ const fetchData = async () => { let listRow: Education[] = []; data.education.map((row: any) => { listRow.push({ - id: row.id ?? "", + id: guidCheck(row.id) ?? "", educationLevel: row.educationLevel ?? "", + educationLevelId: guidCheck(row.educationLevelId) ?? "", institute: row.institute ?? "", degree: row.degree ?? "", field: row.field ?? "", @@ -191,11 +206,11 @@ const fetchData = async () => { fundName: row.fundName ?? "", durationYear: row.durationYear ?? 0, finishDate: row.finishDate ?? new Date(), - isDate: row.isDate ?? "", - startDate: row.startDate ? new Date(row.startDate).getFullYear() : 0, - endDate: row.endDate ? new Date(row.endDate).getFullYear() : 0, + 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 ?? "", + isEducation: row.isEducation ? true : false, }); }); EducationData.value = listRow; @@ -204,8 +219,8 @@ const fetchData = async () => { data.certificates.map((row: any) => { listCert.push({ - id: row.id ?? "", - certificateNo: row.certificateNo ?? "", + 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(), diff --git a/src/modules/05_placement/components/PersonalDetail/DialogFooter.vue b/src/modules/05_placement/components/PersonalDetail/DialogFooter.vue index ff597bd8f..991f13be7 100644 --- a/src/modules/05_placement/components/PersonalDetail/DialogFooter.vue +++ b/src/modules/05_placement/components/PersonalDetail/DialogFooter.vue @@ -4,6 +4,7 @@ const props = defineProps({ next: Boolean, previous: Boolean, modalEdit: Boolean, + delete: Boolean, clickNext: { type: Function, default: () => console.log("not function"), @@ -67,57 +68,64 @@ const clickPrevious = async () => { - @@ -1038,94 +819,219 @@ const getClass = (val: boolean) => { @update:modelValue="clickEditRow" /> -
- - - - - -
-
- - - - - + :disable="!edit" + /> +
+
+
+ + + + + + + + + + +
+
+ + + + + + + + + + +
+
+
{
-
+
{ :clickNext="clickNext" :clickPrevious="clickPrevious" :clickDelete="clickDelete" + :delete="isEducation" v-model:editvisible="edit" v-model:next="next" v-model:previous="previous" @@ -1334,38 +1240,6 @@ const getClass = (val: boolean) => { - - -