feat(invoices): invoice list column sorting and row-level status styling (#1375)

* feat(invoices): add column sorting and row-level status styling to invoice list

Client-side sorting on number, customer, due date, amount and status with
Swedish collation, null-last ordering and stable date/id tie-breaks. Status
chips move to the shared RowStatus descriptor so normal states stay muted and
exceptions carry semantic color. Invoice fetch now pages past the PostgREST
1000-row cap via fetchAllRows so sorting covers the full list.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* test(invoices): make rounded-amount sort assertions non-degenerate

Distinct rounded totals now prove the comparator orders by displayed value;
the rounded tie case is kept as an explicit tie-breaker test since integer
rounding is monotonic and can only create ties, never reorder.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Mattsson
2026-08-03 18:43:30 +02:00
committed by GitHub
co-authored by Claude Fable 5
parent a2f7132c94
commit e40dc64485
6 changed files with 483 additions and 54 deletions
+1
View File
@@ -5375,6 +5375,7 @@
"th_due": "Due",
"th_amount": "Amount",
"th_status": "Status",
"sort_by": "Sort by {column}",
"create_invoice_desc": "Regular customer invoice",
"create_recurring": "Recurring invoice",
"create_recurring_desc": "Created automatically, e.g. every month",
+1
View File
@@ -5375,6 +5375,7 @@
"th_due": "Förfaller",
"th_amount": "Belopp",
"th_status": "Status",
"sort_by": "Sortera efter {column}",
"create_invoice_desc": "Vanlig kundfaktura",
"create_recurring": "Återkommande faktura",
"create_recurring_desc": "Skapas automatiskt, till exempel varje månad",