hezarfen_frontend
Clone
https://git.tahinli.com/archive/hezarfen_frontend.git
0 watching0 forksTypeScript5.5 MiB5fcd955Burak Boduroğlu2 months ago730 commits
| 1 | /** Shared semantic colors for appointment status chips, mirroring schedule-status. */ |
| 2 | import type { AppointmentStatus } from "@/api/client"; |
| 3 | import type { MessageKey } from "@/i18n/messages"; |
| 4 | |
| 5 | export function appointmentStatusClass(status: AppointmentStatus | string): string { |
| 6 | if (status === "pending") return "border-warning/30 bg-warning/10 text-warning-text"; |
| 7 | if (status === "approved") return "border-success/30 bg-success/10 text-success-text"; |
| 8 | if (status === "rejected") return "border-destructive/30 bg-destructive/10 text-destructive-text"; |
| 9 | return "border-muted bg-muted/50 text-muted-foreground"; |
| 10 | } |
| 11 | |
| 12 | export function appointmentStatusDotClass(status: AppointmentStatus | string): string { |
| 13 | if (status === "pending") return "bg-warning"; |
| 14 | if (status === "approved") return "bg-success"; |
| 15 | if (status === "rejected") return "bg-destructive"; |
| 16 | return "bg-muted-foreground"; |
| 17 | } |
| 18 | |
| 19 | export function appointmentStatusLabelKey(status: AppointmentStatus): MessageKey { |
| 20 | return `appointments.status.${status}` as MessageKey; |
| 21 | } |