The browser smoke encoded the behaviour this ticket changes: it asserted
the Deactivate button was disabled when work orders were linked. It now
asserts the opposite — the work orders are listed as links, "Deactivate
anyway" is enabled, and confirming sends confirmOpenWorkOrders=true.
Also fixes the mock's DELETE route, whose anchored pattern stopped
matching once the request carried a query string. The raced-409 case is
unchanged and still preserves the vendor.
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.
* feat(vendors): align directory UI with prototype
* fix(vendors): report the filtered total
* fix(vendors): keep company input in sync
* fix(vendors): scope facets to directory status