Restrict the activities that we display on the alerts page's filters to just ones that can actually be in alerts #147

This commit is contained in:
Ian Renton
2026-09-18 21:20:42 +01:00
parent 54d779f036
commit a24e03028b
5 changed files with 70 additions and 34 deletions
+2 -1
View File
@@ -332,7 +332,8 @@ function loadOptions() {
// Populate the filters panel
generateMultiToggleFilterCard("#dx_continent_options", "dx_continent", options["continents"]);
generateMultiToggleFilterCard("#source-options", "source", options["alert_providers"]);
generateActivitiesMultiToggleFilterCard(options["sigs"]);
// Alerts can only ever be tagged with activities that have an alert source, so only offer those as filters here
generateActivitiesMultiToggleFilterCard(options["sigs"].filter(o => o["alerts_possible"]), false);
// Load URL params. These may select things from the various filter & display options, so the function needs
// to be called after these are set up, but if the URL params ask for "embedded mode", this will suppress