Merge branch 'develop' of github.com:Frappet/hrms-checkin into develop
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m53s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m53s
* 'develop' of github.com:Frappet/hrms-checkin: refactor(history): formatDate Colunm checkInTime checkOutTime
This commit is contained in:
commit
42c89c034d
3 changed files with 17 additions and 11 deletions
|
|
@ -62,15 +62,15 @@ const selected = ref<string[]>([])
|
||||||
const columns = ref<QTableProps['columns']>(
|
const columns = ref<QTableProps['columns']>(
|
||||||
props.tab == 'history'
|
props.tab == 'history'
|
||||||
? [
|
? [
|
||||||
{
|
// {
|
||||||
name: 'checkInDate',
|
// name: 'checkInDate',
|
||||||
align: 'left',
|
// align: 'left',
|
||||||
label: 'วัน/เดือน/ปี',
|
// label: 'วัน/เดือน/ปี',
|
||||||
sortable: true,
|
// sortable: true,
|
||||||
field: 'checkInDate',
|
// field: 'checkInDate',
|
||||||
headerStyle: 'font-size: 14px',
|
// headerStyle: 'font-size: 14px',
|
||||||
style: 'font-size: 14px; width:15%;',
|
// style: 'font-size: 14px; width:15%;',
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
name: 'checkInTime',
|
name: 'checkInTime',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
|
@ -79,6 +79,9 @@ const columns = ref<QTableProps['columns']>(
|
||||||
field: 'checkInTime',
|
field: 'checkInTime',
|
||||||
headerStyle: 'font-size: 14px',
|
headerStyle: 'font-size: 14px',
|
||||||
style: 'font-size: 14px; width:15%;',
|
style: 'font-size: 14px; width:15%;',
|
||||||
|
format: (val: string, row: DataCheckIn) => {
|
||||||
|
return `${row.checkInDate} ${val} น.`
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'checkInLocation',
|
name: 'checkInLocation',
|
||||||
|
|
@ -107,7 +110,9 @@ const columns = ref<QTableProps['columns']>(
|
||||||
headerStyle: 'font-size: 14px',
|
headerStyle: 'font-size: 14px',
|
||||||
style: 'font-size: 14px; width:15%;',
|
style: 'font-size: 14px; width:15%;',
|
||||||
format: (val: string, row: DataCheckIn) => {
|
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[]>([
|
const visibleColumns = ref<string[]>([
|
||||||
'checkInDateTime',
|
'checkInDateTime',
|
||||||
'checkInDate',
|
|
||||||
'checkInTime',
|
'checkInTime',
|
||||||
'checkInLocation',
|
'checkInLocation',
|
||||||
'checkInStatus',
|
'checkInStatus',
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ interface DataCheckIn {
|
||||||
checkInLocation: string
|
checkInLocation: string
|
||||||
checkInStatus: string
|
checkInStatus: string
|
||||||
checkInTime: string
|
checkInTime: string
|
||||||
|
checkOutDate: string
|
||||||
checkOutLocation: string
|
checkOutLocation: string
|
||||||
checkOutStatus: string
|
checkOutStatus: string
|
||||||
checkOutTime: string
|
checkOutTime: string
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ export const useCheckIn = defineStore('checkin', () => {
|
||||||
editStatus: e.editStatus != '' ? convertEditStatus(e.editStatus) : '',
|
editStatus: e.editStatus != '' ? convertEditStatus(e.editStatus) : '',
|
||||||
editReason: e.editReason,
|
editReason: e.editReason,
|
||||||
isEdit: e.isEdit,
|
isEdit: e.isEdit,
|
||||||
|
checkOutDate: e.checkOutDate ? date2Thai(e.checkOutDate) : null,
|
||||||
}))
|
}))
|
||||||
rows.value = dataList
|
rows.value = dataList
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue