Commit graph

291 commits

Author SHA1 Message Date
Codex Review Integration
1271d3c11e feat(dashboard): dispatcher scope picker, status distribution, region drilldown, perf counts
- SH-336: add the dispatcher-scope picker (All / My WOs / individual) for
  Scheduler/Admin via a new viewAllDispatchersOnDashboard role gate, a static
  'My WOs' label for Dispatcher, and hide the dispatcher tables (and skip their
  queries) when the viewer cannot see all dispatchers. Scope drives dispatcherId
  on stats, workload, performance, and regions (SH-347 contract).
- SH-352: add the Status Distribution module with its empty state and status
  drill-down.
- SH-347: show Assigned/Completed counts and colour the completion rate
  (green >=90, amber 70-89, red <70) on Dispatcher Performance.
- SH-348: drill a region bar into the board region filter; hold the
  unconfirmed 'Unmapped/Other' bucket off the chart.
- SH-349: label Vendor Insights as all-time, company-wide.
- Make the drilldown-filters effect fire only on URL change; add a deterministic
  clock to the status-drilldown test; add the dashboard visual regression spec
  and baselines.
2026-09-17 02:56:31 -03:00
Codex Review Integration
078933ad9a Merge remote-tracking branch 'origin/dev' into feat/ab/sh-336-dashboard 2026-09-17 02:21:15 -03:00
Codex Review Integration
0279cfac64 feat(dashboard): paginate dispatcher tables and fix Aveta drilldown
Workload and Performance page server-side at 10 rows and now return Page,
PageSize, and TotalDispatchers on dev (backend#126/#127), so wire the pager
that SH-346 and SH-347 require: getWorkload/getPerformance send a 1-based
`page` and parse the paging envelope, the hooks and query keys carry the page,
and each dispatcher table renders a 10-row pager. Page state is per-table and
resets on a range change so switching range never lands on an out-of-range
empty page that reads as a false "no dispatchers" state.

Drop `docs=No` from the Aveta Pending drilldown. `docs` filters on
completion-document status, not the Aveta clearance document the tile counts
(SH-294 / backend#138), so it narrowed to the wrong rows. The board has no
missing-Aveta-document filter, so the drilldown is now the Aveta-required work
in the two-day open window — a deliberate superset of the count.
2026-09-17 00:36:55 -03:00
Alexandre Brandizzi
bc40c17285
Merge branch 'dev' into fix/ab/sh-359-wo-board-column-order 2026-09-16 23:44:07 -03:00
Alexandre Brandizzi
440a3d0112
Merge branch 'dev' into feat/ab/sh-222-create-error-copy 2026-09-16 20:56:26 -03:00
Codex Review Integration
c7388ba2d9 fix(dashboard): map breakdown type keys and open performance drill-downs
The Work Order Breakdown object from the backend serializes its keys
without JsonPropertyName, so they arrive lowercase (pm/emergency/reactive/
overdue/other). The mapper copied them straight into `status`, which the
card uses as both label and the `types` drill-down id, and
`workOrderTypeDrilldownSearch` only accepts canonical WOType values — so
every breakdown row rendered lowercase and was inert (SH-354). Route both
mapping branches through a normalizer that maps type keys back to their
canonical labels case-insensitively; `other` is not a WOType, so it stays a
labelled, non-drillable "Other" row, and unknown values (legacy array-shape
lifecycle labels) pass through unchanged.

Dispatcher Performance gated its drill-down on `completionRate > 0`, so a
dispatcher with assigned work but no completions yet was inert here while
drillable from Workload. The drill-down filters by dispatcher + range and
never uses the rate, so gate on identity instead.

Also mock useDashboardTrend in the dashboard page test so it no longer
issues a real request that failed quietly in jsdom.
2026-09-16 20:40:33 -03:00
Alexandre Brandizzi
e272cabe34
Merge branch 'dev' into feat/ab/sh-278-vendor-service-area 2026-09-16 20:00:16 -03:00
Codex Review Integration
1b17cbec01 feat(dashboard): build dashboard experience (SH-336) 2026-09-16 19:37:15 -03:00
Alexandre Brandizzi
aeb6f7d224
Merge branch 'dev' into fix/ab/sh-341-generate-completes-work-order 2026-09-16 19:32:26 -03:00
Alexandre Brandizzi
40301e23ab
Merge branch 'dev' into feat/ab/sh-278-vendor-service-area 2026-09-16 19:32:20 -03:00
Alexandre Brandizzi
68c4809a16
Merge branch 'dev' into fix/ab/sh-341-generate-completes-work-order 2026-09-16 19:18:28 -03:00
Alexandre Brandizzi
331de59f97
Merge branch 'dev' into feat/ab/sh-278-vendor-service-area 2026-09-16 19:18:25 -03:00
Alexandre Brandizzi
638e33af72
Merge branch 'dev' into feat/ab/sh-235-severity-badge 2026-09-16 19:18:21 -03:00
Alexandre Brandizzi
7876b6ca42
Merge branch 'dev' into feat/ab/sh-278-vendor-service-area 2026-09-16 18:52:29 -03:00
Alexandre Brandizzi
dd34e79e19
Merge branch 'dev' into fix/ab/sh-356-due-date-after-schedule 2026-09-16 18:52:26 -03:00
Alexandre Brandizzi
79f9e52870
Merge branch 'dev' into fix/ab/sh-341-generate-completes-work-order 2026-09-16 18:50:23 -03:00
Alexandre Brandizzi
1e15eab573
Merge branch 'dev' into feat/ab/sh-235-severity-badge 2026-09-16 18:50:17 -03:00
Alexandre Brandizzi
55723a1cfd
Merge branch 'dev' into fix/ab/sh-341-generate-completes-work-order 2026-09-16 18:38:38 -03:00
Alexandre Brandizzi
42b5642fec
Merge branch 'dev' into feat/ab/sh-278-vendor-service-area 2026-09-16 18:38:29 -03:00
Alexandre Brandizzi
d3b74afe5a
Merge branch 'dev' into feat/ab/sh-235-severity-badge 2026-09-16 18:38:26 -03:00
Alexandre Brandizzi
b746087d0b
Merge branch 'dev' into fix/ab/sh-356-due-date-after-schedule 2026-09-16 18:38:23 -03:00
Alexandre Brandizzi
0f34e8c7c6
Merge branch 'dev' into fix/ab/sh-371-pm-extra-media-gallery 2026-09-16 18:38:14 -03:00
Alexandre Brandizzi
754912c643
Merge branch 'dev' into fix/ab/sh-371-pm-extra-media-gallery 2026-09-16 18:28:19 -03:00
Alexandre Brandizzi
daaf588793
Merge branch 'dev' into feat/ab/sh-278-vendor-service-area 2026-09-16 18:26:26 -03:00
Alexandre Brandizzi
f2df213965
Merge branch 'dev' into feat/ab/sh-235-severity-badge 2026-09-16 18:26:23 -03:00
Alexandre Brandizzi
49fd0b039c
Merge branch 'dev' into fix/ab/sh-356-due-date-after-schedule 2026-09-16 18:26:20 -03:00
Alexandre Brandizzi
99f57b9c89
Merge branch 'dev' into fix/ab/sh-341-generate-completes-work-order 2026-09-16 18:24:22 -03:00
Alexandre Brandizzi
632d01f373
Merge branch 'dev' into fix/ab/sh-357-sh-358-status-transitions 2026-09-16 18:22:16 -03:00
Alexandre Brandizzi
d872e08a2b
Merge branch 'dev' into fix/ab/sh-341-generate-completes-work-order 2026-09-16 18:16:14 -03:00
Alexandre Brandizzi
71432ac586
Merge branch 'dev' into fix/ab/sh-357-sh-358-status-transitions 2026-09-16 18:08:14 -03:00
Alexandre Brandizzi
ad1fd7ebf9
Merge branch 'dev' into fix/ab/sh-361-sh-363-audit-log-entries 2026-09-16 18:08:11 -03:00
Adam Moussa
e95a720630
Merge branch 'dev' into feat/ab/sh-222-create-error-copy 2026-09-16 16:46:27 -04:00
Codex Review Integration
38ea40d6ca Merge origin/dev into feat/ab/sh-278-vendor-service-area 2026-09-16 16:08:12 -03:00
Codex Review Integration
8774b2e0a6 fix(work-orders): render PM extra media in the gallery (SH-371)
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-16 15:23:24 -03:00
Alexandre Brandizzi
2d8a35a08a
Merge branch 'dev' into fix/ab/sh-359-wo-board-column-order 2026-09-16 15:08:07 -03:00
Codex Review Integration
62825d2c70 chore(workorders): remove ticket keys from column comments 2026-09-16 15:05:25 -03:00
Alexandre Brandizzi
1f405bbcaf
Merge branch 'dev' into fix/ab/sh-356-due-date-after-schedule 2026-09-16 15:03:34 -03:00
Alexandre Brandizzi
07734d8361
SH-138: manage ordered site contacts (#191)
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 dev content / Deploy shoc-frontend-new-dev through Terraform (push) Waiting to run
* feat(locations): derive site areas from state

* chore(locations): keep ticket keys out of source comments

* feat(locations): manage ordered site contacts

---------

Co-authored-by: Codex Review Integration <codex-review@local.invalid>
2026-09-16 14:53:58 -03:00
Alexandre Brandizzi
30c43a4d86
SH-281: group vendor directory rows by company (#188)
* fix(vendors): add accessible trade overflow tooltip

* fix(vendors): add accessible trade overflow tooltip

* refactor(vendors): satisfy row maintainability gate

* feat(vendors): group directory rows by company

* chore(vendors): trigger SH-281 review checks

* test(vendors): align company directory visuals

* test(vendors): complete company visual baselines

* fix(vendors): keep empty states in viewport

* test(vendors): align centered empty baseline

* fix(vendors): use grouped directory endpoint

* test(vendors): follow grouped directory endpoint

* test(vendors): refresh combined visual snapshots

---------

Co-authored-by: Codex Review Integration <codex-review@local.invalid>
2026-09-16 14:40:24 -03:00
Codex Review Integration
b4d2d69abe fix(work-orders): keep Due Date on or after Schedule On 2026-09-16 13:32:44 -03:00
Codex Review Integration
4649fd00da fix(work-orders): place Completed Date before Comp Doc on the board 2026-09-16 13:21:48 -03:00
Codex Review Integration
2bff7176be feat(vendors): add Service Area assignment, filter and column
Replace the free-text vendor State with a closed 50-state list, add an
admin-only Service Area select below Notes, a Service Area advanced filter
(stable ids plus Unassigned) and a Service Area directory column.
2026-09-16 11:55:40 -03:00
Codex Review Integration
f6a22a9096 fix(work-orders): offer only valid manual status transitions inline (SH-357, SH-358)
The inline status control no longer offers the automatic Incomplete and
Scheduled states or the work order's current status. Inline create keeps its
explicit Incomplete/Pending/Scheduled creation list.
2026-09-16 11:43:34 -03:00
Codex Review Integration
e46e42df69 fix(work-orders): show full audit timestamps and previous type values (SH-361, SH-363)
Audit Log entries now show date and time for every entry instead of a
time-only stamp for manual changes. Type and Severity entries read
'Changed Type from X to Y', a severity cleared by a type correction reads
'from SEV N to —', and the generic fallback no longer renders a raw
FieldChanged action name.
2026-09-16 11:43:34 -03:00
Codex Review Integration
09636ef590 fix(work-orders): complete the work order when its completion document is generated (SH-341)
Generating or uploading the completion document now moves a closable work
order to Completed without the manual confirmation, as SH-115 requires. The
SH-114 closability gate is evaluated on the row the server returned after the
document save; Save draft, Not required, Past Due, Completed and Canceled rows
are never auto-completed. The follow-up status patch uses that row's
rowVersion so it does not conflict with the document save.
2026-09-16 11:43:33 -03:00
Codex Review Integration
3ad07c9e10 fix(work-orders): keep backend validation text out of create error toasts
Board create failures toasted the backend message verbatim, exposing
field names such as siteCode and vendorId from the inline row and the
wizard. Map known codes to product copy and fall back to generic copy
for every other failure.
2026-09-16 11:17:37 -03:00
Codex Review Integration
f48342f268 test(work-orders): guard SH-235 severity tooltip and escalation toast rules 2026-09-16 11:01:06 -03:00
Codex Review Integration
83df262ab6 Merge remote-tracking branch 'origin/dev' into feat/ab/sh-281-company-directory 2026-09-15 19:12:21 -03:00
Arthur Bassi
fc3e7591dc
fix(work-orders): add Unscheduled option to Advanced Filters Date range (#181)
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 dev content / Deploy shoc-frontend-new-dev through Terraform (push) Waiting to run
* fix(work-orders): add Unscheduled option to Advanced Filters Date range

* fix(work-orders): page unscheduled results server-side

---------

Co-authored-by: Codex Review Integration <codex-review@local.invalid>
Co-authored-by: Alexandre Brandizzi <alex_brandizzi@hotmail.com>
2026-09-15 19:11:35 -03:00
Codex Review Integration
b83514a240 Merge remote-tracking branch 'origin/dev' into feat/ab/sh-281-company-directory
# Conflicts:
#	e2e/vendors/vendors.spec.ts
#	src/app/(protected)/vendors/_components/vendors-table.tsx
#	src/test/app/(protected)/vendors/vendors-list.test.tsx
2026-09-15 19:08:53 -03:00