Commit graph

14 commits

Author SHA1 Message Date
SJCoetz
dd57d29de3 feat(stock-orders): attachments card on detail page
Co-authored-by: Orca <help@stably.ai>
2026-08-06 23:29:00 +02:00
SJCoetz
e3295e3c13 chore(stock-orders): suppress set-state-in-effect lint on edit-mode seed effect
The seeding useEffect copies line qty/cost into the per-line edit
buffers when the targeted draft loads (or when the target changes).
The setState is intentional — the buffer is mirrored from the parent
draft's authoritative data — and the same suppress pattern is used
in src/app/(app)/collection-confirm/page.tsx and elsewhere.

Co-Authored-By: Claude <noreply@anthropic.com>

Co-authored-by: Orca <help@stably.ai>
2026-07-31 14:07:06 +02:00
SJCoetz
5e91a5d7c0 test(stock-orders): QuickDraftModal edit-mode coverage
Asserts the modal hides non-targeted drafts, renders qty/cost inputs
per line, PATCHes only changed fields on Save, and that remove still
works in edit mode.

Co-authored-by: Orca <help@stably.ai>
2026-07-31 13:58:05 +02:00
SJCoetz
2303d8a29d feat(stock-orders): QuickDraftModal edit mode for draft lines
Adds an optional editPurchaseId prop. When set, the modal hides all
other drafts and renders per-line qty/cost inputs + a Save button that
PATCHes /api/v1/stock-quick-draft/line/[lineId]. Remove still works.
Search + add still works to add more lines to the same draft.

Co-authored-by: Orca <help@stably.ai>
2026-07-31 13:54:08 +02:00
SJCoetz
6329a100e7 fix(stock-quick-draft): isolate new-SKU suppliers, fix empty-string pick, service layer
Co-authored-by: Orca <help@stably.ai>
2026-07-30 23:31:21 +02:00
SJCoetz
dfae2d0c8b feat(stock-quick-draft): no-history supplier dropdown fallback
Co-authored-by: Orca <help@stably.ai>
2026-07-30 23:18:48 +02:00
SJCoetz
8acb6dcf95 fix(stock-quick-draft): dedicated /drafts endpoint with nested shape, browser-auth
Co-authored-by: Orca <help@stably.ai>
2026-07-30 23:11:27 +02:00
SJCoetz
29ffcbdc8d feat(stock-quick-draft): cards region with remove + footer buttons
Co-authored-by: Orca <help@stably.ai>
2026-07-30 23:04:43 +02:00
SJCoetz
1b7552ffd2 fix(stock-quick-draft): new-SKU supplier picker reachable, closure guard, submit test
Co-authored-by: Orca <help@stably.ai>
2026-07-30 22:57:17 +02:00
SJCoetz
75342ed88c feat(stock-quick-draft): qty/cost row + Add & next + new-SKU toggle
Co-Authored-By: Claude <noreply@anthropic.com>

Co-authored-by: Orca <help@stably.ai>
2026-07-30 22:43:17 +02:00
SJCoetz
275d17b76a fix(stock-quick-draft): race-guard search, surface API errors, deterministic test timing
Co-authored-by: Orca <help@stably.ai>
2026-07-30 22:35:35 +02:00
SJCoetz
b099e2b42e feat(stock-quick-draft): modal search + supplier-history regions
Co-authored-by: Orca <help@stably.ai>
2026-07-30 22:21:10 +02:00
SJCoetz
cdbf91526f refactor(stock-quick-draft): useState lazy init, sr-only title, trim mock stubs
Co-authored-by: Orca <help@stably.ai>
2026-07-30 22:19:21 +02:00
SJCoetz
2d4d0df6d1 feat(stock-quick-draft): modal skeleton + Stock Order Reference header
Co-authored-by: Orca <help@stably.ai>
2026-07-30 22:15:51 +02:00