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 () => {