Commit graph

1207 commits

Author SHA1 Message Date
Alexandre Brandizzi
3e849f47de fix(workorders): retry off-list saves on the conflict's current version 2026-10-02 00:18:43 -03:00
Alexandre Brandizzi
47cdca55c2 fix(workorders): sync the whole saved row into the panel detail
Copying only the version left the cached detail with pre-save fields, so a
queued second panel save could send them with a fresh version and silently
revert what the first save wrote (e.g. POC name).
2026-10-02 00:11:11 -03:00
Alexandre Brandizzi
32b4ea0efa fix(workorders): chain saved versions when the panel detail never loaded
Keep the last saved row per work order so a queued panel save does not depend
on the board-detail cache, and pass the completion-doc row as a fallback so
saving a completion document works after the order leaves the list.
2026-10-02 00:05:10 -03:00
Alexandre Brandizzi
522fea4db7 fix(workorders): carry each saved version into the panel before the next save
A save from the detail panel left the cached detail on the pre-save version
until its refetch settled, so a quick second save, Cancel WO or Complete could
conflict. The saved row's version now updates the detail cache before the patch
queue releases, and panel patches read their base at run time.
2026-10-01 23:27:17 -03:00
Alexandre Brandizzi
e6548ffa17 refactor(workorders): extract slide-over open-tab effect to meet function size cap 2026-10-01 23:17:33 -03:00
Alexandre Brandizzi
f9b5d3e0ea fix(workorders): save from the detail panel after the order leaves the list
The board patch read the work order version from the loaded list only. Once a
save moved the order out of that list (e.g. to another week), the next save,
Cancel or Complete from the open panel failed for lack of a version. The panel
now passes its server row as the fallback patch base.
2026-10-01 23:05:14 -03:00
Alexandre Brandizzi
84cfc90282
Merge pull request #289 from Sea-Haven-Industries/fix/ab/sh-357-incomplete-empty-schedule
Some checks are pending
Frontend checks / static (push) Waiting to run
Frontend checks / build (push) Waiting to run
Frontend checks / unit (push) Waiting to run
Frontend checks / Visual regression (push) Waiting to run
Frontend checks / browser-smoke (push) Waiting to run
Frontend checks / governance (push) Waiting to run
Frontend checks / ci-complete (push) Blocked by required conditions
Deploy Web / Resolve target (push) Waiting to run
Deploy Web / Deploy SPA to (push) Blocked by required conditions
SH-357: disable Incomplete creation without Schedule On
2026-10-01 19:46:17 +00:00
Alexandre Brandizzi
d1b53105a2 fix(SH-357): reconcile Incomplete after clearing Schedule On 2026-10-01 16:27:24 -03:00
Alexandre Brandizzi
cbb2edf2a6 fix(SH-357): disable Incomplete without a schedule date 2026-10-01 16:10:46 -03:00
npalseahaven
88307764c5
Merge pull request #278 from Sea-Haven-Industries/refactor/react-architecture-cleanup
Some checks are pending
Frontend checks / static (push) Waiting to run
Frontend checks / build (push) Waiting to run
Frontend checks / unit (push) Waiting to run
Frontend checks / Visual regression (push) Waiting to run
Frontend checks / browser-smoke (push) Waiting to run
Frontend checks / governance (push) Waiting to run
Frontend checks / ci-complete (push) Blocked by required conditions
Deploy Web / Resolve target (push) Waiting to run
Deploy Web / Deploy SPA to (push) Blocked by required conditions
refactor: move vendor-portal dispatch actions and 2 pages onto proper data hooks
2026-10-01 18:16:01 +00:00
Alexandre Brandizzi
9fbc166d2f
Merge pull request #287 from Sea-Haven-Industries/fix/ab/sh413-services-registry-thr_9fpik7tdmw
Some checks are pending
Frontend checks / static (push) Waiting to run
Frontend checks / build (push) Waiting to run
Frontend checks / unit (push) Waiting to run
Frontend checks / Visual regression (push) Waiting to run
Frontend checks / browser-smoke (push) Waiting to run
Frontend checks / governance (push) Waiting to run
Frontend checks / ci-complete (push) Blocked by required conditions
Deploy Web / Resolve target (push) Waiting to run
Deploy Web / Deploy SPA to (push) Blocked by required conditions
SH-413: use registry Services in work-order assignment and filters
2026-10-01 00:05:14 +00:00
Alexandre Brandizzi
e5eed78fd2 fix(workorders): bind renamed service label to selected ID 2026-09-30 20:45:40 -03:00
Alexandre Brandizzi
bb8d56d334 fix(workorders): preserve service identity and recover missing links 2026-09-30 20:33:39 -03:00
Alexandre Brandizzi
5ee2f6f374 test(workorders): seed service registry in browser fixtures 2026-09-30 19:43:06 -03:00
Alexandre Brandizzi
7090f6fb04 style(workorders): format registry status component 2026-09-30 19:29:17 -03:00
Alexandre Brandizzi
3b58bceb3d fix(workorders): preserve table and service drafts 2026-09-30 19:22:33 -03:00
Alexandre Brandizzi
48fc415d54 fix(workorders): guard service-linked type changes 2026-09-30 19:00:55 -03:00
Alexandre Brandizzi
d40d4eaffb refactor(workorders): meet maintainability gate 2026-09-30 18:43:00 -03:00
Alexandre Brandizzi
ffbf60d16a fix(workorders): complete service query wiring 2026-09-30 18:24:24 -03:00
Alexandre Brandizzi
64246db1f0 fix(workorders): surface service registry query states 2026-09-30 18:10:39 -03:00
Alexandre Brandizzi
4a7da7cbd5 fix(workorders): retain compatible inactive services 2026-09-30 17:51:31 -03:00
Alexandre Brandizzi
690820f0b9 fix(workorders): order service reassignment around type updates 2026-09-30 17:47:27 -03:00
Alexandre Brandizzi
e35bd2983e fix(workorders): retain completed service snapshot labels 2026-09-30 17:16:41 -03:00
Alexandre Brandizzi
18fefef9a3 fix(workorders): preserve service history on slide-over saves 2026-09-30 17:14:10 -03:00
Alexandre Brandizzi
24107ee3b2 fix(workorders): match renamed service filter aliases 2026-09-30 17:04:44 -03:00
Alexandre Brandizzi
315a26c07d fix(workorders): use service registry in list controls 2026-09-30 17:01:38 -03:00
npal
41ec771a0c fix: stop duplicate global toasts on vendor-portal dispatch actions
All six vendor-portal dispatch mutation hooks lacked meta.suppressErrorToast,
so a failed checklist toggle, signoff, comment, or uplift request/withdraw/
revise raised both the global MutationCache toast (leaking the raw server
message) and the section's own inline error, contradicting this ticket's
"no behavior change" goal versus main's try/catch-only handling.

Also fixes a related gap in checklist-section.tsx: updateItem.isError only
reflects the latest call on the shared mutation observer, so a failed toggle
whose item was not the most recent click showed no error at all. Tracks
failure locally instead, mirroring main's per-call error state.

Added regression coverage with the app's real query client (createAppQueryClient)
for comments, signoff, and uplift withdraw, asserting the inline message shows
and the global toast does not fire; plus a mixed pass/fail concurrent-toggle
case for the checklist.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-30 12:13:35 -05:00
Alexandre Brandizzi
29d235e133
Merge pull request #286 from Sea-Haven-Industries/fix/ab/sh411-empty-technician-thr_9fpik7tdmw
Some checks are pending
Frontend checks / static (push) Waiting to run
Frontend checks / build (push) Waiting to run
Frontend checks / unit (push) Waiting to run
Frontend checks / Visual regression (push) Waiting to run
Frontend checks / browser-smoke (push) Waiting to run
Frontend checks / governance (push) Waiting to run
Frontend checks / ci-complete (push) Blocked by required conditions
Deploy Web / Resolve target (push) Waiting to run
Deploy Web / Deploy SPA to (push) Blocked by required conditions
fix(workorders): preserve explicit no-technician choice
2026-09-29 23:28:14 +00:00
Alexandre Brandizzi
1746ded434 test(e2e): open wizard technician picker from its No technician state 2026-09-29 20:22:31 -03:00
Alexandre Brandizzi
64c53e9da0 fix(workorders): preserve explicit no-technician choice 2026-09-29 20:06:05 -03:00
Alexandre Brandizzi
316cafccaa fix(work-orders): satisfy technician assignment types 2026-09-29 19:30:48 -03:00
Alexandre Brandizzi
55b5441d71 refactor(work-orders): keep technician assignment paths maintainable 2026-09-29 19:26:34 -03:00
Alexandre Brandizzi
262c93b41c test(work-orders): assert completed status as display text 2026-09-29 19:13:51 -03:00
Alexandre Brandizzi
fdbb602e0c test(work-orders): exercise reachable completion controls 2026-09-29 19:10:46 -03:00
Alexandre Brandizzi
5b4da11631 test(work-orders): use visible vendor and technician pickers 2026-09-29 19:05:34 -03:00
Alexandre Brandizzi
1c9b909861 style(work-orders): format technician dialog state 2026-09-29 18:50:08 -03:00
Alexandre Brandizzi
bfdc2dbdec fix(work-orders): retain technician state across editors 2026-09-29 18:42:19 -03:00
Alexandre Brandizzi
5adde3723b fix(work-orders): preserve explicit empty technician assignment 2026-09-29 18:22:30 -03:00
Alexandre Brandizzi
24cbd09a60
Merge pull request #284 from Sea-Haven-Industries/fix/ab/sh-357-pending-table-only-thr_9fpik7tdmw
Some checks are pending
Frontend checks / static (push) Waiting to run
Frontend checks / build (push) Waiting to run
Frontend checks / unit (push) Waiting to run
Frontend checks / Visual regression (push) Waiting to run
Frontend checks / browser-smoke (push) Waiting to run
Frontend checks / governance (push) Waiting to run
Frontend checks / ci-complete (push) Blocked by required conditions
Deploy Web / Resolve target (push) Waiting to run
Deploy Web / Deploy SPA to (push) Blocked by required conditions
SH-357: remove Pending from existing work order status menu
2026-09-29 16:22:11 +00:00
Alexandre Brandizzi
5ace29eda4 test: expect Pending disabled on dated inline draft 2026-09-29 13:12:11 -03:00
Alexandre Brandizzi
7d5d015602 fix: require undated drafts for Pending status 2026-09-29 13:04:51 -03:00
Alexandre Brandizzi
4771f6f8eb test: cover pending schedule date promotion 2026-09-29 12:52:02 -03:00
Alexandre Brandizzi
a61ab1919a test: find pending creation in unscheduled results 2026-09-29 12:43:38 -03:00
Alexandre Brandizzi
52b682283c test: scope pending wizard selection assertion 2026-09-29 12:33:15 -03:00
Alexandre Brandizzi
123b1ec9b5 test: cover pending work order status workflows 2026-09-29 12:25:56 -03:00
Alexandre Brandizzi
c5d0429fa2 style(work-orders): format status menu expectations 2026-09-29 11:46:12 -03:00
Alexandre Brandizzi
b6d5ad8a1e fix(work-orders): hide Pending from existing status menus 2026-09-29 11:28:26 -03:00
Alexandre Brandizzi
73c7094102
Merge pull request #275 from Sea-Haven-Industries/feat/ab/sh-335-wo-site-dialog
Some checks are pending
Frontend checks / static (push) Waiting to run
Frontend checks / build (push) Waiting to run
Frontend checks / unit (push) Waiting to run
Frontend checks / Visual regression (push) Waiting to run
Frontend checks / browser-smoke (push) Waiting to run
Frontend checks / governance (push) Waiting to run
Frontend checks / ci-complete (push) Blocked by required conditions
Deploy Web / Resolve target (push) Waiting to run
Deploy Web / Deploy SPA to (push) Blocked by required conditions
Work Order Site dialog saves contacts and notes to the site
2026-09-28 23:45:53 +00:00
npal
f2ba62fe79 fix: stop checklist toggles from dropping fast consecutive updates
TanStack Query v5 only runs a mutate() call's onSuccess for the latest
call on a shared observer, so checking two items before the first
request resolved silently dropped the first item's onItemUpdated call,
leaving the portal's checkbox out of sync with the server. Switch to
mutateAsync so each call's result is handled independently.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-28 18:30:52 -05:00
Alexandre Brandizzi
301fe44b0c fix(workorders): Site dialog loads legacy site contacts and locks fields while saving
A site saved before the contacts list existed maps with no contacts, only
the legacy contact/phone fields. The site-record sync read the contacts
list alone, so the dialog blanked the POC, blocked a notes-only Save until
the contact was retyped, and when the work order had no POC the legacy
autofill made the diff report a contact edit nobody made. The legacy
contact is now the site's main contact for display, baseline and request.

Save sends the values it had when clicked, so the dialog's fields are now
disabled while the site update is in flight instead of accepting edits
that neither save would include.

The site-update mutation already toasts its own failure, so it sets
meta.suppressErrorToast and the global mutation toast no longer repeats it.
2026-09-25 19:52:03 -03:00