feat(filters): surface started/ended date filters on the PlayEvent filter bar
Add Started and Finished DateRangePicker widgets to the PlayEvent filter bar and wire filter-started / filter-ended into the filter-bar date-range serializer, so the started/ended DateCriterion fields (added for #67) are reachable from the UI — enabling "finished in year Y" range filtering. Builds on #67 (PlayEventFilter.started/ended are DateCriterion); the bare field names round-trip through _parse_range like the Purchase date fields. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1479,6 +1479,8 @@ class PlayEventFilterBar(_FilterBarBase):
|
||||
def _playevent_fields(existing: dict) -> list:
|
||||
game_choice = _filter_get_choice(existing, "game")
|
||||
days_min, days_max = _parse_range(existing, "days_to_finish")
|
||||
started_min, started_max = _parse_range(existing, "started")
|
||||
ended_min, ended_max = _parse_range(existing, "ended")
|
||||
|
||||
fields = [
|
||||
Div(
|
||||
@@ -1495,6 +1497,24 @@ def _playevent_fields(existing: dict) -> list:
|
||||
),
|
||||
],
|
||||
),
|
||||
_filter_field(
|
||||
"Started",
|
||||
DateRangePicker(
|
||||
label="Started",
|
||||
input_name_prefix="filter-started",
|
||||
min_value=started_min,
|
||||
max_value=started_max,
|
||||
),
|
||||
),
|
||||
_filter_field(
|
||||
"Finished",
|
||||
DateRangePicker(
|
||||
label="Finished",
|
||||
input_name_prefix="filter-ended",
|
||||
min_value=ended_min,
|
||||
max_value=ended_max,
|
||||
),
|
||||
),
|
||||
RangeSlider(
|
||||
label="Days to Finish",
|
||||
input_name_prefix="filter-days-to-finish",
|
||||
|
||||
Reference in New Issue
Block a user