Skip to content

Commit

Permalink
events: remove special filters for old events with '_' and ' | '
Browse files Browse the repository at this point in the history
  • Loading branch information
dulvui committed Mar 7, 2024
1 parent bef6aab commit d21bcb6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
7 changes: 1 addition & 6 deletions src/main/webapp/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -1824,13 +1824,8 @@ function filterProvinceBZEvent(event, date) {
date.setHours(0, 0, 0, 0)
let today = date.getTime()

// filter out old events, that don't have new code typeCode_subTypeCode
if (!category.includes("_") || category.includes(" | ")) {
return true
}

switch (category) {
case "intralci viabilità in e fuori Alto Adige_chiusura temporanea | Verkehrsbehinderung für Zonen und aus. Südt._kurzfristige oder zeitweilige Sperre":
case "intralci viabilità in e fuori Alto Adige_chiusura temporanea | Verkehrsbehinderung für Zonen und aus. Südt._kurzfristige oder zeitweilige Sperre":
if (endTs === null || endTs === undefined)
return false
return now <= startTs && now >= endTs
Expand Down
5 changes: 1 addition & 4 deletions src/main/webapp/view-events.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,7 @@
if (categories) {
addOption("All", "", _category, true) // add a catch-all fake category
categories.forEach(c => {
// filter out old categories, that don't have new code typeCode_subTypeCode
if (c.includes("_") && !c.includes(" | ")) {
addOption(c, encodeURIComponent(c), _category)
}
addOption(c, encodeURIComponent(c), _category)
})
}
}
Expand Down

0 comments on commit d21bcb6

Please sign in to comment.