-
Notifications
You must be signed in to change notification settings - Fork 93
Closed
Labels
FrontendNextJSStellar WaveIssues in the Stellar wave programIssues in the Stellar wave programgood first issueGood for newcomersGood for newcomers
Description
Description:
Implement a comprehensive shipment management page where users can view all their shipments in a table/card view, filter by various criteria, search, and create new shipments through a multi-step modal form.
Page Route: /shipments
Requirements:
- Table/card view toggle
- Advanced filtering and search
- Sorting and pagination
- Create new shipment modal (multi-step form)
- Bulk actions
- Export functionality
- Quick view panel
Page Sections:
1. Page Header
- Page title: "Shipment Management"
- Search bar (search by ID, origin, destination, carrier)
- Filter button (opens filter panel)
- View toggle (table/cards)
- Create Shipment button (primary CTA)
- Export button (CSV/PDF)
- Breadcrumbs navigation
2. Filters Panel (Sidebar or Dropdown)
- Status (multiple select): Draft, Posted, Assigned, In Transit, Delivered, Cancelled
- Date range (from/to picker)
- Carrier (dropdown with search)
- Origin location (autocomplete)
- Destination location (autocomplete)
- Cargo type (dropdown)
- Price range (min/max sliders)
- Reset filters button
3. Shipments Table View
- Columns: Checkbox, Shipment ID, Origin → Destination, Status, Carrier, Pickup Date, Delivery Date, Cost, Actions
- Sortable columns
- Resizable columns
- Column visibility toggle
- Row hover effects
- Pagination (10, 25, 50, 100 per page)
- Empty state if no shipments
4. Shipments Card View
- Grid of cards (3-4 columns on desktop, 1 on mobile)
- Each card shows:
- Shipment ID and status badge
- Origin → Destination with icons
- Carrier info with avatar
- Progress bar (based on status)
- Key dates
- Quick actions (Track, Edit, Delete)
- Card click opens quick view
5. Create Shipment Modal (Multi-step)
Step 1: Basic Information
- Shipment title
- Cargo type (dropdown)
- Description (textarea)
- Weight (number input with unit selector)
- Dimensions (L x W x H)
Step 2: Locations
- Origin address (autocomplete with map preview)
- Destination address (autocomplete with map preview)
- Pickup date (date picker)
- Delivery date (date picker)
- Special instructions (textarea)
Step 3: Additional Details
- Insurance required (yes/no toggle)
- Cargo value (for insurance calculation)
- Handling requirements (checkboxes: fragile, temperature-controlled, hazmat)
- Required documents (checklist)
- Upload documents (drag-drop)
Step 4: Review & Submit
- Summary of all information entered
- Estimated cost display (calculated)
- Terms & conditions checkbox
- Submit button
- Edit button for each section to go back
6. Quick View Panel
- Slide-in panel from right showing:
- Shipment details
- Mini timeline
- Carrier contact
- Documents preview
- Quick actions
- Close button
Components to Create:
/components/shipments/
├── ShipmentsTable.tsx
├── ShipmentCard.tsx (reusable)
├── ShipmentsGrid.tsx
├── FiltersPanel.tsx
├── SearchBar.tsx (reusable)
├── ViewToggle.tsx
├── CreateShipmentModal.tsx
├── ShipmentFormStep1.tsx
├── ShipmentFormStep2.tsx
├── ShipmentFormStep3.tsx
├── ShipmentFormStep4.tsx
├── QuickViewPanel.tsx
├── BulkActionsBar.tsx
├── StatusBadge.tsx (reusable)
├── ProgressBar.tsx (reusable)
└── EmptyState.tsx (reusable)
/components/shared/
├── DataTable.tsx (reusable)
├── Pagination.tsx (reusable)
├── DateRangePicker.tsx (reusable)
├── LocationAutocomplete.tsx (reusable)
└── MultiStepForm.tsx (reusable wrapper)
Technical Requirements:
- TanStack Table for table functionality
- TanStack Query for data fetching and caching
- react-hook-form + zod for form validation
- date-fns + react-day-picker for date selection
- Google Places API for location autocomplete
Multi-step Form:
- Progress indicator showing current step (1/4, 2/4, etc.)
- Validation before proceeding to next step
- Can go back to edit previous steps
- Data persists across steps
- Form data saved in state
- Submit only on final step
Bulk Actions:
- Select multiple shipments via checkboxes
- Bulk operations: Export Selected, Delete Selected, Change Status
- Confirmation modals for destructive actions
- Floating action bar when items selected
Acceptance Criteria:
- Table view with all columns implemented
- Card view responsive grid
- View toggle works smoothly
- Search filters data correctly
- Filters panel with all options functional
- Sorting on all columns
- Pagination controls functional
- Create modal with 4 steps
- Form validation on each step
- Can't proceed without valid data
- Quick view panel slides in/out
- Bulk selection and actions work
- Export to CSV functional
- Loading states for data fetch
- Empty state when no shipments
- Responsive design (mobile: table becomes cards)
- TypeScript: full type coverage
- Performance: smooth scrolling with 100+ items
Testing Requirements:
- Test with 0, 1, 10, 100+ shipments
- Test all filter combinations
- Test multi-step form validation
- Test table sorting on each column
- Test pagination
- Test responsive layouts
- Test bulk operations
Metadata
Metadata
Assignees
Labels
FrontendNextJSStellar WaveIssues in the Stellar wave programIssues in the Stellar wave programgood first issueGood for newcomersGood for newcomers