import { Link } from "react-router"; import type { PacketRead } from "../api/types"; import { holdItemsText, holdText } from "../lib/qc"; /** * The open ITP hold, witness or rejected points for this packet's department (the old itpHoldNote). A warning * only: nothing is blocked by it. Users with the Q.C. screen get a link to the ITP. */ export function HoldCallout({ p, qcScreen }: { p: PacketRead; qcScreen: boolean }) { const hold = p.itp_hold; if (!hold || p.status === "filed" || !hold.count) return null; const items = holdItemsText(hold); return (
{holdText(hold)} {items ? ` ${items}.` : ""} Check with Q.C. before moving past these points. {qcScreen ? ( <> {" "} Open ITP ) : null}
); }