From d092e8311d6c414bda37ed6fac1f0651a1033041 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 17 Dec 2024 18:24:04 +0700 Subject: [PATCH 1/8] =?UTF-8?q?fix=20=E0=B9=82=E0=B8=84=E0=B8=A3=E0=B8=87?= =?UTF-8?q?=E0=B8=AA=E0=B8=A3=E0=B9=89=E0=B8=B2=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/StructureMain.vue | 26 +++++++++++++------ .../components/StructureOrgMain.vue | 26 +++++++++++++------ 2 files changed, 36 insertions(+), 16 deletions(-) diff --git a/src/modules/02_organization/components/StructureMain.vue b/src/modules/02_organization/components/StructureMain.vue index 65c9c42cd..9a007522e 100644 --- a/src/modules/02_organization/components/StructureMain.vue +++ b/src/modules/02_organization/components/StructureMain.vue @@ -23,18 +23,28 @@ const scrollContainer = ref(null); /** function ดาวน์โหลดไฟล์โครงสร้าง PNG*/ async function savePNG() { - showLoader(); - await scrollToCenter(); - await chartRef.value.savePNG(); - hideLoader(); + try { + showLoader(); + await scrollToCenter(); + await chartRef.value.savePNG(); + } catch { + messageError($q); + } finally { + hideLoader(); + } } /** function ดาวน์โหลดไฟล์โครงสร้าง PDF*/ async function savePDF() { - showLoader(); - await scrollToCenter(); - await chartRef.value.savePDF(); - hideLoader(); + try { + showLoader(); + await scrollToCenter(); + await chartRef.value.savePDF(); + } catch { + messageError($q); + } finally { + hideLoader(); + } } /** diff --git a/src/modules/02_organization/components/StructureOrgMain.vue b/src/modules/02_organization/components/StructureOrgMain.vue index 374fe8546..3abaab272 100644 --- a/src/modules/02_organization/components/StructureOrgMain.vue +++ b/src/modules/02_organization/components/StructureOrgMain.vue @@ -98,18 +98,28 @@ async function refreshChart(data: any) { /** โหลด Chart รูป*/ async function savePNG() { - showLoader(); - await scrollToCenter(); - await chartRef.value.savePNG(); - hideLoader(); + try { + showLoader(); + await scrollToCenter(); + await chartRef.value.savePNG(); + } catch { + messageError($q); + } finally { + hideLoader(); + } } /** โหลด Chart PDF*/ async function savePDF() { - showLoader(); - await scrollToCenter(); - await chartRef.value.savePDF(); - hideLoader(); + try { + showLoader(); + await scrollToCenter(); + await chartRef.value.savePDF(); + } catch { + messageError($q); + } finally { + hideLoader(); + } } watch( From 4d0137749c4af365fa868c52b43f7df4ea8354da Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 18 Dec 2024 11:22:38 +0700 Subject: [PATCH 2/8] =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B9=80?= =?UTF-8?q?=E0=B8=A1=E0=B8=B4=E0=B8=99=E0=B8=9A=E0=B8=B8=E0=B8=84=E0=B8=84?= =?UTF-8?q?=E0=B8=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Detail/viewstep/tableStep1.vue | 17 +++ .../components/Detail/viewstep/viewStep1.vue | 63 +++++++---- .../store/EvaluateDetail.ts | 104 +++++++++++++++--- 3 files changed, 144 insertions(+), 40 deletions(-) diff --git a/src/modules/12_evaluatePersonal/components/Detail/viewstep/tableStep1.vue b/src/modules/12_evaluatePersonal/components/Detail/viewstep/tableStep1.vue index 73d9001d6..1bb0da6c4 100644 --- a/src/modules/12_evaluatePersonal/components/Detail/viewstep/tableStep1.vue +++ b/src/modules/12_evaluatePersonal/components/Detail/viewstep/tableStep1.vue @@ -23,6 +23,23 @@ const props = defineProps({ virtual-scroll class="row col-12" > + + + diff --git a/src/modules/12_evaluatePersonal/components/Detail/viewstep/viewStep1.vue b/src/modules/12_evaluatePersonal/components/Detail/viewstep/viewStep1.vue index 244a78daa..c7759be51 100644 --- a/src/modules/12_evaluatePersonal/components/Detail/viewstep/viewStep1.vue +++ b/src/modules/12_evaluatePersonal/components/Detail/viewstep/viewStep1.vue @@ -20,7 +20,7 @@ const { columnsCertificates, columnSalaries, columnTraining, - columnProjectsProposed, + columnAssessments, } = store; const { date2Thai, showLoader, hideLoader } = mixin; @@ -42,7 +42,7 @@ const formDetail = reactive({ position: "", //ตำแหน่ง oc: "", //สังกัด salary: "", //เงินเดือน - positionLevel: "", //ระดับปัจจุบัน,ระดับที่ประเมิน + positionLevel: "", //ระดับปัจจุบัน,ระดับที่ประเมิน posNo: "", //ตำแหน่งเลขที่ birthDate: "", //วันเดือนปีเกิด govAge: "", //อายุราชการ @@ -60,20 +60,20 @@ function formattedNumber(x: number) { onMounted(() => { if (props.data) { showLoader(); - formDetail.prefix = props.data.prefix; - formDetail.fullName = props.data.fullName; - formDetail.position = props.data.position; - formDetail.oc = props.data.oc; + formDetail.prefix = props.data.prefix ?? "-"; + formDetail.fullName = props.data.fullName ?? "-"; + formDetail.position = props.data.position ?? "-"; + formDetail.oc = props.data.oc ?? "-"; formDetail.salary = props.data.salary ? formattedNumber(props.data.salary) : "-"; - formDetail.positionLevel = props.data.positionLevel; - formDetail.posNo = props.data.posNo; - formDetail.birthDate = - props.data.birthDate && date2Thai(props.data.birthDate); - formDetail.govAge = props.data.govAge; + formDetail.positionLevel = props.data.positionLevel ?? "-"; + formDetail.posNo = props.data.posNo ?? "-"; + formDetail.birthDate = props.data.birthDate + ? date2Thai(props.data.birthDate) + : "-"; + formDetail.govAge = props.data.govAge ?? "-"; formDetail.educations = props.data.educations; - formDetail.certificates = props.data.certificates ? props.data.certificates.map((e: CertificatesForm) => ({ certificateNo: e.certificateNo, @@ -255,7 +255,9 @@ onMounted(() => { @@ -264,7 +266,7 @@ onMounted(() => { @@ -272,7 +274,9 @@ onMounted(() => {
@@ -282,7 +286,9 @@ onMounted(() => {
@@ -291,7 +297,9 @@ onMounted(() => {
@@ -311,7 +319,7 @@ onMounted(() => {
@@ -320,7 +328,7 @@ onMounted(() => {
@@ -328,7 +336,7 @@ onMounted(() => {
@@ -337,7 +345,7 @@ onMounted(() => { @@ -346,10 +354,16 @@ onMounted(() => { +
+ +
ไม่มีประวัติการศึกษา
@@ -403,7 +417,10 @@ onMounted(() => {
- +
diff --git a/src/modules/12_evaluatePersonal/store/EvaluateDetail.ts b/src/modules/12_evaluatePersonal/store/EvaluateDetail.ts index e349d1a36..2887fdca6 100644 --- a/src/modules/12_evaluatePersonal/store/EvaluateDetail.ts +++ b/src/modules/12_evaluatePersonal/store/EvaluateDetail.ts @@ -1,8 +1,13 @@ import { defineStore } from "pinia"; import { ref } from "vue"; +import { useCounterMixin } from "@/stores/mixin"; + import type { QTableProps } from "quasar"; +const mixin = useCounterMixin(); +const { date2Thai } = mixin; + export const useEvaluateDetailStore = defineStore("evaluateDetailStore", () => { const tabMenu = ref("1"); const step = ref(1); @@ -237,54 +242,119 @@ export const useEvaluateDetailStore = defineStore("evaluateDetailStore", () => { ]); /** คอลัมน์ ผลงานที่เคยเสนอขอประเมิน*/ - const columnProjectsProposed = ref([ + const columnAssessments = ref([ { - name: "receivedDate", - align: "center", + name: "date", + align: "left", label: "วันที่ได้รับ", sortable: true, - field: "receivedDate", + field: "date", headerStyle: "font-size: 14px", style: "font-size: 14px", + format: (v) => date2Thai(v), }, { - name: "authority", + name: "point1Total", align: "left", - label: "ผู้มีอำนาจลงนาม", + label: "ส่วนที่1 (น้ำหนัก)", sortable: true, - field: "authority", + field: "point1Total", headerStyle: "font-size: 14px", style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { - name: "datail", + name: "point1", align: "left", - label: "รายละเอียด", + label: "ผลประเมินส่วนที่1 (คะแนน)", sortable: true, - field: "detail", + field: "point1", headerStyle: "font-size: 14px", style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { - name: "orderNumber", + name: "point2Total", align: "left", - label: "เลขที่คำสั่ง", + label: "ส่วนที่2 (น้ำหนัก)", sortable: true, - field: "orderNumber", + field: "point2Total", headerStyle: "font-size: 14px", style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { - name: "doc", + name: "point2", align: "left", - label: "เอกสารอ้างอิง", + label: "ผลประเมินส่วนที่2 (คะแนน)", sortable: true, - field: "doc", + field: "point2", headerStyle: "font-size: 14px", style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, + { + name: "pointSumTotal", + align: "left", + label: "ผลรวม (น้ำหนัก)", + sortable: true, + field: "pointSumTotal", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, + { + name: "pointSum", + align: "left", + label: "ผลประเมินรวม (คะแนน)", + sortable: true, + field: "pointSum", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, + { + name: "name", + align: "left", + label: "ผลประเมิน", + sortable: true, + field: "name", + format(val, row) { + return `${textPoint(row.pointSum)} ${textRangePoint(row.pointSum)}`; + }, + headerStyle: "font-size: 14px", + style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, ]); + function textRangePoint(val: number | undefined) { + if (val == undefined) val = -1; + if (val < 60.0) return "(คะแนนต่ำกว่าร้อยละ 60.00)"; + if (val >= 60.0 && val <= 69.99) return "(คะแนนร้อยละ 60.00 - 69.99)"; + if (val >= 70.0 && val <= 79.99) return "(คะแนนร้อยละ 70.00 - 79.99)"; + if (val >= 80.0 && val <= 89.99) return " (คะแนนร้อยละ 80.00 - 89.99)"; + if (val >= 90.0) return " (คะแนนร้อยละ 90.00 ขึ้นไป)"; + else return ""; + } + + function textPoint(val: number | undefined) { + if (val == undefined) val = -1; + if (val < 60.0) return "ต้องปรับปรุง"; + if (val >= 60.0 && val <= 69.99) return "พอใช้"; + if (val >= 70.0 && val <= 79.99) return "ดี"; + if (val >= 80.0 && val <= 89.99) return "ดีมาก"; + if (val >= 90.0) return "ดีเด่น"; + else return "-"; + } + return { tabMenu, step, @@ -294,7 +364,7 @@ export const useEvaluateDetailStore = defineStore("evaluateDetailStore", () => { columnsCertificates, columnSalaries, columnTraining, - columnProjectsProposed, + columnAssessments, pdfSrcStore, urlDownloadFile, numOfPagesStore, From 7c1f4502ec3b25176824a04e93f51ada205e1c67 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Wed, 18 Dec 2024 12:02:38 +0700 Subject: [PATCH 3/8] updated api config --- .env.production | 5 +++-- src/api/index.ts | 24 +++++++++++++----------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/.env.production b/.env.production index a12fa7224..152411c46 100644 --- a/.env.production +++ b/.env.production @@ -3,5 +3,6 @@ VITE_QUALIFY_DISABLE_EMAM_PANEL=VITE_QUALIFY_DISABLE_EMAM_PANEL VITE_QUALIFY_EXAM_PANEL=VITE_QUALIFY_EXAM_PANEL VITE_API_PUBLISH_URL=VITE_API_PUBLISH_URL VITE_API_REPORT_URL=VITE_API_REPORT_URL -VITE_MANUAL_URL: VITE_MANUAL_URL -VITE_URL_SSO: VITE_URL_SSO \ No newline at end of file +VITE_MANUAL_URL=VITE_MANUAL_URL +VITE_URL_SSO=VITE_URL_SSO +VITE_API_URI_CONFIG=VITE_API_URI_CONFIG \ No newline at end of file diff --git a/src/api/index.ts b/src/api/index.ts index b29b5fb3d..b75046d0f 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -2,8 +2,10 @@ import { ref } from "vue"; const env = ref(process.env.NODE_ENV || "development"); +export const apiUrlConfig = import.meta.env.VITE_API_URI_CONFIG; export const apiUrlConfigPublish = import.meta.env.VITE_API_PUBLISH_URL; export const apiUrlConfigReport = import.meta.env.VITE_API_REPORT_URL; +export const apiUrlConfigReport2 = import.meta.env.VITE_API_URI_REPORT_CONFIG; // if (process.env.VUE_APP_TEST) { // env = "test"; // } @@ -45,22 +47,22 @@ const config = ref({ }, production: { // API_URI: "https://localhost:5010", - API_URI: `${window.location.protocol}//${window.location.host}/api/v1`, - API_URI_ORG_SERVICE: `${window.location.protocol}//${window.location.host}/api/v1`, //ใช้ชั่วคราว - API_URI_ORG_EMPLOYEE_SERVICE: `${window.location.protocol}//${window.location.host}/api/v1`, //ใช้ชั่วคราว - API_URI_PROFILE_SERVICE: `${window.location.protocol}//${window.location.host}/api/v1`, - API_CANDIDATE_URI: `${window.location.protocol}//${window.location.host}/api/v1`, - API_REPORT_URI: `${window.location.protocol}//${window.location.host}/api/v1`, - API_PLACEMENT_URI: `${window.location.protocol}//${window.location.host}/api/v1`, + API_URI: apiUrlConfig, + API_URI_ORG_SERVICE: apiUrlConfig, //ใช้ชั่วคราว + API_URI_ORG_EMPLOYEE_SERVICE: apiUrlConfig, //ใช้ชั่วคราว + API_URI_PROFILE_SERVICE: apiUrlConfig, + API_CANDIDATE_URI: apiUrlConfig, + API_REPORT_URI: apiUrlConfig, + API_PLACEMENT_URI: apiUrlConfig, API_URI_ORG_TREE: "https://s3cluster.frappet.com/bma-ehr-fpt/organization/strueture/tree_20230707_115124.json", MEET_URI: "meet.frappet.com", - API_RETIREMENT_URI: `${window.location.protocol}//${window.location.host}/api/v1`, - API_PROBATION_URI: `${window.location.protocol}//${window.location.host}/api/v1/probation`, - API_REPORT2_URI: `${window.location.protocol}//${window.location.host}/api/v2`, + API_RETIREMENT_URI: apiUrlConfig, + API_PROBATION_URI: `${apiUrlConfig}/probation`, + API_REPORT2_URI: `${apiUrlConfigReport2}`, LINK_EVALUATE_PUBLISH: apiUrlConfigPublish, API_REPORT_TEMPLATE_URI: apiUrlConfigReport, - API_SUPPORT_URI: `${window.location.protocol}//${window.location.host}/api/v1/support`, + API_SUPPORT_URI: `${apiUrlConfigPublish}/support`, }, }); From 02bfb6387cfaa25eb41b4ea61a25dda0a703876f Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 18 Dec 2024 13:18:18 +0700 Subject: [PATCH 4/8] =?UTF-8?q?fix=20=E0=B8=9A=E0=B8=B1=E0=B8=8D=E0=B8=8A?= =?UTF-8?q?=E0=B8=B5=E0=B9=81=E0=B8=AA=E0=B8=94=E0=B8=87=E0=B8=A7=E0=B8=B1?= =?UTF-8?q?=E0=B8=99=E0=B8=A5=E0=B8=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/09_leave/views/06_ReportMain.vue | 88 +++++++------------- 1 file changed, 29 insertions(+), 59 deletions(-) diff --git a/src/modules/09_leave/views/06_ReportMain.vue b/src/modules/09_leave/views/06_ReportMain.vue index 9d48079d6..5a8df9215 100644 --- a/src/modules/09_leave/views/06_ReportMain.vue +++ b/src/modules/09_leave/views/06_ReportMain.vue @@ -24,14 +24,8 @@ import LoadView from "@/components/LoadView.vue"; const $q = useQuasar(); const route = useRoute(); const { fetchStructureTree } = useStructureTree(); -const { - showLoader, - hideLoader, - date2Thai, - dateToISO, - messageError, - monthYear2Thai, -} = useCounterMixin(); +const { date2Thai, dateToISO, messageError, monthYear2Thai } = + useCounterMixin(); const year = ref(new Date().getFullYear()); const dateStart = ref(new Date(year.value - 1, 9, 1)); @@ -77,17 +71,26 @@ const nodeLevel = ref(0); const node = ref([]); const expanded = ref([]); +/** ฟังก์ชันเรียกข้อมูลโครงสร้างหน่วยงาน*/ async function fetchDataTree() { node.value = await fetchStructureTree(route.meta.Key as string, true); } +/** + * ฟังก์ชันเลือกหน่วยงานที่ต้องการดูข้อมูล + * @param id id หน่วยงาน + * @param level node ของหน่วงงานที่เลือก + */ function onSelectedNode(id: string, level: number) { nodeId.value = id; nodeLevel.value = level; updateLeaveday(); } -/** function อัปเดทบัญชีแสดงวันลา */ +/** + * ฟังก์ชันอัปเดทบัญชีแสดงวันลา + * และเรียกข้อมูลรายงาน + */ async function updateLeaveday() { switch (yearType.value) { case "FULL": @@ -125,23 +128,17 @@ async function updateLeaveday() { isLoadPDF.value = true; pdfSrc.value = undefined; - typeReport.value === "1" - ? fetchLeaveday( - employeeClass.value, - yearType.value, - dateStart.value, - dateEnd.value - ) - : fetchLeaveday2( - employeeClass.value, - yearType.value, - dateStart.value, - dateEnd.value - ); + //เรียกฟังก์ชัน fetchLeaveday + fetchLeaveday( + employeeClass.value, + yearType.value, + dateStart.value, + dateEnd.value + ); } /** - * function เรียกข้อมูลบัญชีแสดงวันลา + * ฟังก์ชันเรียกข้อมูลรายงาน * @param type สถานภาพ * @param year ปั * @param startDate วันเริ่มต้น @@ -161,38 +158,13 @@ async function fetchLeaveday( node: nodeLevel.value, }; - await http - .post(config.API.leaveReportLeaveday(type), body) - .then(async (res) => { - const data = res.data.result; - data && (await fetchDocumentTemplate(data)); - isReport.value = data ? true : false; - detailReport.value = data; - }) - .catch((err) => { - messageError($q, err); - }) - .finally(() => { - isLoadPDF.value = false; - }); -} - -async function fetchLeaveday2( - type: string, - year: string, - startDate: Date, - endDate: Date -) { - const body = { - type: year === "FULL" ? "FULL" : year === "MONTH" ? "MONTH" : "HAFT", - startDate: dateToISO(startDate), - endDate: dateToISO(endDate), - nodeId: nodeId.value, - node: nodeLevel.value, - }; + const pathAPI = + typeReport.value === "1" + ? config.API.leaveReportLeaveday(type) + : config.API.leaveReportLeave2(type); await http - .post(config.API.leaveReportLeave2(type), body) + .post(pathAPI, body) .then(async (res) => { const data = res.data.result; data && (await fetchDocumentTemplate(data)); @@ -233,12 +205,10 @@ async function fetchDocumentTemplate(data: any) { .catch(async (e) => { messageError($q, JSON.parse(await e.response.data.text())); }) - .finally(() => { - setTimeout(() => { - hideLoader(); - }, 2000); - }); + .finally(() => {}); } + +//ตัวแปร PDF const numOfPages = ref(0); const page = ref(1); const pdfSrc = ref(); @@ -366,7 +336,7 @@ onMounted(() => {
Date: Wed, 18 Dec 2024 14:25:57 +0700 Subject: [PATCH 5/8] fix format colums table --- .../components/02_resign/Table.vue | 14 ++++++++---- .../components/03_resignEmp/Table.vue | 13 ++++++++--- .../08_registryEmployee/views/Main.vue | 10 +++++++-- .../13_salary/components/InfoLeave.vue | 22 ++++++++++++++----- 4 files changed, 44 insertions(+), 15 deletions(-) diff --git a/src/modules/06_retirement/components/02_resign/Table.vue b/src/modules/06_retirement/components/02_resign/Table.vue index 7441de979..ec911e81d 100644 --- a/src/modules/06_retirement/components/02_resign/Table.vue +++ b/src/modules/06_retirement/components/02_resign/Table.vue @@ -23,7 +23,8 @@ const stroeResign = useDataStore(); const { statusText } = stroe; const router = useRouter(); const mixin = useCounterMixin(); -const { messageError, date2Thai, showLoader, hideLoader,onSearchDataTable } = mixin; +const { messageError, date2Thai, showLoader, hideLoader, onSearchDataTable } = + mixin; /** Table */ const rows = ref([]); @@ -45,7 +46,10 @@ const columns = ref([ align: "left", label: "ชื่อ-นามสกุล", sortable: true, - field: (row) => `${row.prefix}${row.firstName} ${row.lastName}`, + field: `fullname`, + format(val, row) { + return `${row.prefix}${row.firstName} ${row.lastName}`; + }, headerStyle: "font-size: 14px", style: "font-size: 14px", }, @@ -101,7 +105,6 @@ const columns = ref([ align: "left", label: "วันที่ยื่น", sortable: true, - // field: (row) => date2Thai(new Date(row.createdAt)), field: "createdAt", format(val, row) { return date2Thai(new Date(val)); @@ -115,7 +118,10 @@ const columns = ref([ align: "left", label: "สถานะ", sortable: true, - field: (row) => statusText(row.status), + field: "status", + format(val, row) { + return statusText(row.status); + }, headerStyle: "font-size: 14px", style: "font-size: 14px", }, diff --git a/src/modules/06_retirement/components/03_resignEmp/Table.vue b/src/modules/06_retirement/components/03_resignEmp/Table.vue index 0272b4c64..5a3e7f973 100644 --- a/src/modules/06_retirement/components/03_resignEmp/Table.vue +++ b/src/modules/06_retirement/components/03_resignEmp/Table.vue @@ -23,7 +23,8 @@ const stroeResign = useDataStore(); const { statusText } = stroe; const router = useRouter(); const mixin = useCounterMixin(); -const { messageError, date2Thai, showLoader, hideLoader,onSearchDataTable } = mixin; +const { messageError, date2Thai, showLoader, hideLoader, onSearchDataTable } = + mixin; /** Table */ const rows = ref([]); @@ -45,7 +46,10 @@ const columns = ref([ align: "left", label: "ชื่อ-นามสกุล", sortable: true, - field: (row) => `${row.prefix}${row.firstName} ${row.lastName}`, + field: "fullname", + format(val, row) { + return `${row.prefix}${row.firstName} ${row.lastName}`; + }, headerStyle: "font-size: 14px", style: "font-size: 14px", }, @@ -114,7 +118,10 @@ const columns = ref([ align: "left", label: "สถานะ", sortable: true, - field: (row) => statusText(row.status), + field: "status", + format(val, row) { + return statusText(row.status); + }, headerStyle: "font-size: 14px", style: "font-size: 14px", }, diff --git a/src/modules/08_registryEmployee/views/Main.vue b/src/modules/08_registryEmployee/views/Main.vue index 50d5ca07e..e320a6c5d 100644 --- a/src/modules/08_registryEmployee/views/Main.vue +++ b/src/modules/08_registryEmployee/views/Main.vue @@ -81,7 +81,10 @@ const columns = ref([ align: "left", label: "ชื่อ-นามสกุล", sortable: true, - field: (row) => `${row.prefix}${row.firstName} ${row.lastName}`, + field: "fullname", + format(val, row) { + return `${row.prefix}${row.firstName} ${row.lastName}`; + }, headerStyle: "font-size: 14px; min-width: 200px", style: "font-size: 14px; ", }, @@ -175,7 +178,10 @@ const columns = ref([ align: "left", label: "สถานะ", sortable: true, - field: (row) => statusText(row.draftOrgEmployeeStatus), + field: "statustext", + format(val, row) { + return statusText(row.draftOrgEmployeeStatus); + }, headerStyle: "font-size: 14px", style: "font-size: 14px", }, diff --git a/src/modules/13_salary/components/InfoLeave.vue b/src/modules/13_salary/components/InfoLeave.vue index ab3cfce15..ebdcb4c19 100644 --- a/src/modules/13_salary/components/InfoLeave.vue +++ b/src/modules/13_salary/components/InfoLeave.vue @@ -38,7 +38,6 @@ const columns = ref([ align: "left", label: "ลำดับ", sortable: false, - headerStyle: "font-size: 14px", style: "font-size: 14px", field: (row) => rows.value.indexOf(row) + 1, @@ -48,20 +47,24 @@ const columns = ref([ align: "left", label: "ประเภทการลา", sortable: true, - + field: "leaveType", headerStyle: "font-size: 14px", style: "font-size: 14px", - field: (row) => row.leaveType.name, + format(val, row) { + return row.leaveType.name; + }, }, { name: "dateLeave", align: "left", label: "วัน เดือน ปี ที่ลา", sortable: true, - + field: "dateLeave", headerStyle: "font-size: 14px", style: "font-size: 14px", - field: (row) => dateThaiRange([row.dateLeaveStart, row.dateLeaveEnd]), + format(val, row) { + return dateThaiRange([row.dateLeaveStart, row.dateLeaveEnd]); + }, }, { name: "leaveDays", @@ -165,7 +168,14 @@ onMounted(() => {
- + From b008a87e2118f452f0ce2c4e03590f2babe6b870 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Wed, 18 Dec 2024 14:37:17 +0700 Subject: [PATCH 6/8] updated config --- docker/entrypoint.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index e269bd259..230dc0347 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -15,6 +15,8 @@ do sed -i 's|VITE_API_REPORT_URL|'${VITE_API_REPORT_URL}'|g' $file sed -i 's|VITE_MANUAL_URL|'${VITE_MANUAL_URL}'|g' $file sed -i 's|VITE_URL_SSO|'${VITE_URL_SSO}'|g' $file + sed -i 's|VITE_API_URI_CONFIG|'${VITE_API_URI_CONFIG}'|g' $file + sed -i 's|VITE_API_URI_REPORT_CONFIG|'${VITE_API_URI_REPORT_CONFIG}'|g' $file done From 5ca1f8bb84b5a6fc8e6f104c063688c07658b02f Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Wed, 18 Dec 2024 14:47:50 +0700 Subject: [PATCH 7/8] fixing --- .env.production | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.env.production b/.env.production index 152411c46..3005ebb61 100644 --- a/.env.production +++ b/.env.production @@ -5,4 +5,5 @@ VITE_API_PUBLISH_URL=VITE_API_PUBLISH_URL VITE_API_REPORT_URL=VITE_API_REPORT_URL VITE_MANUAL_URL=VITE_MANUAL_URL VITE_URL_SSO=VITE_URL_SSO -VITE_API_URI_CONFIG=VITE_API_URI_CONFIG \ No newline at end of file +VITE_API_URI_CONFIG=VITE_API_URI_CONFIG +VITE_API_URI_REPORT_CONFIG=VITE_API_URI_REPORT_CONFIG \ No newline at end of file From 38a52c3ec6b52a56e28e3aa1cc1ae7fb54c7dc01 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 18 Dec 2024 14:49:29 +0700 Subject: [PATCH 8/8] =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=81?= =?UTF-8?q?=E0=B8=B2=E0=B8=A8=E0=B9=80=E0=B8=81=E0=B8=A9=E0=B8=B5=E0=B8=A2?= =?UTF-8?q?=E0=B8=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../01_retirement/RetirementDetail.vue | 25 ++++++++----------- .../components/02_resign/Table.vue | 2 +- .../components/03_resignEmp/Table.vue | 2 +- 3 files changed, 12 insertions(+), 17 deletions(-) diff --git a/src/modules/06_retirement/components/01_retirement/RetirementDetail.vue b/src/modules/06_retirement/components/01_retirement/RetirementDetail.vue index ed676f086..b38844a24 100644 --- a/src/modules/06_retirement/components/01_retirement/RetirementDetail.vue +++ b/src/modules/06_retirement/components/01_retirement/RetirementDetail.vue @@ -168,11 +168,11 @@ async function fetchlistprofile(id: string) { prefix: e.prefix, firstName: e.firstName, lastName: e.lastName, - name: e.prefix + e.firstName + " " + e.lastName, + name: `${e.prefix}${e.firstName} ${e.lastName}`, organization: e.root, position: e.position, positionNumber: e.posNo, - positionType: e.posTypeName, + positionType: `${e.posTypeName} (${e.posLevelName})`, positionLevel: e.posLevelName, reason: e.reason, remove: e.remove, @@ -663,7 +663,13 @@ onMounted(async () => { >ลบข้อมูล - {{ props.row.order }} + + +
+ {{ col.value ? col.value : "-" }} +
+
+ -
diff --git a/src/modules/06_retirement/components/02_resign/Table.vue b/src/modules/06_retirement/components/02_resign/Table.vue index ec911e81d..c050970f9 100644 --- a/src/modules/06_retirement/components/02_resign/Table.vue +++ b/src/modules/06_retirement/components/02_resign/Table.vue @@ -377,7 +377,7 @@ onMounted(async () => { : '' " > - {{ col.value ? col.value : "" }} + {{ col.value ? col.value : "-" }}
diff --git a/src/modules/06_retirement/components/03_resignEmp/Table.vue b/src/modules/06_retirement/components/03_resignEmp/Table.vue index 5a3e7f973..1c73be261 100644 --- a/src/modules/06_retirement/components/03_resignEmp/Table.vue +++ b/src/modules/06_retirement/components/03_resignEmp/Table.vue @@ -381,7 +381,7 @@ onMounted(async () => { : '' " > - {{ col.value ? col.value : "" }} + {{ col.value ? col.value : "-" }}