fix columns ทะเบียนประวัติ ประวัติการศึกษา

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-05-13 11:58:45 +07:00
parent 4320ef42dd
commit 2329e7242f

View file

@ -78,10 +78,14 @@ const columns = ref<QTableProps["columns"]>([
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<QTableProps["columns"]>([
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<QTableProps["columns"]>([
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<QTableProps["columns"]>([
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) =>