fix format colums table

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-12-18 14:25:57 +07:00
parent 02bfb6387c
commit b0b97b89db
4 changed files with 44 additions and 15 deletions

View file

@ -23,7 +23,8 @@ const stroeResign = useDataStore();
const { statusText } = stroe;
const router = useRouter();
const mixin = useCounterMixin();
const { messageError, date2Thai, showLoader, hideLoader,onSearchDataTable } = mixin;
const { messageError, date2Thai, showLoader, hideLoader, onSearchDataTable } =
mixin;
/** Table */
const rows = ref<ResponseItems[]>([]);
@ -45,7 +46,10 @@ const columns = ref<QTableProps["columns"]>([
align: "left",
label: "ชื่อ-นามสกุล",
sortable: true,
field: (row) => `${row.prefix}${row.firstName} ${row.lastName}`,
field: `fullname`,
format(val, row) {
return `${row.prefix}${row.firstName} ${row.lastName}`;
},
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
@ -101,7 +105,6 @@ const columns = ref<QTableProps["columns"]>([
align: "left",
label: "วันที่ยื่น",
sortable: true,
// field: (row) => date2Thai(new Date(row.createdAt)),
field: "createdAt",
format(val, row) {
return date2Thai(new Date(val));
@ -115,7 +118,10 @@ const columns = ref<QTableProps["columns"]>([
align: "left",
label: "สถานะ",
sortable: true,
field: (row) => statusText(row.status),
field: "status",
format(val, row) {
return statusText(row.status);
},
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},

View file

@ -23,7 +23,8 @@ const stroeResign = useDataStore();
const { statusText } = stroe;
const router = useRouter();
const mixin = useCounterMixin();
const { messageError, date2Thai, showLoader, hideLoader,onSearchDataTable } = mixin;
const { messageError, date2Thai, showLoader, hideLoader, onSearchDataTable } =
mixin;
/** Table */
const rows = ref<ResponseItems[]>([]);
@ -45,7 +46,10 @@ const columns = ref<QTableProps["columns"]>([
align: "left",
label: "ชื่อ-นามสกุล",
sortable: true,
field: (row) => `${row.prefix}${row.firstName} ${row.lastName}`,
field: "fullname",
format(val, row) {
return `${row.prefix}${row.firstName} ${row.lastName}`;
},
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
@ -114,7 +118,10 @@ const columns = ref<QTableProps["columns"]>([
align: "left",
label: "สถานะ",
sortable: true,
field: (row) => statusText(row.status),
field: "status",
format(val, row) {
return statusText(row.status);
},
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},