Filtering & searching orders

The orders list at /dashboard/orders has a full filter bar above the table. Every filter encodes into the URL so you can bookmark a filtered view ("?status=CONFIRMED&since=2026-04-01") or share a link with a teammate and they'll land on the exact same result set.

Primary filters (always visible)

Search

A search input matches against:

  • Order ID — useful for locating a specific order when a customer gives you the full or partial ID. Case-insensitive, substring match.
  • Customer name
  • Customer email
?q=acme

Matches orders from customers whose name or email contains acme, plus any order whose ID contains acme (rare, but possible with random ID collisions).

Status

A dropdown with every status: Submitted, Confirmed, Shipped, Delivered, Cancelled. Pick one to filter, or All statuses to clear.

?status=CONFIRMED

Only valid status values are accepted — anything else is ignored server-side.

Advanced filters (click "More filters")

Four more filters hide behind a toggle to keep the primary row clean. Advanced filters are auto-expanded when you land on a URL that already has any of them set.

Date range

Two date pickers — From date and To date — filter by order creation timestamp.

  • ?since=2026-04-01 — orders created on or after April 1.
  • ?until=2026-04-30 — orders created on or before April 30, inclusive (compared to 23:59:59 end-of-day).

Combine for a window. Either can be set independently.

Total range

Two number inputs — Min total and Max total — filter by order total.

  • ?minTotal=100 — orders with total ≥ 100.
  • ?maxTotal=500 — orders with total ≤ 500.

Decimal values work: minTotal=49.99. Invalid numbers (like abc) are silently ignored.

Customer

A separate text input that narrows to a specific customer's orders by name or email. Substring match, case-insensitive.

?customer=bluep

Matches any customer whose name or email contains "bluep" — "Blue Plate Diner" for example. Different from the primary Search because this one doesn't also match order IDs.

Clearing filters

A red Clear filters button appears once any filter is active. Clicking it removes every filter (q, status, since, until, minTotal, maxTotal, customer) and resets to page 1. Pagination and sort settings are preserved.

Sorting

Column headers that are sortable have an arrow icon. Click to toggle ascending/descending, or to switch the active sort column:

  • Status
  • Date (default — descending)
  • Total
?sort=total&dir=desc

Pagination

Underneath the table, a pager lets you move between pages and change the page size. URL params:

  • ?page=3
  • ?perPage=50

Default is 20 per page. Changing any filter resets page back to 1 to avoid landing on an empty page that no longer exists.

Combining everything

Filters compose — they AND together. A URL like:

?q=acme&status=SHIPPED&since=2026-01-01&minTotal=500&sort=total&dir=desc&perPage=50

…gives you: "all shipped orders from customers matching 'acme' since Jan 1, with total ≥ $500, sorted by total descending, 50 per page."

All the filtering happens server-side in a single database query, so large order volumes don't slow the UI.

Search tips

  • Finding an order by ID — Distribu displays orders as #A1B2C3D4 (last 8 chars of the internal ID, uppercased). Paste any part of that into the Search box — it matches. You can also paste the full ID.
  • Finding a specific customer's orders — type their name or email into the Customer filter. If it's a customer who places lots of orders, combine with a date filter to narrow further.
  • Triaging the queue?status=SUBMITTED&sort=createdAt&dir=asc gives you the oldest unconfirmed orders first. Bookmark it as your morning check.
  • Finding this month's revenue — clear the status filter, ?since=2026-04-01&until=2026-04-30 and check the list's "N orders" count and the total column.

Next: Invoice PDFs.