From 4277eb2325eb84f14139cfbc6518a5c06d78d7bd Mon Sep 17 00:00:00 2001 From: oat_dev Date: Tue, 19 Mar 2024 13:32:50 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=97=E0=B8=B0=E0=B9=80=E0=B8=9A=E0=B8=B5?= =?UTF-8?q?=E0=B8=A2=E0=B8=99=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=A7=E0=B8=B1?= =?UTF-8?q?=E0=B8=95=E0=B8=B4:=20=20=E0=B8=9D=E0=B8=B6=E0=B8=81=E0=B8=AD?= =?UTF-8?q?=E0=B8=9A=E0=B8=A3=E0=B8=A1=E0=B8=94=E0=B8=B9=E0=B8=87=E0=B8=B2?= =?UTF-8?q?=E0=B8=99=20=E0=B9=81=E0=B8=81=E0=B9=89=E0=B8=81=E0=B8=B2?= =?UTF-8?q?=E0=B8=A3=E0=B8=84=E0=B9=89=E0=B8=99=E0=B8=AB=E0=B8=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../detail/Achievement/02_Train.vue | 73 +++---------------- 1 file changed, 11 insertions(+), 62 deletions(-) diff --git a/src/modules/04_registryNew/components/detail/Achievement/02_Train.vue b/src/modules/04_registryNew/components/detail/Achievement/02_Train.vue index 901510331..6b0a5cec4 100644 --- a/src/modules/04_registryNew/components/detail/Achievement/02_Train.vue +++ b/src/modules/04_registryNew/components/detail/Achievement/02_Train.vue @@ -54,7 +54,10 @@ const columns = ref([ align: "left", label: "วันเริ่มต้นการฝึกอบรม/ดูงาน", sortable: true, - field: "startDate", + field: (v) => + v.isDate + ? date2Thai(v.startDate) + : new Date(v.startDate).getFullYear() + 543, headerStyle: "font-size: 14px", style: "font-size: 14px", sort: (a: string, b: string) => @@ -65,7 +68,8 @@ const columns = ref([ align: "left", label: "วันสิ้นสุดการฝึกอบรม/ดูงาน", sortable: true, - field: "endDate", + field: (v) => + v.isDate ? date2Thai(v.endDate) : new Date(v.endDate).getFullYear() + 543, headerStyle: "font-size: 14px", style: "font-size: 14px", sort: (a: string, b: string) => @@ -77,6 +81,7 @@ const columns = ref([ label: "ปีที่อบรม (พ.ศ.)", sortable: true, field: "yearly", + format: (v) => v + 543, headerStyle: "font-size: 14px", style: "font-size: 14px", sort: (a: string, b: string) => @@ -132,6 +137,7 @@ const columns = ref([ label: "คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่", sortable: true, field: "dateOrder", + format: (v) => date2Thai(v), headerStyle: "font-size: 14px", style: "font-size: 14px", sort: (a: string, b: string) => @@ -510,17 +516,7 @@ onMounted(async () => {