diff --git a/src/components/Dialogs/DialogOrgSelect.vue b/src/components/Dialogs/DialogOrgSelect.vue index 338b585f1..a491e8249 100644 --- a/src/components/Dialogs/DialogOrgSelect.vue +++ b/src/components/Dialogs/DialogOrgSelect.vue @@ -292,6 +292,7 @@ async function getDataTable(id: string, level: number = 0) { node: e.node, nodeId: e.nodeId, isCondition: e.isCondition, + isDirector: e.isDirector, })); positionNo.value = listPosNo; diff --git a/src/components/Dialogs/DialogOrgSelectEmployee.vue b/src/components/Dialogs/DialogOrgSelectEmployee.vue index a58baf3b9..50bdd1afa 100644 --- a/src/components/Dialogs/DialogOrgSelectEmployee.vue +++ b/src/components/Dialogs/DialogOrgSelectEmployee.vue @@ -277,6 +277,7 @@ async function getDataTable(id: string, level: number = 0) { node: e.node, nodeId: e.nodeId, isCondition: e.isCondition, + isDirector: e.isDirector, })); positionNo.value = listPosNo; diff --git a/src/interface/request/orgSelect/org.ts b/src/interface/request/orgSelect/org.ts index 326c38b7c..21ce503e1 100644 --- a/src/interface/request/orgSelect/org.ts +++ b/src/interface/request/orgSelect/org.ts @@ -73,6 +73,7 @@ interface PositionMain { node: number; nodeId: string; isCondition: boolean; + isDirector: boolean; } interface PositionNo { 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 จัดลำดับ 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 () => { 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; });