feat(dashboard): Add Shipment Exception Rate Dashboard (issue #417)#464
Merged
Damidesign merged 2 commits intoJun 28, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Closes #417
Adds a Shipment Exception Rate Dashboard to help operations monitor and resolve shipment exceptions (delays, damage, lost shipments, returns, customs holds) from within the app.
What I changed
Added new page:
frontend/src/pages/dashboard/ExceptionDashboard.tsx
frontend/src/pages/dashboard/ExceptionDashboard.test.tsx
Registered route:
added lazy route /dashboard/analytics/exceptions in frontend/src/App.tsx
No backend persistence yet — UI uses mocked/local state for demo.
Features
Exception types: DELAYED, DAMAGED, LOST, RETURNED, CUSTOMS_HOLD
KPI row: total exceptions this week, exception rate %, MoM change, avg resolution time (hours)
Trend chart: stacked daily exception counts by type for the last 30 days (Recharts)
Exception table: open exceptions, sortable by age/type/owner, includes shipment, route, and action
Resolve action: opens an inline update form; saving marks the item RESOLVED in UI
Filters: type, date range, and route — applied across KPIs, chart, and table
Styling follows existing dashboard UI patterns and uses existing components where practical
Acceptance criteria coverage
KPI cards show aggregated metrics (calculated from visible/open exceptions)
Stacked area chart renders by exception type
Exception table shows open exceptions with required columns and sorting
Resolve button opens inline form and updates status in the UI
Filters update KPI/chart/table together (client-side)
How to test locally
Checkout branch and run dev server:
Open the app and navigate to:
/dashboard/analytics/exceptions
Verify KPI cards, stacked trend chart, table sorting, filters, and inline resolve flow.