import { AlertCircle, Check, Circle, Clock, ExternalLink } from "lucide-react"; import { Link } from "react-router-dom"; import type { ReimbursementProcessingProgress as ProcessingProgress } from "../../api/reimbursements"; import { formatDisplayDateTime } from "../../lib/displayFormat"; import { cn } from "../../lib/utils"; type Props = { progress: ProcessingProgress; mobile?: boolean; }; const STATE_TEXT = { completed: "已完成", current: "处理中", pending: "待处理", exception: "需处理", } as const; export function ReimbursementProcessingProgress({ progress, mobile = false }: Props) { return (
    {progress.stages.map((stage, index) => { const expanded = stage.state === "current" || stage.state === "exception" || Boolean(stage.comment); const Icon = stage.state === "completed" ? Check : stage.state === "current" ? Clock : stage.state === "exception" ? AlertCircle : Circle; const facts = [stage.actorName, stage.occurredAt ? formatDisplayDateTime(stage.occurredAt) : null, stage.result] .filter(Boolean); return (
  1. {index < progress.stages.length - 1 ? (
  2. ); })}
); }