The payments view (src/components/payments/payments-view.tsx) fetches paginated data from the backend but implements sorting client-side via toggleSort and sortedItems useMemo. This means only the current page's items are sorted, not the entire dataset. Users viewing paginated payments will see incorrect sort orders when the dataset spans multiple pages.
Root cause: Lines 113-125 in src/components/payments/payments-view.tsx - Client-side sort only sorts current page.
Why this is architecturally hard
- Backend API supports server-side sorting but frontend service layer doesn't expose sort parameters
- Changing to server-side sort requires updating API call, service interface, and component state
- Current UI uses loading state only triggered on filter changes, not sort changes
Acceptance criteria
Getting started
Files: src/components/payments/payments-view.tsx, src/services/paymentService.ts
The payments view (
src/components/payments/payments-view.tsx) fetches paginated data from the backend but implements sorting client-side viatoggleSortandsortedItemsuseMemo. This means only the current page's items are sorted, not the entire dataset. Users viewing paginated payments will see incorrect sort orders when the dataset spans multiple pages.Root cause: Lines 113-125 in src/components/payments/payments-view.tsx - Client-side sort only sorts current page.
Why this is architecturally hard
Acceptance criteria
Getting started
Files:
src/components/payments/payments-view.tsx,src/services/paymentService.ts