From 10fc272352d68fdc1cccc402344feba9f7bf2893 Mon Sep 17 00:00:00 2001 From: Julian Rojas Date: Wed, 25 Nov 2020 11:05:09 +0100 Subject: [PATCH] Adjust quiet route checking --- src/components/RoutesInfo.js | 2 +- src/utils/Utils.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/RoutesInfo.js b/src/components/RoutesInfo.js index 797d093..e08c842 100644 --- a/src/components/RoutesInfo.js +++ b/src/components/RoutesInfo.js @@ -65,7 +65,7 @@ export class RoutesInfo extends Component { formatValues = values => { - if (values) { + if (values || values === false) { const res = []; if (Array.isArray(values)) { for (const v of values) { diff --git a/src/utils/Utils.js b/src/utils/Utils.js index 262a90b..c7647f4 100644 --- a/src/utils/Utils.js +++ b/src/utils/Utils.js @@ -480,12 +480,13 @@ function checkCompatibility(t, vehicle, store, includesVehicle) { } // Noise restrictions - const nrs = track[ERA.isQuiteRoute] && vehicle[ERA.operationalRestriction] === 'http://era.europa.eu/concepts/restrictions#2.2.7'; + const nrs = track['http://era.europa.eu/ns#isQuietRoute'] === 'true' + && vehicle[ERA.operationalRestriction] !== 'http://era.europa.eu/concepts/restrictions#2.7.7'; report[ERA.operationalRestriction] = { predicates: [ERA.operationalRestriction, ERA.isQuiteRoute], compatible: nrs, values: { - track: track[ERA.isQuiteRoute], + track: track['http://era.europa.eu/ns#isQuietRoute'], vehicle: vehicle[ERA.operationalRestriction] } }