WFDASH-WEBAPP/src
Dave 23b50a32a9 feat(orders): serve resolved quote-line pairing to the order UI
The order detail page and process page need the pairing, not the
matcher — until now the process page was doing an exact/substring
guess at render time and silently hiding buyer notes when the PO's
wording differed from the quote's.

- matched-attachments response gains linePairs (keyed by order_item_id,
  carrying quote_item_id, confidence, tier). pairOrderLines is called
  defensively — a pairing failure cannot kill the attachments
  response (catch returns null → empty linePairs object, the rest of
  the payload still serves).
- POST /api/v1/orders/[id]/quote-line writes the operator's confirm
  decision (or unlink with empty quote_item_id) onto
  order_items.quote_item. Guards against patching a line that
  belongs to a different order (404 otherwise).

Both routes are additive — the existing matched-attachments fields are
unchanged, the MCP orders.list_attachments consumer keeps working.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-30 12:20:16 +02:00
..
app feat(orders): serve resolved quote-line pairing to the order UI 2026-08-30 12:20:16 +02:00
components refactor(orders): extract AttachmentList into a shared component 2026-08-30 12:16:31 +02:00
lib feat(orders): add quote-match backlog sweep with age-gap reporting 2026-08-30 08:45:23 +02:00
styles feat(item-history): add getItemHistory service with 5 PB queries 2026-07-29 14:51:58 +02:00
middleware.ts feat(tv): add TV dashboard + refine workflows 2026-08-13 20:55:22 +02:00
test-setup.ts feat(buyer-tasks): group card with color-coded action button 2026-07-29 20:11:39 +02:00