import { cn } from "@/lib/utils"; const PIPELINE = [ { id: "cc_review", label: "CC Review" }, { id: "cc_recommended", label: "CC Recommended" }, { id: "jd_approval", label: "JD Approval" }, { id: "jd_recommended", label: "JD Recommended" }, { id: "director_approval", label: "Director Approval" }, { id: "certification", label: "Certified" }, ]; interface ApprovalFlowProps { currentStage: string; } export function ApprovalFlow({ currentStage }: ApprovalFlowProps) { const currentIndex = PIPELINE.findIndex((step) => step.id === currentStage); return (
{PIPELINE.map((step, index) => { const isDone = currentIndex !== -1 && index < currentIndex; const isCurrent = currentIndex === index; return (
{step.label} {index < PIPELINE.length - 1 && ( )}
); })}
); }