hezarfen_frontend
Clone
https://git.tahinli.com/archive/hezarfen_frontend.git
0 watching0 forksTypeScript5.5 MiBdcf123aBurak Boduroğlu2 months ago674 commits
| 1 | /** Shared semantic colors for exam/event schedule chips (dashboard, lists, cards). */ |
| 2 | export type ScheduleStatus = |
| 3 | | "active" |
| 4 | | "upcoming" |
| 5 | | "today" |
| 6 | | "soon" |
| 7 | | "finished" |
| 8 | | "past" |
| 9 | | "unscheduled" |
| 10 | | "submitted"; |
| 11 | |
| 12 | export function scheduleStatusClass(status: ScheduleStatus | string): string { |
| 13 | if (status === "active") { |
| 14 | return "border-info/30 bg-info/10 text-info-text"; |
| 15 | } |
| 16 | if (status === "submitted") { |
| 17 | return "border-success/30 bg-success/10 text-success-text"; |
| 18 | } |
| 19 | if (status === "today" || status === "upcoming" || status === "soon") { |
| 20 | return "border-warning/30 bg-warning/10 text-warning-text"; |
| 21 | } |
| 22 | if (status === "finished" || status === "past") { |
| 23 | return "border-destructive/30 bg-destructive/10 text-destructive-text"; |
| 24 | } |
| 25 | return "border-muted bg-muted/50 text-muted-foreground"; |
| 26 | } |
| 27 | |
| 28 | export function scheduleStatusDotClass(status: ScheduleStatus | string): string { |
| 29 | if (status === "active") return "bg-info"; |
| 30 | if (status === "submitted") return "bg-success"; |
| 31 | if (status === "today" || status === "upcoming" || status === "soon") return "bg-warning"; |
| 32 | if (status === "finished" || status === "past") return "bg-destructive"; |
| 33 | return "bg-muted-foreground"; |
| 34 | } |