Vendor review
Shown as Countersign, a made-up product
A procurement desk where every new vendor passes Security, Legal, Compliance and Finance: who holds each case and for how many days, a case drawer with the sign-off chain and documents, approval that books the follow-ups, and an overview of waits, evidence and what's due.
Installation
pnpm dlx shadcn@latest add "https://propui.dev/r/countersign-vendors.json?token=…"Adds the piece to components/propui/08-countersign-vendors/ and installs motion. Needs a free account: sign in and the command includes your token. Fonts load from Prop UI; download the zip to self-host them.
When to use
Reach for it when
- A procurement, vendor-risk or third-party review desk where each request passes several review teams before approval.
- Any approval queue that needs to show who holds each case and for how long, not just its status.
- A team lead's home screen: a summary of the day, the longest waits, evidence to chase and what's coming up.
Something else fits when
- A single approval with one reviewer: a simple list with Approve buttons is clearer.
- Thousands of requests: a full data table with saved filters and bulk actions fits better.
- A marketing page about a procurement product: use a section in page flow, not a full-window desk.
Usage
Fills a full window: give it a container with a definite height.
import Piece from "@/components/propui/08-countersign-vendors/Section";
export default function Page() {
return (
<main className="h-dvh w-full overflow-hidden">
<Piece />
</main>
);
}Replace VENDORS, TRACKS, USER, COMING, WEEKS and MEDIAN_BY_WEEK in data.ts, and the workspace, nav and pinned vendors at the top of Section.tsx. Every count, day total, finding sentence and chart is computed from those arrays.
Your data
Replace these and everything on screen follows.
VENDORS{ id; name; what; owner; value; term; risk; data; tracks; docs; approved? }[]- The review table, the cases, the evidence folders and every count and day total.
TRACKS{ id; label; short; reviewer }[]- The four review tracks, their columns, queues and reviewers.
Track{ s: "signed" | "review" | "vendor" | "blocked" | "queued"; d?; on?; note? }- One track of one vendor: who holds it, for how many days, and why.
COMING{ on; vendor; id?; what; group }[]- Coming up on the overview; an id opens that vendor's case.
WEEKS, MEDIAN_BY_WEEK, HISTORYstring[], number[], { approved90; medianDays; targetDays; priorMedian }- The time-to-approve chart and its headline against the target.
Interactions
- Switch between Overview and Vendors from the side bar; collapse the side bar to icons with the button by the logo.
- Pick a queue (all open, waiting on us, waiting on the vendor, ready, approved) or one review team's queue.
- Click a track in the hold-up bar to see only what that team holds.
- Sort by how long a case has waited or by contract value; search by name, VND number, what they sell or requester.
- Open a case to see its sign-offs and documents; nudge a reviewer or chase the vendor.
- Approve a vendor once all four tracks have signed; the case lists what approval set off, and Undo puts it back.
- Hover a week on the overview chart to read its median in the headline; hover a folder to see its papers.
- Click a folder, a case card, a pinned vendor or a date in Coming up to jump to the right queue or case.
Keyboard
- /
- Go to Vendors and focus the search.
- Esc
- Close the open case, the menu or the workspace switcher.
- EnterorSpace
- Press the focused button: open a case, pick a queue, sort a column.
Behaviour
Read from the code: roles, motion, breakpoints and what runs.
Accessibility
- The case and the phone menu are modal dialogs; focus moves to their close button and returns to the row you opened.
- Sortable column headers carry aria-sort; every track cell has a full sentence for screen readers, not just an icon.
- Queue, nav and pinned selections use aria-current; counts on nav items are read with what they count.
- Approve is aria-disabled until every track has signed, with the reason written beside it.
- Toasts and the chart headline are polite live regions; the chart has a label that reads its trend.
- Banner text keeps at least 5.5:1 contrast over the moving colour in both themes.
Motion
- The banner's colour field drifts on slow loops; it pauses off screen and in a hidden tab.
- A new queue or sort swaps the whole list at once and fades it up, so two lists never overlap.
- Selection highlights glide between queues and nav items on a spring.
- The case slides in from the right; approval checks off what it set off one by one.
- The folders' papers drop in the first time they appear and peek out on hover.
- Reduced motion stops the banner and the paper movement and keeps short fades.
Responsive
- It fills the window edge to edge; each pane scrolls inside it.
- Below 1280px the side bar becomes an icon rail.
- Below 1024px the queue pane gives way to a row of queue chips above the table.
- Below 768px the side bar moves into a menu behind a button and the overview stacks.
- As the table narrows, Risk, then the Ready label, then Value hide; under 680px each vendor becomes a card with four track bars.
Performance
- Every figure is derived on render with plain array maths; there are no timers except the toast.
- The banner animates transform and opacity only and stops when it can't be seen; charts are inline SVG.
- The folders draw in the browser only, after load; one local font file.
Notes for AI
Give your coding assistant the Markdown, not a screenshot.
- Keep every count, total and sentence derived from data.ts; never type a number into the markup.
- A vendor is ready when all four tracks are signed; who holds a case is its longest-held open track.
- Every class is prefixed cs- (csf- for the folder) and scoped under .cs; keep colours in the tokens at the top of post.css.
/p/countersign-vendors/markdownThe whole library for assistants: llms.txt, or the MCP server in AI tools and MCP.