From 2329e7242ff331b65e3c0de60204a6adcb51025e Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 13 May 2025 11:58:45 +0700 Subject: [PATCH] =?UTF-8?q?fix=20columns=20=E0=B8=97=E0=B8=B0=E0=B9=80?= =?UTF-8?q?=E0=B8=9A=E0=B8=B5=E0=B8=A2=E0=B8=99=E0=B8=9B=E0=B8=A3=E0=B8=B0?= =?UTF-8?q?=E0=B8=A7=E0=B8=B1=E0=B8=95=E0=B8=B4=20=E0=B8=9B=E0=B8=A3?= =?UTF-8?q?=E0=B8=B0=E0=B8=A7=E0=B8=B1=E0=B8=95=E0=B8=B4=E0=B8=81=E0=B8=B2?= =?UTF-8?q?=E0=B8=A3=E0=B8=A8=E0=B8=B6=E0=B8=81=E0=B8=A9=E0=B8=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../01_Information/05_Educations.vue | 28 ++++++++++++++----- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/src/modules/10_registry/01_Information/05_Educations.vue b/src/modules/10_registry/01_Information/05_Educations.vue index 435c123..2fb6e5d 100644 --- a/src/modules/10_registry/01_Information/05_Educations.vue +++ b/src/modules/10_registry/01_Information/05_Educations.vue @@ -78,10 +78,14 @@ const columns = ref([ align: "left", label: "ตั้งแต่", sortable: true, - field: "startDate", headerStyle: "font-size: 14px", style: "font-size: 14px", - format: (v) => date2Thai(v), + field: (v) => + v.startDate + ? v.isDate + ? date2Thai(v.startDate) + : new Date(v.startDate).getFullYear() + 543 + : "-", sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, @@ -91,7 +95,11 @@ const columns = ref([ label: "ถึง", sortable: true, field: (v) => - v.isDate ? date2Thai(v.endDate) : new Date(v.endDate).getFullYear() + 543, + v.endDate + ? v.isDate + ? date2Thai(v.endDate) + : new Date(v.endDate).getFullYear() + 543 + : "-", headerStyle: "font-size: 14px", style: "font-size: 14px", sort: (a: string, b: string) => @@ -291,9 +299,11 @@ const columnsHistory = ref([ label: "ตั้งแต่", sortable: true, field: (v) => - v.isDate - ? date2Thai(v.startDate) - : new Date(v.startDate).getFullYear() + 543, + v.startDate + ? v.isDate + ? date2Thai(v.startDate) + : new Date(v.startDate).getFullYear() + 543 + : "-", headerStyle: "font-size: 14px", style: "font-size: 14px", sort: (a: string, b: string) => @@ -305,7 +315,11 @@ const columnsHistory = ref([ label: "ถึง", sortable: true, field: (v) => - v.isDate ? date2Thai(v.endDate) : new Date(v.endDate).getFullYear() + 543, + v.endDate + ? v.isDate + ? date2Thai(v.endDate) + : new Date(v.endDate).getFullYear() + 543 + : "-", headerStyle: "font-size: 14px", style: "font-size: 14px", sort: (a: string, b: string) =>