WFDASH-WEBAPP/src/components
Dave 980f40aa79 feat(delivery-notes): see what's on a note, colour-coded progress, POS-aligned stock search
The delivery-notes list was close to unusable: company groups initialised
to an empty Set, so `isOpen` was false for every group and the page landed
on a stack of company headers with nothing under them. The code comment
claimed the opposite of what the code did.

Screen
- Track *collapsed* group names instead of open ones. Open is now the
  default with no initialisation, and it survives a list re-fetch.
- Rows expand to show the real line items (description, qty, supplier,
  SKU, price, subtotal) via the existing /detail read model, cached after
  first open. Ported from /quotes, which already had this affordance.
- Whole-row click removed so expanding can't be mistaken for opening; the
  DN number and "Open full delivery note ->" navigate instead.
- Row tint as a derived progress ladder — no new stored statuses:
    none = draft · yellow = signed copy · blue = quoted · green = po_received
  `invoiced` leaves the Active tab, so Active is now genuinely what is
  outstanding. Hovering the status badge explains the colour.
- DataTable gained an optional `selectionHeaderLabel`; the checkboxes
  feed one action (Combine) and now say so.

Stock search
- The create-delivery-note dialog was `getFullList`-ing every stock item
  with expand=supplier on each open, before a character was typed. Now a
  debounced typeahead against /api/v1/stock-items/search.
- Deliberately NOT the existing quick-draft search route: that one is
  served with an admin client and no session check, so its result isn't
  gated on the listRule. The new route uses assertBrowserSession.

Fixes
- The PDF preview modal was clamped to 384px wide and 900px tall despite
  passing max-w-[1100px]. DialogContent's default `sm:max-w-sm` is a
  *variant*, so twMerge kept both and the variant won on cascade order
  (verified against the compiled stylesheet: 88,536 vs 258,517). Both
  preview variants now repeat the `sm:` prefix so the conflict resolves.
- Expand-panel fetch was missing the Authorization header. Dashboard auth
  lives in localStorage, so route handlers cannot read it from cookies and
  the request 401'd. A 401 now reports an expired session instead of a
  bare status code.

Notes
- 25 new unit tests. The stage ladder and the PB filter construction are
  the two places where a silent wrong answer looks like a UI bug.
- Unauthenticated write routes on delivery-notes (create, combine,
  create-quote, customer-po, mark-invoiced) have no session check. Left
  as-is and reported separately — locking them is an auth-behaviour change.
2026-10-04 20:40:13 +02:00
..
buyer-tasks chore(tests): fix ~60 pre-existing TS errors across 11 test files 2026-08-27 04:43:40 +02:00
charts feat(charts): allow RadialGauge to override its center label 2026-09-01 01:33:16 +02:00
collection-confirm fix(orders): bill the customer quantity, not the supplier order_qty 2026-08-30 18:28:33 +02:00
delivery-notes feat(delivery-notes): see what's on a note, colour-coded progress, POS-aligned stock search 2026-10-04 20:40:13 +02:00
giellie fix(giellie): pin Approve/Reject above a scrolling list on long approvals 2026-10-01 08:32:04 +02:00
invoicing feat: add split views, stock picking slips, and invoice viewer 2026-08-09 23:16:55 +02:00
orders feat(audit): implement audit trail for delivery notes and orders 2026-09-30 01:48:44 +02:00
purchase-orders fix(send-po-modal): seed default body when resend has no prior email_payload 2026-08-06 18:10:08 +02:00
quotes feat(audit): implement audit trail for delivery notes and orders 2026-09-30 01:48:44 +02:00
reports feat(audit): implement audit trail for delivery notes and orders 2026-09-30 01:48:44 +02:00
stock-orders feat(stock-orders): attachments card on detail page 2026-08-06 23:29:00 +02:00
ui feat(delivery-notes): see what's on a note, colour-coded progress, POS-aligned stock search 2026-10-04 20:40:13 +02:00
ai-insights-panel.tsx
ai-insights-renderer.test.tsx
ai-insights-renderer.tsx
ai-item-history-trigger.tsx feat(item-intel): add new item intel popover and backend workflows 2026-08-11 02:57:57 +02:00
audit-timeline.test.tsx feat(audit): implement audit trail for delivery notes and orders 2026-09-30 01:48:44 +02:00
audit-timeline.tsx feat(audit): implement audit trail for delivery notes and orders 2026-09-30 01:48:44 +02:00
auth-provider.tsx feat(audit): implement audit trail for delivery notes and orders 2026-09-30 01:48:44 +02:00
brand-stripe.tsx
cancel-order-dialog.tsx feat(orders,invoicing): add duplicate order cleanup and soft cancellation 2026-08-13 09:02:27 +02:00
company-form.test.tsx
company-form.tsx refactor(forms): update layout and structure of form components 2026-08-17 23:34:30 +02:00
customer-form.test.tsx feat(customers): add status toggle and site/location field 2026-09-16 09:47:09 +02:00
customer-form.tsx feat(customers): lift active/inactive toggle to top of customer form 2026-09-16 11:04:39 +02:00
data-table.test.tsx
data-table.tsx feat(delivery-notes): see what's on a note, colour-coded progress, POS-aligned stock search 2026-10-04 20:40:13 +02:00
delete-dialog.tsx
dev-identity-switcher.tsx
duplicate-orders-dialog.tsx feat(duplicate-orders): enhance duplicate order detection and UI 2026-08-16 11:25:00 +02:00
filter-tabs.tsx
fulfill-from-stock-cell.tsx
item-history-popover.test.tsx
item-history-popover.tsx
item-intel-popover.test.tsx chore(tests): fix ~60 pre-existing TS errors across 11 test files 2026-08-27 04:43:40 +02:00
item-intel-popover.tsx feat(deliveries): enhance delivery notes management and UI 2026-08-17 01:27:03 +02:00
item-status-pill.test.tsx
item-status-pill.tsx
item-status-tabs.tsx
leaflet-heatmap-layer.tsx feat(rep): add /rep/visits map with heatmap, per-customer clusters 2026-09-20 23:50:03 +02:00
leaflet-markers.test.ts
leaflet-markers.ts
line-items-table.tsx
margin-approval-dialog.tsx
markdown-print.tsx feat: implement discount functionality in POS system 2026-09-03 12:19:21 +02:00
markdown.test.tsx fix(giellie): mobile overlay, dvh height, markdown image block, per-chat trust, keep draft on failure 2026-10-01 00:12:56 +02:00
markdown.tsx fix(giellie): mobile overlay, dvh height, markdown image block, per-chat trust, keep draft on failure 2026-10-01 00:12:56 +02:00
order-form.tsx
order-item-context-panel.test.tsx test(context): OrderItemContextPanel UI tests 2026-08-07 02:54:24 +02:00
order-item-context-panel.tsx chore(context): lint + build adjustments 2026-08-07 03:04:28 +02:00
order-item-context-popover-trigger.test.tsx test(context): OrderItemContextPopoverTrigger UI tests 2026-08-07 02:55:39 +02:00
order-item-context-popover-trigger.tsx chore(context): lint + build adjustments 2026-08-07 03:04:28 +02:00
order-sprint-process-modal.test.tsx feat(context): swap sprint modal AI Insights for context panel 2026-08-07 02:58:47 +02:00
order-sprint-process-modal.tsx chore(context): lint + build adjustments 2026-08-07 03:04:28 +02:00
orders-review-modal-mount.test.tsx refactor(orders): replace OrdersReviewModal with OrdersReviewModalMount and streamline attachment handling 2026-08-24 07:26:18 +02:00
orders-review-modal-mount.tsx refactor(orders): replace OrdersReviewModal with OrdersReviewModalMount and streamline attachment handling 2026-08-24 07:26:18 +02:00
orders-review-modal.test.tsx
orders-review-modal.tsx
pricelist-catalogue.test.tsx
pricelist-catalogue.tsx
quote-email-card.tsx
quote-form-contact-picker.tsx fix(quotes): speed up archive search and add item preview to archive rows 2026-08-29 02:30:14 +02:00
quote-form-item-card.tsx feat(quote-form): allow empty quantity input for operator convenience 2026-08-18 07:28:25 +02:00
quote-form.test.tsx
quote-form.tsx feat(tv-dashboard): enhance TV dashboard with driver stops and performance metrics 2026-08-19 10:16:49 +02:00
quote-items-expanded.tsx fix(quotes): speed up archive search and add item preview to archive rows 2026-08-29 02:30:14 +02:00
quote-pdf-viewer.tsx fix(pdf-print): open the PDF in a new tab instead of printing the iframe 2026-10-04 13:15:08 +02:00
quoted-before-panel.tsx feat(quotes): add quote-level "Quoted before?" panel to the process page 2026-08-29 08:52:19 +02:00
rewrite-quote-modal.tsx
service-worker-registration.tsx feat(rep): visit check-in PWA — phone GPS, offline outbox 2026-09-06 21:09:27 +02:00
sidebar.test.tsx feat(audit): implement audit trail for delivery notes and orders 2026-09-30 01:48:44 +02:00
sidebar.tsx feat(scan): standalone delivery-note scanner PWA at /scan 2026-10-04 13:15:56 +02:00
sop-print-trigger.tsx feat: implement discount functionality in POS system 2026-09-03 12:19:21 +02:00
sprint-item-pricing-modal.test.tsx fix(quote-sprint): propagate description edits to quote_items.description 2026-09-08 18:45:13 +02:00
sprint-item-pricing-modal.tsx fix(quote-sprint): propagate description edits to quote_items.description 2026-09-08 18:45:13 +02:00
supplier-form.test.tsx feat(audit): implement audit trail for delivery notes and orders 2026-09-30 01:48:44 +02:00
supplier-form.tsx refactor(forms): update layout and structure of form components 2026-08-17 23:34:30 +02:00
supplier-map.tsx
theme-bootstrap.tsx
theme-picker.tsx
theme-provider.tsx
traffic-tiles.tsx