-
Notifications
You must be signed in to change notification settings - Fork 95
Open
Labels
Description
Description:
Update the dashboard home page to replace the "—" placeholder metric cards with real data fetched from the shipments API. Add a "Recent Shipments" section below the metrics.
Update frontend/app/(dashboard)/dashboard/page.tsx.
Acceptance Criteria:
- Fetches user data + shipment stats on mount (parallel requests):
shipmentApi.list({ status: 'in_transit', limit: 1 })→ active countshipmentApi.list({ status: 'pending', limit: 1 })→ pending countshipmentApi.list({ status: 'completed', limit: 1 })→ completed countshipmentApi.list({ limit: 4 })→ recent 4 shipments
- Metric cards show real numbers from the API (fallback "—" while loading)
- Metric card labels adapt to role: Carriers see "Active Jobs" / "Awaiting Pickup"; Shippers see "Active Shipments" / "Awaiting Carrier"
- "Recent Shipments" section with "View all →" link; renders
<ShipmentCard>for each - Empty state in recent section: role-appropriate CTA ("Create your first shipment" for shippers, "Open Marketplace" for carriers)
- Header CTA button: Shippers see "+ New Shipment" (links to
/shipments/new); Carriers see "Browse Marketplace" (links to/marketplace) - Sign out button removed from header (now in sidebar)
Reactions are currently unavailable