# 09 - Shipment Summary Page

**Status: NOT STARTED**

## Summary

Create a page showing the daily shipment summary that Max currently posts to Discord manually, broken down by product type. Formatted for easy copy-paste to Discord.

## Current State

The backend API already exists:
- `/api/admin/shipper/shipments/stats` returns statistics with time resolution (hourly, daily, weekly, monthly)
- `BigShipmentsStats.jsx` has visualization with stacked charts and moving averages
- API supports `groupBy` parameter for product type grouping

**No new API is needed.** The existing endpoint provides all required data.

## Requirements

1. New page with date picker (default: today)
2. Call existing stats API with `groupBy=productType`
3. Format response into a Discord-friendly text summary
4. "Copy to Clipboard" button for easy Discord posting

## Files to Create

| File | Purpose |
|------|---------|
| `webapps/src/components/BigLogistics/DailyShipmentSummary.jsx` | Page with Discord-style daily summary |

## Files to Modify

| File | Change |
|------|--------|
| `webapps/src/components/BigLogistics/BigShipperWrapper.jsx` | Add navigation link to Daily Summary |
| `webapps/app/App.jsx` | Add route for `/shipper/summary` |

## Existing API to Use

```
GET /api/admin/shipper/shipments/stats
    ?minCreatedAt={startOfDay}
    &maxCreatedAt={endOfDay}
    &resolution=day
    &groupBy=productType
```

Response format:
```json
{
    "items": [{ "period": "2025-01-14", "productType": "Beyond2", "count": 23 }],
    "resolution": "day",
    "totals": { "total": 47, "byProductType": { "Beyond2": 23, "Beyond2Eye": 12 } }
}
```

## Output Format

```
Daily Shipment Summary - January 14, 2025
=========================================

Total Shipments: 47

By Product Type:
  Beyond 2 Headsets:     23
  Beyond 2 Eye Tracking: 12
  Custom Cushions:        8
  Prescription Lenses:    3
  Audio Straps:           1
```

## Optional Enhancements

- Carrier breakdown
- Country breakdown
- "Compare to yesterday" / "Compare to last week" views
- Export to CSV/PDF

## Implementation Notes

- This is a frontend-only change (no backend work needed)
- Small, self-contained feature
- Main value is the "Copy to Clipboard" button to replace Max's manual Discord posting
