mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-10-03 06:53:24 +00:00
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. |
||
|---|---|---|
| .. | ||
| dashboard-page.test.tsx | ||