refactor(history): formatDate Colunm checkInTime checkOutTime
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m48s

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2026-04-24 16:12:45 +07:00
parent 41c1aa8e45
commit c0669a1548
3 changed files with 17 additions and 11 deletions

View file

@ -62,15 +62,15 @@ const selected = ref<string[]>([])
const columns = ref<QTableProps['columns']>(
props.tab == 'history'
? [
{
name: 'checkInDate',
align: 'left',
label: 'วัน/เดือน/ปี',
sortable: true,
field: 'checkInDate',
headerStyle: 'font-size: 14px',
style: 'font-size: 14px; width:15%;',
},
// {
// name: 'checkInDate',
// align: 'left',
// label: '//',
// sortable: true,
// field: 'checkInDate',
// headerStyle: 'font-size: 14px',
// style: 'font-size: 14px; width:15%;',
// },
{
name: 'checkInTime',
align: 'left',
@ -79,6 +79,9 @@ const columns = ref<QTableProps['columns']>(
field: 'checkInTime',
headerStyle: 'font-size: 14px',
style: 'font-size: 14px; width:15%;',
format: (val: string, row: DataCheckIn) => {
return `${row.checkInDate} ${val} น.`
},
},
{
name: 'checkInLocation',
@ -107,7 +110,9 @@ const columns = ref<QTableProps['columns']>(
headerStyle: 'font-size: 14px',
style: 'font-size: 14px; width:15%;',
format: (val: string, row: DataCheckIn) => {
return row.checkOutStatus != '-' && val ? val : '-'
return row.checkOutStatus != '-' && val
? `${row.checkOutDate} ${val} น.`
: '-'
},
},
{
@ -182,7 +187,6 @@ const columns = ref<QTableProps['columns']>(
)
const visibleColumns = ref<string[]>([
'checkInDateTime',
'checkInDate',
'checkInTime',
'checkInLocation',
'checkInStatus',