food-oasis
food-oasis copied to clipboard
Allow ability to sort all columns in Suggestions Admin
Dependency
- #2580
- #2575
- #2581
Overview
As an Admin User, I want to be able to sort all columns in Suggestions Admin, so that I can easily organize and analyze records based on the attributes most relevant to my current review.
Requirements
- Implement sorting functionality (i.e., sorting in both ascending and descending order) on all columns within Suggestions Admin.
- Display a visual indicator (e.g., an arrow icon) in the currently sorted column to indicate the sort direction.
- Upwards arrow = Column is sorted in ascending order
- Downwards arrow = Column is sorted in descending order
- No arrow = Column is unsorted (i.e., no sorting order applied)
- Ensure sorting behavior is consistent and intuitive:
- Clicking a column header toggles between ascending, descending, and unsorted orders.
- When a new column is sorted, the previous sort order is cleared. Only the most recently selected column’s sort is respected.
- Support combined filtering and sorting, for all fields/columns, ensuring that both can be applied at the same time without resetting or overriding one another.
- Ensure sorting and filtering actions trigger proper data refreshes and preserve user selections in the UI.
Acceptance Criteria
- [ ] All columns in the Suggestions Admin can be sorted in ascending, descending, or unsorted order.
- [ ] Clicking a column header cycles through ascending → descending → unsorted.
- [ ] The active column displays a sort icon indicating order: up arrow = ascending, down arrow = descending, no arrow = unsorted.
- [ ] Only one column shows a sort icon at a time.
- [ ] Sorting a new column clears any existing sort and reorders the table based only on the most recently sorted column.
- [ ] The previously sorted column’s icon is removed.
- [ ] Sorting and filtering can be applied together without resetting or overriding one another.
- [ ] When both are active, the table shows filtered results ordered by the active sort, preserving user selections.