Description
The invoice list currently renders as a simple card grid ordered by creation date with no way to re-sort by amount, status, or due date. A sortable table view with column headers that toggle ascending and descending sort order should be added alongside the existing card view.
Technical Context
src/components/invoice/InvoiceTable.tsx (new) renders a <table> with columns for Title, Amount, Status, Recipients, Created, and Due Date. Clicking a column header calls router.replace to set ?sort=amount&order=asc in the URL. src/hooks/useInvoices.ts passes the sort parameters to src/app/api/invoices/route.ts. Column headers use aria-sort="ascending" or "descending" attributes. A view-mode toggle in src/app/invoice/page.tsx switches between table and card grid.
Acceptance Criteria
Description
The invoice list currently renders as a simple card grid ordered by creation date with no way to re-sort by amount, status, or due date. A sortable table view with column headers that toggle ascending and descending sort order should be added alongside the existing card view.
Technical Context
src/components/invoice/InvoiceTable.tsx(new) renders a<table>with columns for Title, Amount, Status, Recipients, Created, and Due Date. Clicking a column header callsrouter.replaceto set?sort=amount&order=ascin the URL.src/hooks/useInvoices.tspasses the sort parameters tosrc/app/api/invoices/route.ts. Column headers usearia-sort="ascending"or"descending"attributes. A view-mode toggle insrc/app/invoice/page.tsxswitches between table and card grid.Acceptance Criteria
localStorage