mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-09-30 06:53:12 +00:00
Adversarial review found a last-writer-wins window: after a stale 409 the roster is refetched while the form keeps its pre-conflict values, so the form-vs-roster diff resent our stale value for any company field another user changed in that window, silently reverting their edit. Transmit only fields the user actually edited, taken from react-hook-form dirty state. Selecting a company calls reset(), so loaded values are never dirty and only genuine edits are sent. dirtyFields is resolved during render: formState is a Proxy that only tracks properties read at render time, so reading it inside the submit callback returned empty. The vendors E2E caught that; unit tests could not, since they pass the flags in directly. |
||
|---|---|---|
| .. | ||
| vendor-operations.spec.ts | ||
| vendor-uplift-workflow.spec.ts | ||
| vendors.spec.ts | ||
| vendors.visual.spec.ts | ||