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:
2026-06-21 12:08:27 +02:00
parent ab4dae55eb
commit 6e7f000e1c
3 changed files with 75 additions and 0 deletions
+2
View File
@@ -201,6 +201,8 @@ function buildFilterJSON(form: HTMLElement): Record<string, unknown> {
const dateRangeFields = [
{ prefix: "filter-date-purchased", key: "date_purchased" },
{ prefix: "filter-date-refunded", key: "date_refunded" },
{ prefix: "filter-started", key: "started" },
{ prefix: "filter-ended", key: "ended" },
];
dateRangeFields.forEach((dateField) => {
const valueMin = stringValue(form, dateField.prefix + "-min");