Files
celtic-life-science/web/src/components/reports/StatusBadge.tsx
T
Shubhankar45 0d30c58bf0 Server backup 2026-11-07 of uncommitted work in projects/pharma-web-celtic
Snapshot of the working tree on srv1071960 (branch main), taken during
server cleanup. .env files, node_modules, builds, logs and media were excluded.
2026-11-07 05:43:12 +00:00

15 lines
459 B
TypeScript

import { Badge, type Tone } from "../ui/Badge";
import { statusLabel } from "../../lib/format";
import type { DcrStatus, ReportType } from "../../types";
const TONE: Record<DcrStatus, Tone> = {
DRAFT: "neutral",
PENDING_ABM: "warning",
RETURNED: "danger",
APPROVED: "success",
};
export function StatusBadge({ status, type }: { status: DcrStatus; type?: ReportType }) {
return <Badge tone={TONE[status]} dot>{statusLabel(status, type)}</Badge>;
}