Commit graph

786 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
7679c28682 refactor(dashboard): extract dispatcher tables into a section component
Move the two paged dispatcher cards and their paging view-model derivation out
of DashboardPage into DispatcherTablesSection (a fragment, so both cards remain
direct children of the dashboard grid). This keeps DashboardPage under the
project complexity threshold after the pager additions, with no change to the
rendered layout or behaviour.
2026-09-17 00:46:39 -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
5e4999b4f2
Merge pull request #207 from Sea-Haven-Industries/fix/ab/sh-359-wo-board-column-order
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
SH-359: place Completed Date before Comp Doc
2026-09-16 23:54:15 -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
ffaa91bb1b
Merge pull request #194 from Sea-Haven-Industries/feat/ab/sh-222-create-error-copy
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
SH-222: keep backend validation text out of create error toasts
2026-09-16 21:54:18 -03:00
Alexandre Brandizzi
440a3d0112
Merge branch 'dev' into feat/ab/sh-222-create-error-copy 2026-09-16 20:56:26 -03:00
Alexandre Brandizzi
9fb2cc9702
Merge pull request #208 from Sea-Haven-Industries/fix/ab/sh-369-completion-doc-service-gate
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
SH-369: keep completion document disabled until a service is selected
2026-09-16 20:44:14 -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
5d5581209a
Merge branch 'dev' into fix/ab/sh-369-completion-doc-service-gate 2026-09-16 20:30:14 -03:00
Alexandre Brandizzi
f25aea8bac
Merge pull request #200 from Sea-Haven-Industries/feat/ab/sh-278-vendor-service-area
SH-278: add vendor Service Area assignment, filter and column
2026-09-16 20:26:17 -03:00
Alexandre Brandizzi
fc21321148
Merge branch 'dev' into feat/ab/sh-278-vendor-service-area 2026-09-16 20:16:18 -03:00
Alexandre Brandizzi
20662b57c1
Merge branch 'dev' into fix/ab/sh-369-completion-doc-service-gate 2026-09-16 20:16:13 -03:00
Alexandre Brandizzi
b9535e1484
Merge pull request #199 from Sea-Haven-Industries/feat/ab/sh-195-date-header-tooltips
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
SH-195: Date column header tooltips
2026-09-16 20:12:13 -03:00
Codex Review Integration
9722805300 Merge remote-tracking branch 'origin/dev' into fix/ab/sh-369-completion-doc-service-gate
# Conflicts:
#	src/app/(protected)/workorders/_components/detail/tabs/slide-over-completion-tab.tsx
2026-09-16 20:03:04 -03:00
Alexandre Brandizzi
bbc955e6fe
Merge branch 'dev' into feat/ab/sh-195-date-header-tooltips 2026-09-16 20:00:20 -03:00
Alexandre Brandizzi
e272cabe34
Merge branch 'dev' into feat/ab/sh-278-vendor-service-area 2026-09-16 20:00:16 -03:00
Alexandre Brandizzi
4f661813d1
Merge pull request #197 from Sea-Haven-Industries/fix/ab/sh-341-generate-completes-work-order
SH-341: complete the work order when the completion document is generated
2026-09-16 19:56:11 -03:00
Alexandre Brandizzi
12d4a0c4b8
Merge branch 'dev' into fix/ab/sh-341-generate-completes-work-order 2026-09-16 19:46:33 -03:00
Alexandre Brandizzi
c6ed6072ff
Merge branch 'dev' into feat/ab/sh-195-date-header-tooltips 2026-09-16 19:46:30 -03:00
Alexandre Brandizzi
1c1c6b5670
Merge branch 'dev' into feat/ab/sh-278-vendor-service-area 2026-09-16 19:46:26 -03:00
Alexandre Brandizzi
c0a20e74ac
Merge pull request #192 from Sea-Haven-Industries/fix/ab/sh-194-week-scoped-search
SH-194: Keep keyword search week-scoped and Advanced Filters global
2026-09-16 19:42:24 -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
f752ced38d
Merge branch 'dev' into feat/ab/sh-195-date-header-tooltips 2026-09-16 19:32:23 -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
3ec6540271
Merge branch 'dev' into fix/ab/sh-194-week-scoped-search 2026-09-16 19:30:44 -03:00
Alexandre Brandizzi
d40090a5c0
Merge pull request #201 from Sea-Haven-Industries/feat/ab/sh-235-severity-badge
SH-235: guard severity tooltip and escalation toast rules with tests
2026-09-16 19:30:23 -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
Codex Review Integration
04f8b51eab refactor(work-orders): use Tailwind tokens for search scope label
Swap the inline fontSize/color on the week-scope status label for the
text-(length:--text-xs) and text-muted-foreground classes already used
across the header, so it tracks future token changes. --text-xs is 11px
and text-muted-foreground resolves to --muted-foreground, so rendering is
unchanged.
2026-09-16 19:17:28 -03:00
Alexandre Brandizzi
9cce2966f1
Merge branch 'dev' into feat/ab/sh-195-date-header-tooltips 2026-09-16 19:16:15 -03:00
Alexandre Brandizzi
dabdc86c69
Merge pull request #204 from Sea-Haven-Industries/fix/ab/sh-356-due-date-after-schedule
SH-356: keep Due Date on or after Schedule On
2026-09-16 19:14:18 -03:00
Alexandre Brandizzi
33a979c79d
Merge branch 'dev' into fix/ab/sh-341-generate-completes-work-order 2026-09-16 19:04:30 -03:00
Alexandre Brandizzi
0ca032ef8f
Merge branch 'dev' into feat/ab/sh-195-date-header-tooltips 2026-09-16 19:04:26 -03:00
Alexandre Brandizzi
0b219311b5
Merge branch 'dev' into feat/ab/sh-278-vendor-service-area 2026-09-16 19:04:23 -03:00
Alexandre Brandizzi
448ba70d87
Merge branch 'dev' into feat/ab/sh-235-severity-badge 2026-09-16 19:04:20 -03:00
Alexandre Brandizzi
51739fd155
Merge branch 'dev' into fix/ab/sh-356-due-date-after-schedule 2026-09-16 19:04:17 -03:00
Alexandre Brandizzi
2583ad63d1
Merge pull request #198 from Sea-Haven-Industries/feat/ab/sh-197-inline-create-fields
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
SH-197: inline create cells as fields with persistent required asterisks
2026-09-16 19:00:20 -03:00
Alexandre Brandizzi
f33580972d
Merge branch 'dev' into feat/ab/sh-195-date-header-tooltips 2026-09-16 18:52:33 -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
5d1b6e5aa0
Merge branch 'dev' into feat/ab/sh-197-inline-create-fields 2026-09-16 18:50:20 -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
77b679b8f6
Merge pull request #209 from Sea-Haven-Industries/fix/ab/sh-371-pm-extra-media-gallery
SH-371: show extra media in the gallery on PM work orders
2026-09-16 18:48: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
8b5b5903fa
Merge branch 'dev' into feat/ab/sh-197-inline-create-fields 2026-09-16 18:38:35 -03:00