Commit graph

3 commits

Author SHA1 Message Date
Adam Moussa
e2fc183636 Move sorting to server-side for full dataset ordering
- usePaginatedList now manages sortBy/sortDir state
- Sort params passed to fetch function and sent to API
- SharedTable receives sort state as props instead of managing internally
- Clicking column headers triggers API refetch with new sort
- Removes client-side sorting that only worked on current page
2026-04-17 12:50:23 -04:00
Adam Moussa
3a13d94b71 Add 600ms debounce to search in usePaginatedList
- Typing updates the input immediately but delays the API call
- Table keeps showing current results until the search settles
- Resets to page 1 when search changes
- Applies to all list pages using the shared hook
2026-04-16 19:16:04 -04:00
Adam Moussa
7db23a5597 Replace 11 duplicate hooks with single usePaginatedList
- Create shared hooks/usePaginatedList.js accepting a fetch function and optional extra params
- Update all 7 list pages to use the shared hook
- Delete 11 individual hook files (useItems, useEmployees, useLocations, etc.)
2026-04-16 16:53:52 -04:00