WFDASH-WEBAPP/src/lib
Dave a0e7e152f7 feat(orders): pair lines when a quote is linked to an order
setOrderQuote is the single choke point for creating orders.quote —
used by the UI, REST API, and Hermes/n8n. Call pairOrderLines(orderId,
quoteId) right after the hard link lands so confident order-line to
quote-line pairs persist automatically instead of needing a separate
manual step.

Pairing also runs on the idempotent no-op path (order already points
at the requested quote) — it's safe to repeat and lets an operator
refresh pairing by re-running the same call after editing order lines.

A pairing failure never fails the link itself (console.error only,
by design) — the hard link is the operator's important intent and
must land even if pairing can't complete.
2026-08-29 14:06:10 +02:00
..
pdf feat(pdf): add noQuote prop to QuoteDocument 2026-08-26 23:40:47 +02:00
server feat(orders): pair lines when a quote is linked to an order 2026-08-29 14:06:10 +02:00
dev-identity.test.ts feat(item-history): add getItemHistory service with 5 PB queries 2026-07-29 14:51:58 +02:00
dev-identity.ts feat(item-history): add getItemHistory service with 5 PB queries 2026-07-29 14:51:58 +02:00
geo.test.ts feat(item-history): add getItemHistory service with 5 PB queries 2026-07-29 14:51:58 +02:00
geo.ts feat(item-history): add getItemHistory service with 5 PB queries 2026-07-29 14:51:58 +02:00
item-status-ui.test.ts feat(quotes): enhance scoring logic to include price matching 2026-08-24 07:09:39 +02:00
item-status-ui.ts feat(quotes): enhance scoring logic to include price matching 2026-08-24 07:09:39 +02:00
letterhead.test.ts feat(delivery-notes): standardize delivery-note letterhead across PDFs 2026-08-18 11:53:25 +02:00
letterhead.ts feat(delivery-notes): standardize delivery-note letterhead across PDFs 2026-08-18 11:53:25 +02:00
order-color.test.ts feat(item-history): add getItemHistory service with 5 PB queries 2026-07-29 14:51:58 +02:00
order-color.ts feat(item-history): add getItemHistory service with 5 PB queries 2026-07-29 14:51:58 +02:00
order-rep.test.ts feat(orders): show resolved sales rep name on order list and sprint 2026-08-04 08:50:54 +02:00
order-rep.ts feat(orders): show resolved sales rep name on order list and sprint 2026-08-04 08:50:54 +02:00
pb-helpers-duplicate.test.ts feat(item-history): add getItemHistory service with 5 PB queries 2026-07-29 14:51:58 +02:00
pb-helpers.ts feat(tv-dashboard): enhance TV dashboard with driver stops and performance metrics 2026-08-19 10:16:49 +02:00
pin-model.test.ts feat(item-history): add getItemHistory service with 5 PB queries 2026-07-29 14:51:58 +02:00
placeholder-customers.ts feat: collection-map updates, todays-stops, quote/approval rework, buyer-tasks, e2e 2026-08-03 09:33:45 +02:00
pocketbase.ts fix(tests): mock scaffold destructure + collection-pool + pocketbase startup 2026-07-31 00:01:24 +02:00
price-list-search.ts feat(item-history): add getItemHistory service with 5 PB queries 2026-07-29 14:51:58 +02:00
quote-status.test.ts feat(item-history): add getItemHistory service with 5 PB queries 2026-07-29 14:51:58 +02:00
quote-status.ts feat(tv): add TV dashboard + refine workflows 2026-08-13 20:55:22 +02:00
stock-fulfillment.test.ts feat(item-history): add getItemHistory service with 5 PB queries 2026-07-29 14:51:58 +02:00
stock-fulfillment.ts feat(item-history): add getItemHistory service with 5 PB queries 2026-07-29 14:51:58 +02:00
stock-low-stock.ts feat(item-history): add getItemHistory service with 5 PB queries 2026-07-29 14:51:58 +02:00
stock-match.ts feat(item-history): add getItemHistory service with 5 PB queries 2026-07-29 14:51:58 +02:00
stock-status.test.ts feat(item-history): add getItemHistory service with 5 PB queries 2026-07-29 14:51:58 +02:00
stock-status.ts feat(item-history): add getItemHistory service with 5 PB queries 2026-07-29 14:51:58 +02:00
supplier-color.test.ts fix(buyer-tasks): generate PO succeeds + supplier stripe + PO badge 2026-07-30 15:00:18 +02:00
supplier-color.ts fix(buyer-tasks): generate PO succeeds + supplier stripe + PO badge 2026-07-30 15:00:18 +02:00
theme-types.ts feat(item-history): add getItemHistory service with 5 PB queries 2026-07-29 14:51:58 +02:00
themes.ts feat(item-history): add getItemHistory service with 5 PB queries 2026-07-29 14:51:58 +02:00
types.ts chore(tests): fix ~60 pre-existing TS errors across 11 test files 2026-08-27 04:43:40 +02:00
use-boolean-preference.ts feat(invoicing): implement detailed view toggle for supplier and PO number 2026-08-16 11:01:52 +02:00
use-split-ratio.test.ts feat: add split views, stock picking slips, and invoice viewer 2026-08-09 23:16:55 +02:00
use-split-ratio.ts feat: add split views, stock picking slips, and invoice viewer 2026-08-09 23:16:55 +02:00
use-theme-id.ts feat(item-history): add getItemHistory service with 5 PB queries 2026-07-29 14:51:58 +02:00
user-color.ts feat(item-history): add getItemHistory service with 5 PB queries 2026-07-29 14:51:58 +02:00
utils.test.ts feat(orders): enhance order handling with email_message_id deduplication and displayContactName utility 2026-08-21 19:18:02 +02:00
utils.ts feat(orders): enhance order handling with email_message_id deduplication and displayContactName utility 2026-08-21 19:18:02 +02:00
working-days.ts feat(item-history): add getItemHistory service with 5 PB queries 2026-07-29 14:51:58 +02:00