-
Notifications
You must be signed in to change notification settings - Fork 93
Open
Labels
Description
Description:
Build the main shipments list page that shows the authenticated user's shipments (role-filtered by the backend). Include tabbed filtering by status and a "New Shipment" button for shippers.
Create frontend/app/(dashboard)/shipments/page.tsx.
Acceptance Criteria:
-
'use client'directive - Fetches shipments via
shipmentApi.list({ status })on mount and on tab change - Status tabs: All, Pending, Accepted, In Transit, Delivered, Completed (horizontal tab row with bottom border indicator)
- Shows loading skeleton (4 animated pulse cards) while fetching
- Shows empty state when no results — with "Create your first shipment" CTA for shippers if "All" tab is selected
- Renders a
<ShipmentCard>per shipment in a responsive grid (1 col mobile, 2 col sm+) - Shows total count below the grid: "Showing X of Y shipments"
- "New Shipment" button (top right) visible only to shippers / admins
- Uses
toast.error()on fetch failure
Reactions are currently unavailable