Add status and search filters to the invoices table #402

Openpriya-raman wants to merge 3 commits into main from feature/invoice-filters· opened 3 days ago
+98−22
priya-raman commented 3 days agoAuthor

What

Finance has been asking for this for a while: filter the invoices table by status and search by customer name or invoice number. Results are sorted by due date, newest first.

How

  • fetchInvoices takes an InvoiceFilters object and passes status / q to the API
  • Filters live in a small InvoiceFiltersProvider so the sidebar totals widget (next PR) can read them
  • Search is debounced with a new useDebouncedValue hook so we do not hit the API on every keystroke
  • Kept keepPreviousData so the table does not flash a skeleton between pages

Testing

Tried each status and a couple of searches against the seeded staging account.

priya-raman added 3 commits 3 days ago
Accept filters in fetchInvoices7f7f1df
Add InvoiceFiltersProvider and useDebouncedValue807f1f8
Filter toolbar on InvoiceTable817f211

Review required

Review the changes, then submit to get graded.

Some checks haven’t completed yet

1 check: dojo / review-grader

Keyboard shortcuts

Site-wide

Focus the search bar
/
Show this dialog
?

Pull request

Move to the next file
j
Move to the previous file
k
Filter changed files
t
Comment on the selected lines
c
Select a range of lines
Shiftclick