Orders – Shop Dashboard (/orders/shop-dashboard)
- Default landing space for shop-only teams so they do not drop into the brewing dashboard.
- Surfaces a high-level snapshot of storefront orders (totals by state) plus the latest activity, making it easy to see whether action is required before opening the full Orders grid.
- Reads the active team from
ActiveTeamContext and only renders for teams with teamOperatingMode === "shop"; non-shop teams are redirected back to /dashboard.
- Uses
ordersService.summary for aggregate card counts (single request that rolls up all/due/draft/confirmed/paid/cancelled for the active team).
- Uses
ordersService.list with state=draft, pageSize: 5, sort=createdAt, direction=desc for the “New orders” pane (falls back to recent orders when no drafts exist).
- Uses
ordersService.list with state=due, pageSize: 5, sort=dueDate, direction=asc for the “Due orders” pane.
- Requires an authenticated access token; when missing, the summary/list fall back to empty output.
- Summary cards are clickable and deep-link into
/orders with the matching ?status= filter.
- “New orders” card shows drafts awaiting acceptance; if there are none, the component automatically falls back to the generic “Recent orders” list.
- “Due orders” card highlights confirmed orders that are overdue or about to be due and links straight to
/orders?status=due.
- Refresh button triggers all summary/list fetches.
- “Open Orders” button deep-links to
/orders so users can open the full grid with filters/actions.
- “Create order” button links directly into the Orders page with the draft filter selected.
- Each list entry is clickable and routes to
/orders/:id for quick drilling.