hezarfen_frontend
Clone
https://git.tahinli.com/archive/hezarfen_frontend.git
0 watching0 forksTypeScript5.5 MiBdcf123aBurak Boduroğlu2 months ago674 commits
| 1 | import type { CoreAttendanceStatus } from "@/api/client"; |
| 2 | import type { MessageKey } from "@/i18n/messages"; |
| 3 | |
| 4 | export const ATTENDANCE_STATUSES: { value: CoreAttendanceStatus; key: MessageKey; detailKey: MessageKey; class: string }[] = [ |
| 5 | { |
| 6 | value: "present", |
| 7 | key: "status.present", |
| 8 | detailKey: "status.presentDetail", |
| 9 | class: "border-success/30 bg-success/10 text-success-text", |
| 10 | }, |
| 11 | { |
| 12 | value: "absent", |
| 13 | key: "status.absent", |
| 14 | detailKey: "status.absentDetail", |
| 15 | class: "border-destructive/30 bg-destructive/10 text-destructive-text", |
| 16 | }, |
| 17 | { |
| 18 | value: "late", |
| 19 | key: "status.late", |
| 20 | detailKey: "status.lateDetail", |
| 21 | class: "border-warning/30 bg-warning/10 text-warning-text", |
| 22 | }, |
| 23 | { |
| 24 | value: "excused", |
| 25 | key: "status.excused", |
| 26 | detailKey: "status.excusedDetail", |
| 27 | class: "border-info/30 bg-info/10 text-info-text", |
| 28 | }, |
| 29 | ]; |
| 30 | |
| 31 | export function getAttendanceStatusMeta(status: string) { |
| 32 | return ATTENDANCE_STATUSES.find((item) => item.value === status); |
| 33 | } |