Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 | import type { LeaveType } from "@/lib/db/schema";
import {
LEAVE_TYPE_FALLBACK_LABEL,
LEAVE_TYPE_LABEL_BY_TYPE,
} from "@/constants/leave";
export function leaveTypeLabel(value: LeaveType | string): string {
return LEAVE_TYPE_LABEL_BY_TYPE[value as keyof typeof LEAVE_TYPE_LABEL_BY_TYPE] ?? LEAVE_TYPE_FALLBACK_LABEL;
}
|