ทะเบียนประวัติ: แก้ตาราง, ประวัติแก้ไข, วันที่แก้ไข

This commit is contained in:
puriphatt 2024-03-29 12:33:58 +07:00
parent bf8b9b1e6e
commit 3df3cc2a3b
8 changed files with 911 additions and 328 deletions

View file

@ -40,8 +40,8 @@ const formFilter = reactive<FormFilter>({
const visibleColumns = ref<String[]>([
"date",
"detail",
"createdFullName",
"createdAt",
"lastUpdateFullName",
"lastUpdatedAt",
]);
const columns = ref<QTableProps["columns"]>([
{
@ -66,22 +66,22 @@ const columns = ref<QTableProps["columns"]>([
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "createdFullName",
name: "lastUpdateFullName",
align: "left",
label: "ผู้ดำเนินการ",
sortable: true,
field: "createdFullName",
field: "lastUpdateFullName",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "createdAt",
name: "lastUpdatedAt",
align: "left",
label: "วันที่แก้ไข",
sortable: true,
field: "createdAt",
field: "lastUpdatedAt",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format: (v) => date2Thai(v),
@ -101,8 +101,8 @@ function getHistory() {
id: e.id,
date: e.date,
detail: e.detail,
createdFullName: e.createdFullName,
createdAt: new Date(e.createdAt),
lastUpdateFullName: e.lastUpdateFullName,
lastUpdatedAt: new Date(e.lastUpdatedAt),
});
});
})