WFDASH-WEBAPP/src/components
Dave c22e9d1bd6 feat(delivery-notes): lock the cost price, markup stays the only input
A delivery note's cost price is what the business paid. Editing it
while setting a margin rewrites that silently, so a stray keystroke
changes every downstream number on the note without ever looking like
a pricing decision.

The rule lives in quote-pricing.ts as a `costLocked` flag captured at
load time, and repriceLine DROPS a cost patch on a locked line. That
is the guarantee; the read-only cell in the UI is only the
convenience, so no caller can quietly rewrite the cost.

- "Edit note" and "Create quote" grids: cost is read-only with a lock
  icon once the line arrived costed; a blank cost stays fillable and
  still seeds the 25% default markup on first entry.
- readOnly, not disabled, so the number can still be selected and
  checked against a supplier invoice.
- Locked at load, not per keystroke: a cost typed in this session
  stays correctable until save (an operator choice), and locks on the
  next open because the row then carries the cost.
- The DN detail page's edit mode is untouched — it stays the
  deliberate "that cost is simply wrong" correction path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-10-15 15:44:24 +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 feat(collection-confirm): add clearing actions and improve review UI 2026-10-13 11:54:16 +02:00
delivery-notes feat(delivery-notes): lock the cost price, markup stays the only input 2026-10-15 15:44:24 +02:00
giellie fix(giellie): pin Approve/Reject above a scrolling list on long approvals 2026-10-01 08:32:04 +02:00
invoicing
orders feat(audit): implement audit trail for delivery notes and orders 2026-09-30 01:48:44 +02:00
purchase-orders
quotes feat(delivery-notes): edit the note before quoting, and fix the QuickBooks error 2026-10-09 09:27:09 +02:00
reports feat(audit): implement audit trail for delivery notes and orders 2026-09-30 01:48:44 +02:00
stock-orders
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
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
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 fix(search): send the PB auth token, and a second instance of the same bug 2026-10-14 11:49:30 +02:00
customer-form.tsx fix(search): send the PB auth token, and a second instance of the same bug 2026-10-14 11:49:30 +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
order-item-context-panel.tsx
order-item-context-popover-trigger.test.tsx
order-item-context-popover-trigger.tsx
order-sprint-process-modal.test.tsx
order-sprint-process-modal.tsx
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 fix(sidebar): top-level nav rendered only dashboardItems[0] 2026-10-14 11:03:04 +02:00
sidebar.tsx fix(sidebar): top-level nav rendered only dashboardItems[0] 2026-10-14 11:03:04 +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