openstreetmap-website
openstreetmap-website copied to clipboard
Add sorting and filtering functionality to user notes page
This PR addresses #832 by adding sorting and filtering functionality to user note pages. This PR is also an alternative, or better put expanding #5239 so that filtering and sorting functionality can be expanded further on if needed.
Key Changes:
- Filter by Status: Users can filter notes by their status (open, closed, or all).
- Filter by Note Type: View notes the user submitted or commented on (including those with anonymous comments).
-
Date Range Filtering: Users can filter notes based on a specified
from
andto
date range. -
Sorting Options: Sort notes by
created_at
orupdated_at
in ascending or descending order.
Tests for added methods and scopes have been added to ensure that these features work as expected across different scenarios, including handling of date ranges and note types.