From d8c29e8dcc925b6013880f66e690fa6b006d9154 Mon Sep 17 00:00:00 2001 From: Terry Truong Date: Fri, 6 Jan 2023 20:23:45 +1100 Subject: Implement filtering by event categories Filter events in display and search suggestions. Make server queries allow specification of multiple categories. Make settings modal avoid disabling all categories. --- src/App.vue | 2 ++ src/components/SearchModal.vue | 7 ++++++- src/components/SettingsModal.vue | 20 ++++++++++++++------ src/components/TimeLine.vue | 3 +++ 4 files changed, 25 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/App.vue b/src/App.vue index 70cd390..8ca2f95 100644 --- a/src/App.vue +++ b/src/App.vue @@ -230,6 +230,8 @@ async function onEventDisplay( } lastQueriedRange = [firstDate, lastDate]; let urlParams = new URLSearchParams({ + // Note: Intentionally not filtering by event categories (would need category-sensitive + // unit count data to determine when enough events have been obtained) type: 'events', range: `${firstDate}.${lastDate}`, scale: String(SCALES[scaleIdx]), diff --git a/src/components/SearchModal.vue b/src/components/SearchModal.vue index 65d2496..96d23bd 100644 --- a/src/components/SearchModal.vue +++ b/src/components/SearchModal.vue @@ -28,7 +28,7 @@