Skip to content

Commit 2776072

Browse files
committed
DBC22-1377: fixed filter sync from naming inconsistency
1 parent 057b86b commit 2776072

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/frontend/src/Components/EventTypeIcon.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414

1515
export default function EventTypeIcon({ displayCategory }) {
1616
switch (displayCategory) {
17-
case "closure":
17+
case "closures":
1818
return <FontAwesomeIcon icon={faMinusCircle} alt="closure" />;
1919
case "majorEvents":
2020
return <FontAwesomeIcon icon={faExclamationTriangle} alt="major delays" />;

src/frontend/src/Components/data/events.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export function getEvents(routePoints) {
99
datum.roadIsClosed = !! datum.description.match(/Road closed(\.| )/);
1010
if (datum.roadIsClosed) {
1111
datum.severity = 'CLOSURE';
12-
datum.display_category = 'closure';
12+
datum.display_category = 'closures';
1313
}
1414
})
1515
return data;

src/frontend/src/Components/map/layers/eventsLayer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ export function loadEventsLayers(
3737
const isLineSegment = feature.getGeometry().getType() === 'LineString';
3838

3939
const vsMap = {
40-
closure: closureVS,
40+
closures: closureVS,
4141
majorEvents: majorEventsVS,
4242
minorEvents: minorEventsVS,
4343
futureEvents: futureEventsVS,
4444
roadConditions: roadConditionsVS
4545
}
4646

4747
const lineVsMap = {
48-
closure: closureLinesVS,
48+
closures: closureLinesVS,
4949
majorEvents: majorEventsLinesVS,
5050
minorEvents: minorEventsLinesVS,
5151
futureEvents: futureEventsLinesVS,

src/frontend/src/pages/EventsPage.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export default function EventsPage() {
7777
{
7878
id: 'checkbox-filter-closure',
7979
label: 'Closures',
80-
value: 'closure',
80+
value: 'closures',
8181
},
8282
{
8383
id: 'checkbox-filter-incident',
@@ -104,7 +104,7 @@ export default function EventsPage() {
104104
const [sortingColumns, setSortingColumns] = useState([]);
105105

106106
const [eventCategoryFilter, setEventCategoryFilter] = useState({
107-
'closure': mapContext.visible_layers.closure,
107+
'closures': mapContext.visible_layers.closures,
108108
'majorEvents': mapContext.visible_layers.majorEvents,
109109
'minorEvents': mapContext.visible_layers.minorEvents,
110110
'futureEvents': mapContext.visible_layers.futureEvents,

0 commit comments

Comments
 (0)