convertStatus ประวัติการลงเวลา

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-01-16 14:26:00 +07:00
parent 6a825999ad
commit ad1dd1becb
2 changed files with 8 additions and 4 deletions

View file

@ -10,7 +10,7 @@ const { date2Thai } = mixin
export const useChekIn = defineStore('checkin', () => {
const year = ref<number>(new Date().getFullYear())
const rows = ref<Datalist[]>()
const tab = ref<string>('history')
const tab = ref<string>('history')
/**
* map
@ -44,14 +44,16 @@ export const useChekIn = defineStore('checkin', () => {
*/
function convertStatus(status: string) {
switch (status) {
case '':
case 'ABSENT':
return 'ขาดราชการ'
case 'NORMAL':
return 'ปกติ'
case 'LATE':
return 'สาย'
case 'NOT_COMPLETE':
return 'ปฏิบัติงานไม่ครบตามกำหนดเวลา'
default:
return ''
return '-'
}
}
@ -96,6 +98,6 @@ export const useChekIn = defineStore('checkin', () => {
year,
fetchHistoryList,
classColorStatus,
tab
tab,
}
})