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
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
fetchInvoicestakes anInvoiceFiltersobject and passesstatus/qto the APIInvoiceFiltersProviderso the sidebar totals widget (next PR) can read themuseDebouncedValuehook so we do not hit the API on every keystrokekeepPreviousDataso the table does not flash a skeleton between pagesTesting
Tried each status and a couple of searches against the seeded staging account.