Files
accounted/messages
Joakim Hansson d463ee1c87 feat(supplier-invoices): payment-queue sections and a grouping picker (#2102)
* feat(supplier-invoices): payment-queue sections and a grouping picker

The list groups into Väntar på betalning / Betalda och avslutade
sections by default so the payment queue is never buried; a toolbar
picker switches grouping to supplier, month, or none, written back to
the URL as ?group=. The tri-state column sort governs order inside
each group, and with no sort active the status sections run newest
first. Both message catalogs carry the new strings.

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

* fix: group by supplier_id, not display name (mirrors #2101 review)

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

* fix(supplier-invoices): address review: shared helper, API order kept, queue includes partially_paid

- keep CHECKBOX_REVEAL_CLASS and useRangeSelect from main (the PR had
  reverted #2093 and the region now carries #2117)
- default the grouping picker to 'none'
- render sections from the shared lib/lists/group-rows.ts helper, the same
  implementation #2101 uses, instead of a second copy of the bucketing
- drop the byNewestFirst re-sort: for a payment queue the API's
  forfallodatum-ascending default is the order that matters, so grouping
  no longer changes it
- isAwaitingPayment now mirrors PAYABLE_STATUSES and includes
  partially_paid, so a partially paid invoice stays in the queue
- colSpan follows the column count: canWrite ? 9 : 8
- replace the banned em dash placeholders with an UNKNOWN_GROUP_KEY
  sentinel and a translated label
- section headers carry data-no-stagger, and the header row uses the same
  index-based prevKey shape as #2101 instead of an IIFE

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix(supplier-invoices): flat is the URL-less default; range select walks the grouped order (review)

Only 'none' owns the URL-less state so a chosen grouping survives reload. Shift-click ranges now index the sectioned order the table renders instead of the pre-grouping sort, as useRangeSelect requires.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014XUxGhBBwQSMu59bWq6Vrf

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Jakob Wennberg <311770904+jakobwennberg-oss@users.noreply.github.com>
2026-09-04 16:44:54 +02:00
..