Skip to content

Commit

Permalink
DBC22-1377: fixed filter sync from naming inconsistency
Browse files Browse the repository at this point in the history
  • Loading branch information
ray-oxd committed Dec 22, 2023
1 parent 057b86b commit 2776072
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/frontend/src/Components/EventTypeIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {

export default function EventTypeIcon({ displayCategory }) {
switch (displayCategory) {
case "closure":
case "closures":
return <FontAwesomeIcon icon={faMinusCircle} alt="closure" />;
case "majorEvents":
return <FontAwesomeIcon icon={faExclamationTriangle} alt="major delays" />;
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/Components/data/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export function getEvents(routePoints) {
datum.roadIsClosed = !! datum.description.match(/Road closed(\.| )/);
if (datum.roadIsClosed) {
datum.severity = 'CLOSURE';
datum.display_category = 'closure';
datum.display_category = 'closures';
}
})
return data;
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/src/Components/map/layers/eventsLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ export function loadEventsLayers(
const isLineSegment = feature.getGeometry().getType() === 'LineString';

const vsMap = {
closure: closureVS,
closures: closureVS,
majorEvents: majorEventsVS,
minorEvents: minorEventsVS,
futureEvents: futureEventsVS,
roadConditions: roadConditionsVS
}

const lineVsMap = {
closure: closureLinesVS,
closures: closureLinesVS,
majorEvents: majorEventsLinesVS,
minorEvents: minorEventsLinesVS,
futureEvents: futureEventsLinesVS,
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/src/pages/EventsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default function EventsPage() {
{
id: 'checkbox-filter-closure',
label: 'Closures',
value: 'closure',
value: 'closures',
},
{
id: 'checkbox-filter-incident',
Expand All @@ -104,7 +104,7 @@ export default function EventsPage() {
const [sortingColumns, setSortingColumns] = useState([]);

const [eventCategoryFilter, setEventCategoryFilter] = useState({
'closure': mapContext.visible_layers.closure,
'closures': mapContext.visible_layers.closures,
'majorEvents': mapContext.visible_layers.majorEvents,
'minorEvents': mapContext.visible_layers.minorEvents,
'futureEvents': mapContext.visible_layers.futureEvents,
Expand Down

0 comments on commit 2776072

Please sign in to comment.