diff --git a/src/components/TableHistory.vue b/src/components/TableHistory.vue index 9edcead..f11b918 100644 --- a/src/components/TableHistory.vue +++ b/src/components/TableHistory.vue @@ -218,6 +218,8 @@ function classStatus(status: string) { return 'text-blue' case 'สาย': return 'text-yellow-8' + case 'ปฏิบัติงานไม่ครบตามกำหนดเวลา': + return 'text-orange-8' default: break } diff --git a/src/stores/chekin.ts b/src/stores/chekin.ts index 7451e85..35c2855 100644 --- a/src/stores/chekin.ts +++ b/src/stores/chekin.ts @@ -10,7 +10,7 @@ const { date2Thai } = mixin export const useChekIn = defineStore('checkin', () => { const year = ref(new Date().getFullYear()) const rows = ref() - const tab = ref('history') + const tab = ref('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, } })