refactor(history): formatDate Colunm checkInTime checkOutTime
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m48s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m48s
This commit is contained in:
parent
41c1aa8e45
commit
c0669a1548
3 changed files with 17 additions and 11 deletions
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ interface DataCheckIn {
|
|||
checkInLocation: string
|
||||
checkInStatus: string
|
||||
checkInTime: string
|
||||
checkOutDate: string
|
||||
checkOutLocation: string
|
||||
checkOutStatus: string
|
||||
checkOutTime: string
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ export const useChekIn = defineStore('checkin', () => {
|
|||
editStatus: e.editStatus != '' ? convertEditStatus(e.editStatus) : '',
|
||||
editReason: e.editReason,
|
||||
isEdit: e.isEdit,
|
||||
checkOutDate: e.checkOutDate ? date2Thai(e.checkOutDate) : null,
|
||||
}))
|
||||
rows.value = dataList
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue