Commit graph

768 commits

Author SHA1 Message Date
Alexandre Brandizzi
3e5fba4d2b
Merge pull request #225 from Sea-Haven-Industries/feat/ab/sh-292-notification-center
Some checks are pending
Frontend checks / Build and test (push) Waiting to run
Frontend checks / governance (push) Waiting to run
Frontend checks / Visual regression (push) Waiting to run
Deploy Web / Resolve target (push) Waiting to run
Deploy Web / Deploy SPA to (push) Blocked by required conditions
SH-292: Notification Center panel and feed
2026-09-18 23:33:59 +00:00
Alexandre Brandizzi
cbfed3dde8
Merge pull request #226 from Sea-Haven-Industries/feat/ab/sh-209-uplift-detail-modal
SH-209: Align the Uplift Detail modal with the spec
2026-09-18 23:33:55 +00:00
Alexandre Brandizzi
f25a3dd628
Merge pull request #228 from Sea-Haven-Industries/fix/ab/sh-379-poc-persist
Persist manual POC edits via dedicated POC endpoint (SH-379)
2026-09-18 23:33:52 +00:00
Alexandre Brandizzi
de7066d31b
Merge branch 'main' into fix/ab/sh-380-completion-pdf-post-upload-error 2026-09-18 19:33:59 -03:00
Alexandre Brandizzi
7fdf85fc47
Merge branch 'main' into feat/ab/sh-304-services-registry-ui 2026-09-18 19:21:21 -03:00
Alexandre Brandizzi
7eb7e4a730
Merge branch 'main' into fix/ab/sh-380-completion-pdf-post-upload-error 2026-09-18 19:21:18 -03:00
Alexandre Brandizzi
7c1243eec3
Merge branch 'main' into feat/ab/sh-304-services-registry-ui 2026-09-18 19:09:49 -03:00
Alexandre Brandizzi
744d7af7bb
Merge branch 'main' into feat/ab/sh-382-extra-doc-view 2026-09-18 19:09:47 -03:00
Alexandre Brandizzi
e3afa182d6
Merge branch 'main' into fix/ab/sh-380-completion-pdf-post-upload-error 2026-09-18 19:09:44 -03:00
Alexandre Brandizzi
8d50c6f75e fix(work-orders): stop the stale-version docStatus patch after a signed PDF upload (SH-380)
The completion-doc upload endpoint sets DocStatus=Yes and bumps the work-order row
version in one transaction. Both signed-PDF upload paths then re-ran a "docStatus=Yes"
work-order patch using the pre-upload row version (the comp-doc dialog re-ran the whole
Generate flow; the slide-over posted docStatus directly). That patch always 409'd — and
in the dialog it also demanded a Date Work Completed — so a successful upload surfaced an
error to the user.

Both paths now stop after the upload settles: the mutation's onSuccess refreshes the
board and the UI reflects the generated state locally, with no second docStatus patch.
2026-09-18 16:59:24 -03:00
Alexandre Brandizzi
1a7a4ba58f fix(work-orders): open extra documents without credentialed CORS (SH-382)
Viewing a work-order extra document called the authorized content endpoint
with `credentials: "include"`. The API replies `Access-Control-Allow-Origin: *`,
and in credentialed mode the browser rejects a wildcard origin outright, so the
fetch threw, `openExtraDocContent` fell into its catch, closed the tab and
toasted "Unable to open this document." — QA CT-03.

The endpoint authenticates with the bearer token the ky beforeRequest hook
attaches, not cookies, so credentials mode was dead weight. List, upload and
delete never set it, which is why only viewing failed. Drop the option and
guard the request shape in a test (JSDOM cannot enforce CORS).
2026-09-18 16:35:01 -03:00
Codex Review Integration
84568dd737 refactor(workorders): extract board patch api module
work-orders-api.ts exceeded the 500-line godfile cap after adding
updatePoc. Move patchBoardField/updatePoc and their shared response
handling into work-order-board-patch-api.ts and re-export through
workOrdersApi, mirroring workOrderBoardDocumentsApi.
2026-09-18 15:03:59 -03:00
Codex Review Integration
3b1da21abb fix(workorders): preserve partial POC edits 2026-09-18 15:00:01 -03:00
Codex Review Integration
5b0c758a9f fix(workorders): persist manual POC edits via dedicated POC endpoint (SH-379)
The UI dropped manual POC edits before they reached the API: the patch
mapper listed pocName/pocPhone/pocNotes as local-only keys and the
slide-over draft excluded them from Save, so the optimistic edit vanished
on refetch and the completion freeze captured the Site contact instead.

- Emit one composite POC op from table patches and route it through a new
  workOrdersApi.updatePoc (PATCH workorders/{id}/poc), reusing the board
  patch row/error contract (409 conflict with currentState, 422 validation).
- Include POC scalars in slide-over edit keys so dirty state and Save carry
  them; site dialog and slide-over now both persist POC edits.
2026-09-18 14:44:06 -03:00
Codex Review Integration
8b122ad71c fix: satisfy governance hook line limits 2026-09-18 14:38:27 -03:00
Codex Review Integration
062a1e26c8 fix: resolve notification review findings 2026-09-18 14:23:43 -03:00
Codex Review Integration
988c96c42d fix(notifications): keep vendor reminder actions and refresh header baselines
No Vendor opens the work order form on vendor assignment and Vendor Conflict
links each work order, as the vendor reminders did. Header baselines include the
notification bell, and the top bar user menu moves to its own component to stay
within the function-size gate. The vendor e2e now covers the feed contract.
2026-09-18 13:34:12 -03:00
Codex Review Integration
33d0ab4fd6 test(uplifts): scope modal permission and date assertions to what they prove
The permission spec asserts the work order renders from the queue item
and, separately, that only the approved-on-WO breakdown degrades to
Unavailable. The Requested At assertion derives the local calendar day
so it holds in every runner time zone.
2026-09-18 13:02:11 -03:00
Codex Review Integration
dcf944d7dc SH-292: Notification Center bell panel and feed page
Header bell panel and /notifications page share one feed from GET /api/notifications: labeled sections with live counts, unread styling, session-only dismiss and clear all (acknowledge rows excluded), and deep links to the unassigned queue and a work order's tab via ?wo=&tab=.
2026-09-18 12:55:54 -03:00
Codex Review Integration
3c84d851c0 feat(uplifts): align uplift detail modal with SH-209
Two sections, Work order and Uplift request, divided by a single rule.
Work order shows Service, Vendor / Technician, Assigned Dispatcher and
Scheduled from the queue item, so it no longer fetches the work order
and no longer degrades to Unavailable for account-scoped staff. Uplift
request shows Requested By, Requested At, the justification in a
bordered block, the approved-on-WO breakdown and a horizontal
attachment row whose chips open the evidence in a new tab. Every field
renders data or an explicit placeholder. The footer shows Reject and
Approve for pending uplifts, Revoke for approved ones and nothing for
read-only records; closing is the header X.
2026-09-18 12:53:55 -03:00
Alexandre Brandizzi
c9562650ca
Merge branch 'dev' into fix/ab/sh-364-inline-technician-registration 2026-09-18 11:59:16 -03:00
Alexandre Brandizzi
e780bafdd8
Merge branch 'dev' into feat/ab/sh-304-services-registry-ui 2026-09-18 11:59:13 -03:00
Alexandre Brandizzi
5f2d120965
Merge branch 'dev' into fix/ab/sh-339-wizard-complete-image 2026-09-17 16:02:15 -03:00
Alexandre Brandizzi
1ee4bbef7e
Merge branch 'dev' into fix/ab/sh-339-wizard-complete-image 2026-09-17 15:46:18 -03:00
Alexandre Brandizzi
3058a96edb
Merge branch 'dev' into fix/ab/sh-368-completion-uploads 2026-09-17 15:46:15 -03:00
Codex Review Integration
28ff14d457 Merge remote-tracking branch 'origin/dev' into feat/ab/sh-304-services-registry-ui
# Conflicts:
#	src/test/lib/auth/user-utils.test.ts
2026-09-17 15:34:52 -03:00
Codex Review Integration
8a0a134238 style: format wizard-vendor-company-fields with prettier 2026-09-17 15:31:15 -03:00
Alexandre Brandizzi
bff5ed138b
Merge branch 'dev' into fix/ab/sh-339-wizard-complete-image 2026-09-17 15:30:22 -03:00
Alexandre Brandizzi
3a6f101776
Merge branch 'dev' into fix/ab/sh-368-completion-uploads 2026-09-17 15:30:20 -03:00
Alexandre Brandizzi
d53507731e
Merge branch 'dev' into feat/ab/sh-326-team-member 2026-09-17 15:30:16 -03:00
Codex Review Integration
abe28a3a7f Merge remote-tracking branch 'origin/dev' into fix/ab/sh-364-inline-technician-registration
# Conflicts:
#	src/app/(protected)/workorders/_components/wizard/use-new-wo-wizard-controller.ts
#	src/app/(protected)/workorders/_components/wizard/wizard-step-location-service-select.tsx
#	src/app/(protected)/workorders/_components/wizard/wizard-step-vendor-time.tsx
#	src/test/app/(protected)/workorders/wizard-service-clears-vendor.test.tsx
2026-09-17 15:27:39 -03:00
Alexandre Brandizzi
948ce278de
Merge branch 'dev' into fix/ab/sh-339-wizard-complete-image 2026-09-17 15:16:30 -03:00
Alexandre Brandizzi
b9c3b11a74
Merge branch 'dev' into fix/ab/sh-368-completion-uploads 2026-09-17 15:16:27 -03:00
Alexandre Brandizzi
9ed8099e71
Merge branch 'dev' into feat/ab/sh-304-services-registry-ui 2026-09-17 15:16:25 -03:00
Alexandre Brandizzi
6eacdc09f6
Merge branch 'dev' into feat/ab/sh-336-dashboard 2026-09-17 15:16:22 -03:00
Alexandre Brandizzi
873e3e32de
Merge branch 'dev' into feat/ab/sh-326-team-member 2026-09-17 15:16:18 -03:00
Alexandre Brandizzi
361f6b65a2
Merge branch 'dev' into feat/ab/sh-304-services-registry-ui 2026-09-17 15:10:25 -03:00
Alexandre Brandizzi
0876e9c3f0
Merge branch 'dev' into feat/ab/sh-336-dashboard 2026-09-17 15:10:22 -03:00
Alexandre Brandizzi
5b6991c93a
Merge branch 'dev' into feat/ab/sh-326-team-member 2026-09-17 15:10:19 -03:00
Alexandre Brandizzi
bca906f900
Merge branch 'dev' into fix/ab/sh-339-wizard-complete-image 2026-09-17 15:02:23 -03:00
Alexandre Brandizzi
534d7ce4d6
Merge branch 'dev' into fix/ab/sh-364-inline-technician-registration 2026-09-17 15:02:19 -03:00
Alexandre Brandizzi
f5da80cd6e
Merge branch 'dev' into fix/ab/sh-368-completion-uploads 2026-09-17 15:02:16 -03:00
Alexandre Brandizzi
bf916019f9
Merge branch 'dev' into fix/ab/sh-321-wizard-vendor-notes 2026-09-17 15:02:13 -03:00
Codex Review Integration
bbdf418ee3 refactor(services): extract useServiceEditor to satisfy maintainability gate
useServicesRegistryController exceeded the changed-file max-lines-per-function
budget (158 > 150). Move the add/edit form lifecycle into a useServiceEditor
sub-hook; the controller's public return shape and behavior are unchanged.
2026-09-17 14:55:05 -03:00
Alexandre Brandizzi
8d2c947c54
Merge branch 'dev' into fix/ab/sh-339-wizard-complete-image 2026-09-17 14:48:30 -03:00
Alexandre Brandizzi
65d55d7c9f
Merge branch 'dev' into fix/ab/sh-364-inline-technician-registration 2026-09-17 14:48:26 -03:00
Alexandre Brandizzi
b149d3c275
Merge branch 'dev' into fix/ab/sh-368-completion-uploads 2026-09-17 14:48:23 -03:00
Alexandre Brandizzi
318859fb1b
Merge branch 'dev' into fix/ab/sh-321-wizard-vendor-notes 2026-09-17 14:48:19 -03:00
Alexandre Brandizzi
ff4ecb37e4
Merge branch 'dev' into feat/ab/sh-304-services-registry-ui 2026-09-17 14:48:16 -03:00
Alexandre Brandizzi
2d5e7cdd42
Merge branch 'dev' into fix/ab/frontend-test-stability 2026-09-17 14:48:13 -03:00