diff --git a/app/component/routepage/RouteNotification.js b/app/component/routepage/RouteNotification.js
index 372cb68b07..47f57a82a4 100644
--- a/app/component/routepage/RouteNotification.js
+++ b/app/component/routepage/RouteNotification.js
@@ -38,6 +38,8 @@ const RouteNotification = (props, context) => {
diff --git a/app/component/routepage/ScheduleContainer.js b/app/component/routepage/ScheduleContainer.js
index f39456db64..b944a2d94f 100644
--- a/app/component/routepage/ScheduleContainer.js
+++ b/app/component/routepage/ScheduleContainer.js
@@ -717,7 +717,11 @@ class ScheduleContainer extends PureComponent {
{constantOperationRoutes[routeId][locale].text}
-
+
{constantOperationRoutes[routeId][locale].link}
diff --git a/app/config.js b/app/config.js
index 2edc12113c..8d8a7d102b 100644
--- a/app/config.js
+++ b/app/config.js
@@ -110,7 +110,7 @@ export function getNamedConfiguration(configName) {
const config = baseConfig
? configMerger(baseConfig, additionalConfig)
: configMerger(defaultConfig, additionalConfig);
- config.cityBike.seasonSet = false; // this is unique per config and should not be inherited
+ config.vehicleRental.seasonSet = false; // this is unique per config and should not be inherited
if (config.useSearchPolygon && config.areaPolygon) {
// pass poly as 'lon lat, lon lat, lon lat ...' sequence
@@ -164,15 +164,15 @@ export function getNamedConfiguration(configName) {
}
}
if (
- Object.keys(conf.cityBike?.networks || {}).length &&
+ Object.keys(conf.vehicleRental?.networks || {}).length &&
citybikeSeasonDefinitions?.length &&
- !conf.cityBike.seasonSet
+ !conf.vehicleRental.seasonSet
) {
- conf.cityBike.seasonSet = true;
+ conf.vehicleRental.seasonSet = true;
- if (conf.cityBike.useAllSeasons) {
+ if (conf.vehicleRental.useAllSeasons) {
citybikeSeasonDefinitions.forEach(seasonDef => {
- const confCitybike = conf.cityBike.networks[seasonDef.networkName];
+ const confCitybike = conf.vehicleRental.networks[seasonDef.networkName];
if (confCitybike) {
confCitybike.enabled = seasonDef.enabled;
confCitybike.season = seasonDef.season;
@@ -183,7 +183,7 @@ export function getNamedConfiguration(configName) {
seasonDef => configName === seasonDef.configName,
);
seasonDefinitions.forEach(seasonDef => {
- const confCitybike = conf.cityBike.networks[seasonDef.networkName];
+ const confCitybike = conf.vehicleRental.networks[seasonDef.networkName];
confCitybike.enabled = seasonDef.enabled;
confCitybike.season = seasonDef.season;
});
diff --git a/app/configurations/config.default.js b/app/configurations/config.default.js
index 0b6265ee09..68611b7dd8 100644
--- a/app/configurations/config.default.js
+++ b/app/configurations/config.default.js
@@ -308,7 +308,7 @@ export default {
showStopMarkerPopupOnMobile: true,
showScaleBar: true,
attribution:
- '
© OpenStreetMap ',
+ '
© OpenStreetMap ',
useModeIconsInNonTileLayer: false,
// areBounds is for keeping map and user inside given area
@@ -332,7 +332,7 @@ export default {
locationAware: true,
},
- cityBike: {
+ vehicleRental: {
// Config for map features. NOTE: availability for routing is controlled by
// transportModes.citybike.availableForSelection
showFullInfo: false,
@@ -347,6 +347,8 @@ export default {
sv: 'Köp ett abonnemang för en dag, en vecka eller för en hel säsong',
en: 'Buy a daily, weekly or season pass',
},
+ maxNearbyRentalVehicleAmount: 5,
+ maxDistanceToRentalVehiclesInMeters: 100,
},
// Lowest level for stops and terminals are rendered
@@ -365,7 +367,6 @@ export default {
default: 18,
},
- appBarLink: { name: 'Digitransit', href: 'https://www.digitransit.fi/' },
appBarStyle: 'default',
colors: {
@@ -419,17 +420,6 @@ export default {
},
hideExternalOperator: () => false,
- // Ticket information feature toggle
- showTicketInformation: false,
- ticketInformation: {
- // This is the name of the primary agency operating in the area.
- // It is used when a ticket price cannot be shown to the user, indicating
- // that the primary agency is not responsible for ticketing.
- /*
- primaryAgencyName: ...,
- */
- },
-
useTicketIcons: false,
// Control what transport modes that should be possible to select in the UI
@@ -596,7 +586,7 @@ export default {
{
header: 'Tietolähteet',
paragraphs: [
- 'Tiedot perustuvat joukkoliikenneviranomaisten, liikennöitsijöiden, VR:n ja Finavian toimittamiin tietoihin. Tietolähteinä hyödynnetään Fintrafficin liikkumisen tietopalveluita, erityisesti liikkumispalveluiden avointa yhteyspistettä
Finap-palvelua . Kartat, tiedot kaduista, rakennuksista, pysäkkien sijainnista ynnä muusta tarjoaa © OpenStreetMap contributors. Osoitetiedot tuodaan Digi- ja väestötietoviraston rakennusten osoitetietokannasta.',
+ 'Tiedot perustuvat joukkoliikenneviranomaisten, liikennöitsijöiden, VR:n ja Finavian toimittamiin tietoihin. Tietolähteinä hyödynnetään Fintrafficin liikkumisen tietopalveluita, erityisesti liikkumispalveluiden avointa yhteyspistettä
Finap-palvelua . Kartat, tiedot kaduista, rakennuksista, pysäkkien sijainnista ynnä muusta tarjoaa © OpenStreetMap contributors. Osoitetiedot tuodaan Digi- ja väestötietoviraston rakennusten osoitetietokannasta.',
],
},
],
@@ -617,7 +607,7 @@ export default {
{
header: 'Datakällor',
paragraphs: [
- 'Tjänsteinformationen baseras på information om kollektivtrafiken som tillhandahålls av kollektivtrafikmyndigheter, trafik operatörer, VR och Finavia. Fintraffics mobilitetsinformationstjänster används som datakällor, särskilt
National Access Point för mobilitetstjänster FINAP Kartor, information om gator, byggnader, hållplatser och mer tillhandahålls av © OpenStreetMap-bidragsgivare. Adressuppgifter importeras från adressdatabasen till Myndigheten för Digitalisering och Befolkninsdata (DVV).',
+ 'Tjänsteinformationen baseras på information om kollektivtrafiken som tillhandahålls av kollektivtrafikmyndigheter, trafik operatörer, VR och Finavia. Fintraffics mobilitetsinformationstjänster används som datakällor, särskilt
National Access Point för mobilitetstjänster FINAP Kartor, information om gator, byggnader, hållplatser och mer tillhandahålls av © OpenStreetMap-bidragsgivare. Adressuppgifter importeras från adressdatabasen till Myndigheten för Digitalisering och Befolkninsdata (DVV).',
],
},
],
@@ -638,7 +628,7 @@ export default {
{
header: 'Data sources',
paragraphs: [
- "The service information is based on public transport route information provided by public transport authorities, operators, VR and Finavia. Fintraffic's mobility information services are used as data sources, especially National Access Point for mobility services
FINAP . Maps, information about streets, buildings, bus stop locations and more is provided by © OpenStreetMap contributors. Address information is imported from the address database of the buildings of the Digital and Population Data Services Agency (DVV).",
+ "The service information is based on public transport route information provided by public transport authorities, operators, VR and Finavia. Fintraffic's mobility information services are used as data sources, especially National Access Point for mobility services
FINAP . Maps, information about streets, buildings, bus stop locations and more is provided by © OpenStreetMap contributors. Address information is imported from the address database of the buildings of the Digital and Population Data Services Agency (DVV).",
],
},
],
diff --git a/app/configurations/config.hsl.js b/app/configurations/config.hsl.js
index efbb7e0e7a..9006b58903 100644
--- a/app/configurations/config.hsl.js
+++ b/app/configurations/config.hsl.js
@@ -299,8 +299,10 @@ export default {
hideExternalOperator: agency => agency.name === 'Helsingin seudun liikenne',
showTicketInformation: true,
- ticketInformation: {
- primaryAgencyName: 'HSL',
+ primaryAgencyName: {
+ fi: 'HSL',
+ sv: 'HRT',
+ en: 'HSL',
},
maxNearbyStopAmount: 5,
@@ -399,8 +401,6 @@ export default {
showLayerSelector: false,
showStopMarkerPopupOnMobile: false,
showScaleBar: true,
- attribution:
- '
© OpenStreetMap ',
// areBounds is for keeping map and user inside given area
// HSL region + Lahti
areaBounds: {
@@ -430,7 +430,7 @@ export default {
localStorageEmitter,
- cityBike: {
+ vehicleRental: {
minZoomStopsNearYou: 10,
showFullInfo: true,
networks: {
@@ -491,7 +491,7 @@ export default {
timeBeforeSurcharge: 120 * 60,
showRentalStations: true,
},
- bolt: {
+ bolt_helsinki: {
enabled: true,
season: {
alwaysOn: true,
@@ -558,9 +558,10 @@ export default {
},
showSimilarRoutesOnRouteDropDown: true,
-
useRealtimeTravellerCapacities: true,
+ navigation: true,
+
stopCard: {
header: {
virtualMonitorBaseUrl: 'https://omatnaytot.hsl.fi/',
@@ -728,4 +729,6 @@ export default {
},
},
},
+
+ startSearchFromUserLocation: true,
};
diff --git a/app/configurations/config.kela.js b/app/configurations/config.kela.js
index f4f41296c8..1306c3fd20 100644
--- a/app/configurations/config.kela.js
+++ b/app/configurations/config.kela.js
@@ -1,12 +1,4 @@
/* eslint-disable prefer-template */
-import HSLConfig from './config.hsl';
-import TurkuConfig from './config.turku';
-import LappeenrantaConfig from './config.lappeenranta';
-import TampereConfig from './config.tampere';
-import KotkaConfig from './config.kotka';
-import KouvolaConfig from './config.kouvola';
-import KuopioConfig from './config.kuopio';
-import LahtiConfig from './config.lahti';
const matkaConfig = require('./config.matka').default;
const HSLParkAndRideUtils = require('../util/ParkAndRideUtils').default.HSL;
@@ -39,7 +31,6 @@ export default {
feedIds: ['kela', 'matkahuolto', 'lansilinjat'],
textLogo: true,
logo: null, // override default logo from matka config
- appBarLink: false, // override default config - would show Traficom otherwise
meta: {
description: APP_DESCRIPTION,
@@ -105,7 +96,6 @@ export default {
availableLanguages: ['fi', 'sv', 'en'],
defaultLanguage: 'fi',
- hideAppBarLink: true,
socialMedia: {
title: APP_TITLE,
@@ -170,20 +160,6 @@ export default {
},
suggestBikeMaxDistance: 2000000,
- cityBike: {
- useAllSeasons: true,
- networks: {
- ...HSLConfig.cityBike.networks,
- ...TampereConfig.cityBike.networks,
- ...TurkuConfig.cityBike.networks,
- ...KuopioConfig.cityBike.networks,
- ...LahtiConfig.cityBike.networks,
- ...LappeenrantaConfig.cityBike.networks,
- ...KotkaConfig.cityBike.networks,
- ...KouvolaConfig.cityBike.networks,
- },
- },
-
getAutoSuggestIcons: {
citybikes: station => {
if (
diff --git a/app/configurations/config.kotka.js b/app/configurations/config.kotka.js
index 6d27cb57c5..619c830e26 100644
--- a/app/configurations/config.kotka.js
+++ b/app/configurations/config.kotka.js
@@ -47,7 +47,7 @@ export default configMerger(walttiConfig, {
},
},
- cityBike: {
+ vehicleRental: {
networks: {
donkey_kotka: {
enabled: true,
diff --git a/app/configurations/config.kouvola.js b/app/configurations/config.kouvola.js
index 5555665770..e92360c7eb 100644
--- a/app/configurations/config.kouvola.js
+++ b/app/configurations/config.kouvola.js
@@ -42,7 +42,7 @@ export default configMerger(walttiConfig, {
},
},
- cityBike: {
+ vehicleRental: {
networks: {
donkey_kouvola: {
enabled: true,
diff --git a/app/configurations/config.kuopio.js b/app/configurations/config.kuopio.js
index 85f061c3a1..baa73725e7 100644
--- a/app/configurations/config.kuopio.js
+++ b/app/configurations/config.kuopio.js
@@ -36,11 +36,10 @@ export default configMerger(walttiConfig, {
feedIds: ['Kuopio', 'digitraffic'],
useTicketIcons: true,
- showTicketInformation: true,
showTicketPrice: true,
- ticketInformation: {
- primaryAgencyName: 'Kuopion seudun joukkoliikenne',
- },
+ showTicketInformation: true,
+ primaryAgencyName: 'Kuopion seudun joukkoliikenne',
+
ticketLink: 'https://vilkku.kuopio.fi/lipputyypit-hinnat/lippujen-hinnat',
searchParams: {
@@ -67,7 +66,7 @@ export default configMerger(walttiConfig, {
showVehiclesOnStopPage: true,
showVehiclesOnItineraryPage: true,
- cityBike: {
+ vehicleRental: {
networks: {
freebike_kuopio: {
enabled: true,
diff --git a/app/configurations/config.lahti.js b/app/configurations/config.lahti.js
index adb7279766..f8446f358a 100644
--- a/app/configurations/config.lahti.js
+++ b/app/configurations/config.lahti.js
@@ -148,7 +148,7 @@ export default configMerger(walttiConfig, {
},
},
- cityBike: {
+ vehicleRental: {
networks: {
freebike_lahti: {
enabled: true,
diff --git a/app/configurations/config.lappeenranta.js b/app/configurations/config.lappeenranta.js
index 58b5a67422..c76d7be1e9 100644
--- a/app/configurations/config.lappeenranta.js
+++ b/app/configurations/config.lappeenranta.js
@@ -31,7 +31,7 @@ export default configMerger(walttiConfig, {
favicon: './app/configurations/images/lappeenranta/lappeenranta-favicon.jpg',
- cityBike: {
+ vehicleRental: {
networks: {
donkey_lappeenranta: {
enabled: true,
diff --git a/app/configurations/config.matka.js b/app/configurations/config.matka.js
index 0de80ece0f..50dbb42010 100644
--- a/app/configurations/config.matka.js
+++ b/app/configurations/config.matka.js
@@ -35,7 +35,6 @@ export default {
availableLanguages: ['fi', 'sv', 'en'],
defaultLanguage: 'fi',
- hideAppBarLink: true,
socialMedia: {
title: APP_TITLE,
@@ -165,17 +164,17 @@ export default {
},
suggestBikeMaxDistance: 2000000,
- cityBike: {
+ vehicleRental: {
useAllSeasons: true,
networks: {
- ...HSLConfig.cityBike.networks,
- ...TampereConfig.cityBike.networks,
- ...TurkuConfig.cityBike.networks,
- ...KuopioConfig.cityBike.networks,
- ...LahtiConfig.cityBike.networks,
- ...LappeenrantaConfig.cityBike.networks,
- ...KotkaConfig.cityBike.networks,
- ...KouvolaConfig.cityBike.networks,
+ ...HSLConfig.vehicleRental.networks,
+ ...TampereConfig.vehicleRental.networks,
+ ...TurkuConfig.vehicleRental.networks,
+ ...KuopioConfig.vehicleRental.networks,
+ ...LahtiConfig.vehicleRental.networks,
+ ...LappeenrantaConfig.vehicleRental.networks,
+ ...KotkaConfig.vehicleRental.networks,
+ ...KouvolaConfig.vehicleRental.networks,
},
},
@@ -390,4 +389,33 @@ export default {
},
// Include both bike and park and bike and public, if bike is enabled
includePublicWithBikePlan: true,
+
+ startSearchFromUserLocation: true,
+
+ minTransferTimeSelection: [
+ {
+ title: '1.5 min',
+ value: 90,
+ },
+ {
+ title: '3 min',
+ value: 180,
+ },
+ {
+ title: '5 min',
+ value: 300,
+ },
+ {
+ title: '7 min',
+ value: 420,
+ },
+ {
+ title: '10 min',
+ value: 600,
+ },
+ {
+ title: '30 min',
+ value: 1800,
+ },
+ ],
};
diff --git a/app/configurations/config.tampere.js b/app/configurations/config.tampere.js
index 31ce757b29..88859b1a72 100644
--- a/app/configurations/config.tampere.js
+++ b/app/configurations/config.tampere.js
@@ -62,9 +62,8 @@ export default configMerger(walttiConfig, {
useTicketIcons: true,
showTicketInformation: true,
- ticketInformation: {
- primaryAgencyName: 'Tampereen seudun joukkoliikenne',
- },
+ primaryAgencyName: 'Tampereen seudun joukkoliikenne',
+
ticketLink: 'https://www.nysse.fi/liput-ja-hinnat.html',
callAgencyInfo: {
@@ -232,7 +231,7 @@ export default configMerger(walttiConfig, {
tampere: tampereTimetables,
},
- cityBike: {
+ vehicleRental: {
networks: {
inurba_tampere: {
capacity: BIKEAVL_WITHMAX,
@@ -290,4 +289,9 @@ export default configMerger(walttiConfig, {
},
showTenWeeksOnRouteSchedule: true,
+
+ parkAndRide: {
+ showParkAndRide: true,
+ showParkAndRideForBikes: true,
+ },
});
diff --git a/app/configurations/config.turku.js b/app/configurations/config.turku.js
index cafe5e7059..c39021532d 100644
--- a/app/configurations/config.turku.js
+++ b/app/configurations/config.turku.js
@@ -83,7 +83,7 @@ export default configMerger(walttiConfig, {
// Navbar logo
logo: 'turku/foli-logo.png',
- cityBike: {
+ vehicleRental: {
networks: {
donkey_turku: {
capacity: BIKEAVL_WITHMAX,
diff --git a/app/configurations/config.varely.js b/app/configurations/config.varely.js
index fb3121c93b..3a543d0a09 100644
--- a/app/configurations/config.varely.js
+++ b/app/configurations/config.varely.js
@@ -39,6 +39,8 @@ export default configMerger(walttiConfig, {
hover: '#00BF6F',
iconColors: {
'mode-bus': colorPrimary,
+ 'mode-ferry': '#0064f0',
+ 'mode-ferry-pier': '#666666',
},
},
@@ -64,6 +66,12 @@ export default configMerger(walttiConfig, {
availableForSelection: true,
color: colorPrimary,
},
+
+ ferry: {
+ availableForSelection: true,
+ defaultValue: true,
+ color: '#0064f0',
+ },
},
searchParams: {
diff --git a/app/configurations/config.waltti.js b/app/configurations/config.waltti.js
index b24257a877..68853ea50f 100644
--- a/app/configurations/config.waltti.js
+++ b/app/configurations/config.waltti.js
@@ -41,7 +41,7 @@ export default {
stopsMinZoom: 14,
- cityBike: {},
+ vehicleRental: {},
search: {
minimalRegexp: /.+/,
@@ -180,8 +180,8 @@ export default {
parkingAreaSources: ['liipi'],
parkAndRide: {
- showParkAndRide: true,
- showParkAndRideForBikes: true,
+ showParkAndRide: false,
+ showParkAndRideForBikes: false,
parkAndRideMinZoom: 13,
pageContent: {
default: HSLParkAndRideUtils,
@@ -242,4 +242,29 @@ export default {
? fareId.substring(fareId.indexOf(':') + 1)
: '';
},
+
+ startSearchFromUserLocation: true,
+
+ minTransferTimeSelection: [
+ {
+ title: '1.5 min',
+ value: 90,
+ },
+ {
+ title: '3 min',
+ value: 180,
+ },
+ {
+ title: '5 min',
+ value: 300,
+ },
+ {
+ title: '7 min',
+ value: 420,
+ },
+ {
+ title: '10 min',
+ value: 600,
+ },
+ ],
};
diff --git a/app/store/MapLayerStore.js b/app/store/MapLayerStore.js
index 1506c332e8..9a298d7920 100644
--- a/app/store/MapLayerStore.js
+++ b/app/store/MapLayerStore.js
@@ -38,14 +38,14 @@ class MapLayerStore extends Store {
const { config } = dispatcher.getContext();
this.mapLayers.citybike = showRentalVehiclesOfType(
- config.cityBike?.networks,
+ config.vehicleRental?.networks,
config,
TransportMode.Citybike,
);
this.mapLayers.scooter =
config.transportModes.scooter?.showIfSelectedForRouting &&
showRentalVehiclesOfType(
- config.cityBike?.networks,
+ config.vehicleRental?.networks,
config,
TransportMode.Scooter,
);
diff --git a/app/translations.js b/app/translations.js
index df44c1e75c..5991ef654e 100644
--- a/app/translations.js
+++ b/app/translations.js
@@ -1047,16 +1047,15 @@ const translations = {
'distance-between': 'Distance {distance1} m — {distance2} m',
'distance-total': 'Total distance',
'distance-under': 'Distance less than {distance} m',
- 'e-scooter': 'Sähköpotkulauta',
+ 'e-scooter': 'Electric scooter',
'e-scooter-alternative':
- 'Entä jos kulkisit osan matkasta sähköpotkulaudalla? {paymentInfo}',
+ 'How about using an electric scooter for part of your journey? {paymentInfo}',
'e-scooter-or-taxi-alternative':
- 'Entä jos kulkisit osan matkasta taksilla tai sähköpotkulaudalla? {paymentInfo}',
- 'e-scooter-quantity': 'Sähköpotkulautoja vapaana juuri nyt: ',
- 'e-scooter-station': 'Sähköpotkulauta-asema',
- 'e-scooters': 'Sähköpotkulaudat',
+ 'How about using a taxi or an electric scooter for part of your journey? {paymentInfo}',
+ 'e-scooter-station': 'Electric scooter station',
+ 'e-scooters': 'Electric scooters',
'e-scooters-available':
- 'Alueella sähköpotkulautoja vapaana. Ota sähköpotkulauta käyttöön sovelluksella.',
+ 'There are electric scooters available in the area. Use an app to unlock the electric scooter.',
earlier: 'Earlier departures',
'edit-favourites': 'Edit the location in the Favorites',
'elevation-gained-total': 'Elevation gained',
@@ -1067,7 +1066,6 @@ const translations = {
'embedded-search.form-heading': 'Embedding tools',
engine_ignition_aid: 'Engine starting aid',
english: 'English',
- 'exit-vehicle': 'Nouse pois kyydistä ja kävele laiturille',
explanations: 'Explanations',
'extra-info': 'More info',
'favourite-failed-text': 'Please try again in a while.',
@@ -1081,6 +1079,7 @@ const translations = {
'from-bus': 'bus',
'from-ferry': 'ferry',
'from-rail': 'train',
+ 'from-scooter-location': 'the scooter location',
'from-station': 'from station',
'from-stop': 'from stop',
'from-subway': 'subway',
@@ -1142,7 +1141,7 @@ const translations = {
'itinerary-details.route-has-unknown-alert': 'Route has disruptions.',
'itinerary-details.route-has-warning-alert': 'Route has disruptions.',
'itinerary-details.scooter-leg':
- 'At {time} ride your kick scooter {distance} from {origin} to {destination}. Estimated time {duration}',
+ 'At {time} travel by scooter {distance} from {origin} to {destination}. Estimated time {duration}',
'itinerary-details.transit-leg-part-1': 'At {time} {realtime} take',
'itinerary-details.transit-leg-part-2':
'from stop {startStop} {startZoneInfo} {trackInfo} to stop {endStop} {endZoneInfo}. Estimated duration {duration}',
@@ -1183,9 +1182,12 @@ const translations = {
'Leaves at {firstDepartureTime} {firstDepartureStopType} {firstDepartureStop}{firstDeparturePlatform}',
'itinerary-summary-row.first-leg-start-time-citybike':
'Departure at {firstDepartureTime} from {firstDepartureStop} bike station',
+ 'itinerary-summary-row.first-leg-start-time-scooter':
+ 'Departure at {firstDepartureTime} by a scooter',
'itinerary-summary-row.no-transit-legs': 'Leave when it suits you',
'itinerary-summary-row.transfers':
'Transfer to {vehicle} on stop {stopName}',
+ 'itinerary-summary-row.transfers-to-rental': 'Transfer to {vehicle}',
'itinerary-summary-row.walking-distance':
'Total walking distance {totalDistance}.',
'itinerary-summary.bike-boarding-information':
@@ -1261,6 +1263,7 @@ const translations = {
'menu-link-to-privacy-policy': 'Privacy policy',
'messagebar-label-close-message-bar': 'Close banner',
'messagebar-label-page': 'Page',
+ 'min-transfer-time': 'Interchange time',
'minute-short': 'min',
minutes: 'min',
'minutes-or-route': 'Min / Route',
@@ -1280,7 +1283,17 @@ const translations = {
'more-settings': 'More settings',
'move-on-map': 'Move on the map',
'move-to-tab': 'Go to tab {number}',
+ 'navidest-show-on-map': 'Show route on map',
navigate: 'Navigate',
+ 'navigation-description': 'Journey guidance',
+ 'navigation-header': 'Journey tracking',
+ 'navigation-journey-start': 'Your journey starts {time}',
+ 'navigation-label-close': 'Stop journey guidance',
+ 'navigation-start': 'Start journey',
+ 'navileg-bicycle': 'Cycle to',
+ 'navileg-car': 'Drive to',
+ 'navileg-scooter': 'Travel by scooter to',
+ 'navileg-walk': 'Walk to',
nearest: '{ mode } near you',
'nearest-favorites': 'Stops nearby me',
'nearest-favorites-browse-stops': 'Browse and select stops',
@@ -1344,8 +1357,8 @@ const translations = {
'Log in to the service to save your favorites and utilize them on other devices',
'one-way-journey': 'The length of a one-way journey',
'open-app': 'Open the app',
- 'open-operator-app': 'Open {operator} app',
- 'open-settings': 'Avaa asetukset',
+ 'open-operator-app': 'Open the {operator} app',
+ 'open-settings': 'Open the settings',
'option-default': 'Average',
'option-least': 'Slow',
'option-less': 'Calm',
@@ -1366,9 +1379,9 @@ const translations = {
'park-and-ride-availability': 'Spaces available:',
'pay-attention': 'N.B.',
'payment-info-e-scooter':
- 'Huomaathan, että potkulautojen käyttö ja maksaminen tapahtuu toimijoiden omilla sovelluksilla.',
+ 'Please note that you need to use the app of the operator in question in order to use and pay for the scooters.',
'payment-info-e-scooter-taxi':
- 'Huomaathan, että potkulautojen ja taksin käyttö ja maksaminen tapahtuu toimijoiden omilla sovelluksilla.',
+ 'Please note that you need to use the app of the operator in question in order to use and pay for the taxis or scooters.',
'payment-info-taxi-lifts':
'Huomaathan, että taksien ja kyytipalveluiden käyttö ja maksaminen tapahtuu toimijoiden omilla sovelluksilla.',
payment_at_gate: 'Payment at the gate ',
@@ -1413,11 +1426,11 @@ const translations = {
'remove-favourite': 'Remove from favorites',
'remove-via-button-label': 'Remove via point {index}',
'rent-cycle-at': 'Fetch a city bike:',
- 'rent-e-scooter-at': 'Ota sähköpotkulauta käyttöön sovelluksella',
+ 'rent-e-scooter-at': 'Use an app to unlock the electric scooter',
'rent-scooter-at': 'Rent a kick scooter at {station} station',
'required-ticket': 'Ticket required for the journey',
'return-cycle-to': 'Return the bike:',
- 'return-e-scooter-to': 'Jätä potkulauta turvalliseen paikkaan',
+ 'return-e-scooter-to': 'Leave the scooter in a safe location',
'return-scooter-to': 'Return the kick scooter to {station} station',
'right-now': 'Right now',
route: 'Route',
@@ -1490,7 +1503,7 @@ const translations = {
scooter: 'Scooter',
'scooter-availability': 'Kick scooters available at the station right now',
'scooter-distance-duration':
- 'Ride your kick scooter {duration} ({distance})',
+ 'Travel by scooter for {duration} ({distance})',
'scooter-register-required': 'To use kick scooters, you need to register',
'scooterwalk-distance-duration':
'Walk your kick scooter {duration} ({distance})',
@@ -1529,17 +1542,17 @@ const translations = {
'settings-dropdown-close-label': 'Close options',
'settings-dropdown-open-label': 'Open options',
'settings-e-scooter':
- 'Voit valita haluamasi sähköpotkulaudat, jolloin ne huomioidaan osana reititystä. {paymentInfo}',
+ 'You can select the electric scooters you want and make them part of the route suggestions. {paymentInfo}',
'settings-e-scooter-on':
- 'Laita sähköpotkulauta päälle asetuksista pysyvästi',
- 'settings-e-scooter-routes': 'Sähköpotkulaudat osaksi reittejäsi!',
+ 'Make electric scooters a permanent option in your settings',
+ 'settings-e-scooter-routes': 'Make electric scooters part of your routes!',
'settings-label-change': 'Change settings',
'settings-missing-itineraries-body':
'Some selections in the settings exclude certain route alternatives.',
'settings-missing-itineraries-header':
'Are some route alternatives missing?',
'settings-taxi-lift':
- 'Voit valita haluamasi taksi ja kyytipalvelut, jolloin ne huomioidaan osana reititystä.',
+ 'Voit valita haluamasi taksi ja kyytipalvelut, jolloin ne ovat osa reititystä.',
share: 'Share itinerary',
show: 'Show',
'show-departures': 'Show departures',
@@ -1625,7 +1638,9 @@ const translations = {
'time-selector-hours-label': 'Hour',
'time-selector-minutes-label': 'Minute',
timetable: 'Timetable',
+ 'to-bicycle': 'bicycle',
'to-bus': 'bus',
+ 'to-e-scooter': 'scooter',
'to-ferry': 'ferry',
'to-frontpage': 'To the front page',
'to-rail': 'train',
@@ -2264,7 +2279,6 @@ const translations = {
'Entä jos kulkisit osan matkasta sähköpotkulaudalla? {paymentInfo}',
'e-scooter-or-taxi-alternative':
'Entä jos kulkisit osan matkasta taksilla tai sähköpotkulaudalla? {paymentInfo}',
- 'e-scooter-quantity': 'Sähköpotkulautoja vapaana juuri nyt: ',
'e-scooter-station': 'Sähköpotkulauta-asema',
'e-scooters': 'Sähköpotkulaudat',
'e-scooters-available':
@@ -2279,7 +2293,6 @@ const translations = {
'embedded-search.form-heading': 'Upotusvalinnat',
engine_ignition_aid: 'Käynnistysapu',
english: 'Englanti',
- 'exit-vehicle': 'Nouse pois kyydistä ja kävele laiturille',
explanations: 'Selitykset',
'extra-info': 'Lisätiedot',
'favourite-failed-text': 'Yritä hetken päästä uudelleen.',
@@ -2293,6 +2306,7 @@ const translations = {
'from-bus': 'bussista',
'from-ferry': 'lautasta',
'from-rail': 'junasta',
+ 'from-scooter-location': 'potkulaudan sijainti',
'from-station': 'asemalta',
'from-stop': 'pysäkiltä',
'from-subway': 'metrosta',
@@ -2350,7 +2364,7 @@ const translations = {
'itinerary-details.route-has-unknown-alert': 'Reitillä on häiriöitä.',
'itinerary-details.route-has-warning-alert': 'Reitillä on häiriöitä.',
'itinerary-details.scooter-leg':
- '{time} potkulautaile {distance} kohteesta {origin} kohteeseen {destination}. Matka-aika {duration}',
+ '{time} potkulautaile kohteesta {origin} {distance} {to} {destination}. Matka-aika {duration}',
'itinerary-details.transit-leg-part-1': '{time} {realtime} ota',
'itinerary-details.transit-leg-part-2':
'pysäkiltä {startStop} {startZoneInfo} {trackInfo} pysäkille {endStop} {endZoneInfo}. Arvioitu matka-aika {duration}',
@@ -2389,8 +2403,11 @@ const translations = {
'Lähtee klo {firstDepartureTime} {firstDepartureStopType} {firstDepartureStop}{firstDeparturePlatform}',
'itinerary-summary-row.first-leg-start-time-citybike':
'Lähtö klo {firstDepartureTime} kaupunkipyöräasemalta {firstDepartureStop}',
+ 'itinerary-summary-row.first-leg-start-time-scooter':
+ 'Lähtö klo {firstDepartureTime} sähköpotkulaudalla',
'itinerary-summary-row.no-transit-legs': 'Lähde, kun sinulle sopii',
'itinerary-summary-row.transfers': 'Vaihto {vehicle} pysäkillä {stopName}',
+ 'itinerary-summary-row.transfers-to-rental': 'Vaihto {vehicle}',
'itinerary-summary-row.walking-distance':
'Kävelyä yhteensä {totalDistance}.',
'itinerary-summary.bike-boarding-information':
@@ -2466,6 +2483,7 @@ const translations = {
'menu-link-to-privacy-policy': 'Rekisteriseloste',
'messagebar-label-close-message-bar': 'Sulje banneri',
'messagebar-label-page': 'Sivu',
+ 'min-transfer-time': 'Vaihtoaika',
'minute-short': 'min',
minutes: 'min',
'minutes-or-route': 'Min / Linja',
@@ -2485,7 +2503,17 @@ const translations = {
'more-settings': 'Lisäasetukset',
'move-on-map': 'Siirry kartalla',
'move-to-tab': 'Siirry välilehdelle {number}',
+ 'navidest-show-on-map': 'Näytä reitti kartalla',
navigate: 'Navigoi',
+ 'navigation-description': 'Löydä perille ohjatusti',
+ 'navigation-header': 'Matkan seuranta',
+ 'navigation-journey-start': 'Matkasi alkaa {time}',
+ 'navigation-label-close': 'Lopeta matkaopastus',
+ 'navigation-start': 'Matkalle',
+ 'navileg-bicycle': 'Pyöräile',
+ 'navileg-car': 'Aja',
+ 'navileg-scooter': 'Potkulautaile',
+ 'navileg-walk': 'Kävele',
nearest: 'Lähimmät {mode}',
'nearest-favorites': 'Omat lähipysäkit',
'nearest-favorites-browse-stops': 'Selaa ja valitse pysäkkejä',
@@ -2732,16 +2760,15 @@ const translations = {
'settings-dropdown-close-label': 'Sulje vaihtoehdot',
'settings-dropdown-open-label': 'Avaa vaihtoehdot',
'settings-e-scooter':
- 'Voit valita haluamasi sähköpotkulaudat, jolloin ne huomioidaan osana reititystä. {paymentInfo}',
- 'settings-e-scooter-on':
- 'Laita sähköpotkulauta päälle asetuksista pysyvästi',
+ 'Voit valita haluamasi sähköpotkulaudat, jolloin ne ovat osa reititystä. {paymentInfo}',
+ 'settings-e-scooter-on': 'Lisää sähköpotkulauta pysyvästi asetuksiisi',
'settings-e-scooter-routes': 'Sähköpotkulaudat osaksi reittejäsi!',
'settings-label-change': 'Muuta reittihaun asetuksia',
'settings-missing-itineraries-body':
'Asetuksissa on päällä valintoja, jotka rajaavat pois joitain reittivaihtoehtoja.',
'settings-missing-itineraries-header': 'Puuttuuko reittivaihtoehtoja?',
'settings-taxi-lift':
- 'Voit valita haluamasi taksi ja kyytipalvelut, jolloin ne huomioidaan osana reititystä.',
+ 'Voit valita haluamasi taksi ja kyytipalvelut, jolloin ne ovat osa reititystä.',
share: 'Jaa ohje',
show: 'Näytä',
'show-departures': 'Näytä lähdöt',
@@ -2830,7 +2857,9 @@ const translations = {
'time-selector-hours-label': 'Tunti',
'time-selector-minutes-label': 'Minuutti',
timetable: 'Aikataulu',
+ 'to-bicycle': 'polkupyörään',
'to-bus': 'bussiin',
+ 'to-e-scooter': 'sähköpotkulautaan',
'to-ferry': 'lauttaan',
'to-frontpage': 'Etusivulle',
'to-rail': 'junaan',
@@ -5109,16 +5138,15 @@ const translations = {
'distance-between': 'Avstånd {distance1} m — {distance2} m',
'distance-total': 'Resans längd',
'distance-under': 'Avstånd mindre än {distance} m',
- 'e-scooter': 'Sähköpotkulauta',
+ 'e-scooter': 'Elsparkcykel',
'e-scooter-alternative':
- 'Entä jos kulkisit osan matkasta sähköpotkulaudalla? {paymentInfo}',
+ 'Och om du skulle åka elsparkcykel en del av din resa? {paymentInfo}',
'e-scooter-or-taxi-alternative':
- 'Entä jos kulkisit osan matkasta taksilla tai sähköpotkulaudalla? {paymentInfo}',
- 'e-scooter-quantity': 'Sähköpotkulautoja vapaana juuri nyt: ',
- 'e-scooter-station': 'Sähköpotkulauta-asema',
- 'e-scooters': 'Sähköpotkulaudat',
+ 'Och om du skulle åka elsparkcykel eller taxi en del av din resa? {paymentInfo}',
+ 'e-scooter-station': 'Elsparkcykelstation',
+ 'e-scooters': 'Elsparkcyklar',
'e-scooters-available':
- 'Alueella sähköpotkulautoja vapaana. Ota sähköpotkulauta käyttöön sovelluksella.',
+ 'Det finns lediga elsparkcyklar i området. Ta en elsparkcykel i bruk med en app.',
earlier: 'Tidigare avgångar',
'edit-favourites': 'Redigera favoritdestination',
'elevation-gained-total': 'Uppförsbacke totalt',
@@ -5129,7 +5157,6 @@ const translations = {
'embedded-search.form-heading': 'Inbäddningsverktyg',
engine_ignition_aid: 'Starthjälp',
english: 'Engelsk',
- 'exit-vehicle': 'Nouse pois kyydistä ja kävele laiturille',
explanations: 'Förklaringar',
'extra-info': 'Mer info',
'favourite-failed-text': 'Försök på nytt senare.',
@@ -5143,6 +5170,7 @@ const translations = {
'from-bus': 'bussen',
'from-ferry': 'färjan',
'from-rail': 'tåget',
+ 'from-scooter-location': 'platsen för sparkcykel',
'from-station': 'från stationen',
'from-stop': 'från hållplats',
'from-subway': 'metron',
@@ -5203,7 +5231,7 @@ const translations = {
'itinerary-details.route-has-unknown-alert': 'Störningar längs rutten..',
'itinerary-details.route-has-warning-alert': 'Störningar längs rutten..',
'itinerary-details.scooter-leg':
- '{time} sparkcykla {distance} från {origin} till destinationen {destination}. Restid {duration}',
+ '{time} åk elsparkcykel {distance} från {origin} till destinationen {destination}. Restid {duration}',
'itinerary-details.transit-leg-part-1': '{time} {realtime} ta',
'itinerary-details.transit-leg-part-2':
'från hållplats {startStop} {startZoneInfo} {trackInfo} till hållplats {endStop} {endZoneInfo}. Beräknad restid {duration}',
@@ -5243,9 +5271,12 @@ const translations = {
'Avgår kl {firstDepartureTime} {firstDepartureStopType} {firstDepartureStop}{firstDeparturePlatform}',
'itinerary-summary-row.first-leg-start-time-citybike':
'Avgång kl {firstDepartureTime} från {firstDepartureStop} stadscykelstation',
+ 'itinerary-summary-row.first-leg-start-time-scooter':
+ 'Avgång kl {firstDepartureTime} med en sparkcykel',
'itinerary-summary-row.no-transit-legs': 'Avgå när det passar för dig',
'itinerary-summary-row.transfers':
'Byte {vehicle} vid hållplats {stopName}',
+ 'itinerary-summary-row.transfers-to-rental': 'Byte {vehicle}',
'itinerary-summary-row.walking-distance':
'Promenad sammanlagt {totalDistance}.',
'itinerary-summary.bike-boarding-information':
@@ -5319,6 +5350,7 @@ const translations = {
'menu-link-to-privacy-policy': 'Registerbeskrivning',
'messagebar-label-close-message-bar': 'Stäng banner',
'messagebar-label-page': 'Sidan',
+ 'min-transfer-time': 'Bytestid',
'minute-short': 'min',
minutes: 'min',
'minutes-or-route': 'Min / Linje',
@@ -5338,7 +5370,17 @@ const translations = {
'more-settings': 'Fler inställningar',
'move-on-map': 'Flytta på kartan',
'move-to-tab': 'Gå till fliken {number}',
+ 'navidest-show-on-map': 'Visa rutt på kartan',
navigate: 'Navigera',
+ 'navigation-description': 'Hitta fram med vägledning.',
+ 'navigation-header': 'Följa',
+ 'navigation-journey-start': 'Din resa börjar {time}',
+ 'navigation-label-close': 'Stopp reseledare',
+ 'navigation-start': 'På resa',
+ 'navileg-bicycle': 'Cycla till',
+ 'navileg-car': 'Kör till',
+ 'navileg-scooter': 'Åk elsparkcykel',
+ 'navileg-walk': 'Gå till',
nearest: 'Närmaste { mode }',
'nearest-favorites': 'Hållplatser nära mig',
'nearest-favorites-browse-stops': 'Bläddra och välj hållplatser',
@@ -5400,7 +5442,7 @@ const translations = {
'Genom att logga in kan du spara dina favoriter och använda dem med dina andra enheter.',
'one-way-journey': ' Längden på en enkel resa',
'open-app': ' Öppna appen',
- 'open-operator-app': 'Öppna {operator} appen',
+ 'open-operator-app': 'Öppna appen {operator}',
'open-settings': 'Öppna inställningar',
'option-default': 'Standard',
'option-least': 'Minst',
@@ -5423,9 +5465,9 @@ const translations = {
'park-and-ride-availability': 'Lediga platser:',
'pay-attention': 'Obs!',
'payment-info-e-scooter':
- 'Huomaathan, että potkulautojen käyttö ja maksaminen tapahtuu toimijoiden omilla sovelluksilla.',
+ 'Vänligen observera att användning och betalning av elsparkcyklar görs via operatörernas egna appar.',
'payment-info-e-scooter-taxi':
- 'Huomaathan, että potkulautojen ja taksin käyttö ja maksaminen tapahtuu toimijoiden omilla sovelluksilla.',
+ 'Vänligen observera att användning och betalning av elsparkcyklar och taxi görs via operatörernas egna appar.',
'payment-info-taxi-lifts':
'Huomaathan, että taksien ja kyytipalveluiden käyttö ja maksaminen tapahtuu toimijoiden omilla sovelluksilla.',
payment_at_gate: 'Betalning vid porten',
@@ -5469,11 +5511,11 @@ const translations = {
'remove-favourite': 'Ta bort favoritmarkeringen',
'remove-via-button-label': 'Ta bort viapunkt {index}',
'rent-cycle-at': 'Sök en stadscykel:',
- 'rent-e-scooter-at': 'Ota sähköpotkulauta käyttöön sovelluksella',
+ 'rent-e-scooter-at': 'Ta en elsparkcykel i bruk med en app.',
'rent-scooter-at': 'Hyr en sparkcykel från stationen {station}',
'required-ticket': 'Biljett som behövs under resan',
'return-cycle-to': 'Returnera stadscykeln: ',
- 'return-e-scooter-to': 'Jätä potkulauta turvalliseen paikkaan',
+ 'return-e-scooter-to': 'Lämna elsparkcykeln på ett säkert ställe',
'return-scooter-to': 'Returnera sparkcykeln till stationen {station}',
'right-now': 'Just nu',
route: 'Linje',
@@ -5544,7 +5586,7 @@ const translations = {
save: 'Spara',
scooter: 'Scooter',
'scooter-availability': 'Antal sparkcyklar just nu',
- 'scooter-distance-duration': 'Sparkcykla {duration} ({distance})',
+ 'scooter-distance-duration': 'Åk elsparkcykel {duration} ({distance})',
'scooter-register-required':
'Det krävs registrering för att kunna använda sparkcyklar',
'scooterwalk-distance-duration': 'Led sparkcykeln {duration} ({distance})',
@@ -5577,7 +5619,7 @@ const translations = {
'separate-ticket-required':
'Denna etapp av resan kräver en separat biljett.',
'separate-ticket-required-disclaimer':
- 'Resan består av en eller fleta etapper vilka kräver biljetter som inte säljs av {agencyName}.',
+ 'Resan består av en eller flera etapper vilka kräver biljetter som inte säljs av {agencyName}.',
'separate-ticket-required-for-call-agency-disclaimer':
'I resan ingår anropsbusstrafiken. Bekanta dig med betalningsmetoder och praxis på ',
'set-specific-settings': 'Ställa avancerade inställningar',
@@ -5588,16 +5630,16 @@ const translations = {
'settings-dropdown-close-label': 'Stäng alternativen',
'settings-dropdown-open-label': 'Öppna alternativen',
'settings-e-scooter':
- 'Voit valita haluamasi sähköpotkulaudat, jolloin ne huomioidaan osana reititystä. {paymentInfo}',
+ 'Du kan välja de elsparkcyklar du vill och åka en del av din rutt med den. {paymentInfo}',
'settings-e-scooter-on':
- 'Laita sähköpotkulauta päälle asetuksista pysyvästi',
- 'settings-e-scooter-routes': 'Sähköpotkulaudat osaksi reittejäsi!',
+ 'Lägg till elsparkcyklar permanent i dina inställningar',
+ 'settings-e-scooter-routes': 'Åk elsparkcykel under en del av din resa!',
'settings-label-change': 'Anpassa sökning',
'settings-missing-itineraries-body':
'Dina val i inställningar utesluter vissa ruttalternativ.',
'settings-missing-itineraries-header': 'Saknas det några ruttförslag?',
'settings-taxi-lift':
- 'Voit valita haluamasi taksi ja kyytipalvelut, jolloin ne huomioidaan osana reititystä.',
+ 'Voit valita haluamasi taksi ja kyytipalvelut, jolloin ne ovat osa reititystä.',
share: 'Dela resan',
show: 'Visa',
'show-departures': 'Visa avgångarna',
@@ -5685,7 +5727,9 @@ const translations = {
'time-selector-hours-label': 'Timme',
'time-selector-minutes-label': 'Minut',
timetable: 'Tidtabell',
+ 'to-bicycle': 'stadscykeln',
'to-bus': 'bussen',
+ 'to-e-scooter': 'skotern',
'to-ferry': 'färjan',
'to-frontpage': 'Till startsidan',
'to-rail': 'tåget',
diff --git a/app/util/DTSearchContextInitializer.js b/app/util/DTSearchContextInitializer.js
index e32297e0b4..bf09babced 100644
--- a/app/util/DTSearchContextInitializer.js
+++ b/app/util/DTSearchContextInitializer.js
@@ -39,7 +39,7 @@ export default function intializeSearchContext(context, searchContext) {
// FeedId's like [HSL, HSLLautta]
searchContext.feedIDs = config.feedIds;
searchContext.cityBikeNetworks = useCitybikes(
- config.cityBike.networks,
+ config.vehicleRental.networks,
config,
)
? getDefaultNetworks(config).map(t => `citybikes${t}`)
diff --git a/app/util/legUtils.js b/app/util/legUtils.js
index e248cb630d..2f6a308bb0 100644
--- a/app/util/legUtils.js
+++ b/app/util/legUtils.js
@@ -43,8 +43,8 @@ export function isCallAgencyDeparture(departure) {
function sameBicycleNetwork(leg1, leg2) {
if (leg1.from.vehicleRentalStation && leg2.from.vehicleRentalStation) {
return (
- leg1.from.vehicleRentalStation.network ===
- leg2.from.vehicleRentalStation.network
+ leg1.from.vehicleRentalStation.rentalNetwork.networkId ===
+ leg2.from.vehicleRentalStation.rentalNetwork.networkId
);
}
return true;
@@ -384,7 +384,7 @@ export function getVehicleAvailabilityIndicatorColor(available, config) {
// eslint-disable-next-line no-nested-ternary
available === 0
? '#DC0451'
- : available > config.cityBike.fewAvailableCount
+ : available > config.vehicleRental.fewAvailableCount
? '#3B7F00'
: '#FCBC19'
);
@@ -396,7 +396,7 @@ export function getVehicleAvailabilityIndicatorColor(available, config) {
* @param {*} config the configuration for the software installation/
*/
export function getVehicleAvailabilityTextColor(available, config) {
- return available <= config.cityBike.fewAvailableCount && available > 0
+ return available <= config.vehicleRental.fewAvailableCount && available > 0
? '#333'
: '#fff';
}
@@ -413,7 +413,7 @@ export function getLegBadgeProps(leg, config) {
!leg.rentedBike ||
!leg.from ||
!leg.from.vehicleRentalStation ||
- config.cityBike.capacity === BIKEAVL_UNKNOWN ||
+ config.vehicleRental.capacity === BIKEAVL_UNKNOWN ||
leg.mode === 'WALK' ||
leg.mode === 'SCOOTER'
) {
@@ -605,3 +605,27 @@ export const showBikeBoardingNote = (leg, config) => {
bikeBoardingModes && bikeBoardingModes[leg.mode]?.showNotification === true
);
};
+
+/**
+ * Return translated string that describes leg destination
+ *
+ * @param {object} intl - rect-intl context
+ * @param {object} leg - The leg object.
+ * @param {object} secondary - optional walk leg
+ * @returns {string}
+ */
+export const legDestination = (intl, leg, secondary) => {
+ const { to } = leg;
+ let id = 'modes.to-place';
+
+ if (leg.mode === 'BICYCLE' && to.vehicleParking) {
+ id = 'modes.to-bike-park';
+ } else if (leg.mode === 'CAR' && to.vehicleParking) {
+ id = 'modes.to-car-park';
+ }
+ const mode = to.stop?.vehicleMode || secondary?.stop?.vehicleMode;
+ if (mode) {
+ id = `modes.to-${mode.toLowerCase()}`;
+ }
+ return intl.formatMessage({ id, defaultMessage: 'place' });
+};
diff --git a/app/util/modeUtils.js b/app/util/modeUtils.js
index 6a7dc4947a..aee5f90a6e 100644
--- a/app/util/modeUtils.js
+++ b/app/util/modeUtils.js
@@ -86,10 +86,10 @@ export function showRentalVehiclesOfType(networks, config, type) {
}
export function getNearYouModes(config) {
- if (!config.cityBike?.networks) {
+ if (!config.vehicleRental?.networks) {
return config.nearYouModes;
}
- if (!useCitybikes(config.cityBike.networks, config)) {
+ if (!useCitybikes(config.vehicleRental.networks, config)) {
return config.nearYouModes.filter(mode => mode !== 'citybike');
}
return config.nearYouModes;
@@ -98,11 +98,11 @@ export function getNearYouModes(config) {
export function getTransportModes(config) {
let citybikeConfig = {};
let scooterConfig = {};
- if (config.cityBike?.networks) {
- if (!useCitybikes(config.cityBike.networks, config)) {
+ if (config.vehicleRental?.networks) {
+ if (!useCitybikes(config.vehicleRental.networks, config)) {
citybikeConfig = { citybike: { availableForSelection: false } };
}
- if (!useScooters(config.cityBike.networks)) {
+ if (!useScooters(config.vehicleRental.networks)) {
scooterConfig = { scooter: { availableForSelection: false } };
}
}
diff --git a/app/util/path.js b/app/util/path.js
index 41c6979742..9b4331635a 100644
--- a/app/util/path.js
+++ b/app/util/path.js
@@ -20,7 +20,6 @@ export const stopUrl = id => id;
export const LOCAL_STORAGE_EMITTER_PATH = '/local-storage-emitter';
export const EMBEDDED_SEARCH_PATH = '/haku';
export const PREFIX_RENTALVEHICLES = 'skuutit';
-export const PREFIX_RENTALVEHICLES_CLUSTER = 'skuuttiryhmat';
/**
* Join argument with slash separator.
diff --git a/app/util/planParamUtil.js b/app/util/planParamUtil.js
index 20ae2353bf..846d489f51 100644
--- a/app/util/planParamUtil.js
+++ b/app/util/planParamUtil.js
@@ -197,11 +197,12 @@ export function planQueryNeeded(
);
case PLANTYPE.SCOOTERTRANSIT:
- /* special logic: relaxed scooter query is made only if no networks allowed, and scooters are available for selection */
+ /* special logic: relaxed scooter query is made only if no networks allowed */
return (
+ config.transportModes.scooter.availableForSelection &&
transitModes.length > 0 &&
!wheelchair &&
- (relaxSettings && config.transportModes.scooter.availableForSelection
+ (relaxSettings
? settings.scooterNetworks.length === 0
: settings.scooterNetworks.length > 0)
);
@@ -326,6 +327,7 @@ export function getPlanParams(
case PLANTYPE.SCOOTERTRANSIT:
access = ['WALK', 'SCOOTER_RENTAL'];
egress = access;
+ direct = access;
break;
default: // direct modes
direct = [planType];
diff --git a/app/util/shapes.js b/app/util/shapes.js
index a0b7d96bb7..c8d0fd1845 100644
--- a/app/util/shapes.js
+++ b/app/util/shapes.js
@@ -94,7 +94,9 @@ export const parkShape = PropTypes.shape({
export const vehicleRentalStationShape = PropTypes.shape({
availableVehicles: PropTypes.shape({ total: PropTypes.number }),
availableSpaces: PropTypes.shape({ total: PropTypes.number }),
- network: PropTypes.string,
+ rentalNetwork: PropTypes.shape({
+ networkId: PropTypes.string,
+ }),
capacity: PropTypes.number,
operative: PropTypes.bool,
});
@@ -103,7 +105,6 @@ export const rentalVehicleShape = PropTypes.shape({
id: PropTypes.string,
vehicleId: PropTypes.string,
name: PropTypes.string,
- network: PropTypes.string,
lat: PropTypes.number,
lon: PropTypes.number,
rentalUris: PropTypes.shape({
@@ -113,6 +114,7 @@ export const rentalVehicleShape = PropTypes.shape({
}),
rentalNetwork: PropTypes.shape({
url: PropTypes.string,
+ networkId: PropTypes.string,
}),
});
@@ -400,3 +402,10 @@ export const vehicleShape = PropTypes.shape({
heading: PropTypes.number,
headsign: PropTypes.string,
});
+
+export const minTransferTimeShape = PropTypes.arrayOf(
+ PropTypes.shape({
+ title: PropTypes.string,
+ value: PropTypes.number,
+ }),
+);
diff --git a/app/util/vehicleRentalUtils.js b/app/util/vehicleRentalUtils.js
index 6c65e41eab..3e6ec7cc5d 100644
--- a/app/util/vehicleRentalUtils.js
+++ b/app/util/vehicleRentalUtils.js
@@ -52,17 +52,17 @@ export const getRentalNetworkConfig = (networkId, config) => {
}
const id = networkId.toLowerCase();
if (
- config.cityBike?.networks?.[id] &&
- Object.keys(config.cityBike.networks[id]).length > 0
+ config.vehicleRental?.networks?.[id] &&
+ Object.keys(config.vehicleRental.networks[id]).length > 0
) {
- return config.cityBike.networks[id];
+ return config.vehicleRental.networks[id];
}
return defaultNetworkConfig;
};
export const getDefaultNetworks = config => {
const mappedNetworks = [];
- Object.entries(config.cityBike.networks).forEach(n => {
+ Object.entries(config.vehicleRental.networks).forEach(n => {
if (
networkIsActive(n[1]) &&
n[1]?.type !== RentalNetworkType.Scooter // scooter networks are never on by default
@@ -75,7 +75,7 @@ export const getDefaultNetworks = config => {
export const getAllNetworksOfType = (config, type) => {
const mappedNetworks = [];
- Object.entries(config.cityBike.networks).forEach(n => {
+ Object.entries(config.vehicleRental.networks).forEach(n => {
if (n[1].type.toLowerCase() === type.toLowerCase()) {
mappedNetworks.push(n[0]);
}
@@ -85,11 +85,11 @@ export const getAllNetworksOfType = (config, type) => {
export const mapDefaultNetworkProperties = config => {
const mappedNetworks = [];
- Object.keys(config.cityBike.networks).forEach(key => {
- if (networkIsActive(config.cityBike.networks[key])) {
+ Object.keys(config.vehicleRental.networks).forEach(key => {
+ if (networkIsActive(config.vehicleRental.networks[key])) {
mappedNetworks.push({
networkName: key,
- ...config.cityBike.networks[key],
+ ...config.vehicleRental.networks[key],
});
}
});
@@ -98,7 +98,8 @@ export const mapDefaultNetworkProperties = config => {
export const getVehicleCapacity = (config, network = undefined) => {
return (
- config.cityBike?.networks[network]?.capacity || config.cityBike.capacity
+ config.vehicleRental?.networks[network]?.capacity ||
+ config.vehicleRental.capacity
);
};
/**
@@ -160,10 +161,10 @@ export const updateVehicleNetworks = (currentSettings, newValue) => {
};
export const getVehicleMinZoomOnStopsNearYou = (config, override) => {
- if (override && config.cityBike.minZoomStopsNearYou) {
- return config.cityBike.minZoomStopsNearYou;
+ if (override && config.vehicleRental.minZoomStopsNearYou) {
+ return config.vehicleRental.minZoomStopsNearYou;
}
- return config.cityBike.cityBikeMinZoom;
+ return config.vehicleRental.cityBikeMinZoom;
};
/** *
@@ -204,28 +205,39 @@ export const mapVehicleRentalToStore = vehicleRentalStation => {
return newStation;
};
-export const getRentalVehicleLink = (rentalVehicle, network, networkConfig) => {
+export const getRentalVehicleLink = (rentalVehicle, networkConfig) => {
if (!networkConfig || !rentalVehicle) {
return null;
}
- const { ios, android, web } = rentalVehicle?.rentalUris || {};
+ const { ios, android, web } = rentalVehicle.rentalUris || {};
+ const networkName = getRentalNetworkName(networkConfig).toLowerCase();
- if (isIOS && ios?.startsWith(`${network}://`)) {
+ if (isIOS && ios?.startsWith(`${networkName}://`)) {
return ios;
}
- if (isAndroid && android?.startsWith(`${network}://`)) {
+ if (isAndroid && android?.startsWith(`${networkName}://`)) {
return android;
}
- if (web?.includes(network)) {
+ if (web?.includes(networkName)) {
return web;
}
- if (rentalVehicle?.rentalNetwork?.url?.includes(network)) {
+ if (rentalVehicle.rentalNetwork?.url?.includes(networkName)) {
return rentalVehicle.rentalNetwork.url;
}
return null;
};
+
+export const useDeepLink = (deepLink, fallBackAddress) => {
+ window.location.href = deepLink;
+ setTimeout(() => {
+ if (!document.hidden && document.hasFocus()) {
+ // If the document is still visible and has focus, the deep link must have failed
+ window.location.href = fallBackAddress;
+ }
+ }, 500);
+};
diff --git a/digitransit-component/packages/digitransit-component-control-panel/package.json b/digitransit-component/packages/digitransit-component-control-panel/package.json
index 1dd0b6ef9d..7b5c56a801 100644
--- a/digitransit-component/packages/digitransit-component-control-panel/package.json
+++ b/digitransit-component/packages/digitransit-component-control-panel/package.json
@@ -1,6 +1,6 @@
{
"name": "@digitransit-component/digitransit-component-control-panel",
- "version": "1.1.8",
+ "version": "2.0.0",
"description": "digitransit-component control-panel module",
"main": "index.js",
"files": [
diff --git a/digitransit-component/packages/digitransit-component-control-panel/src/index.js b/digitransit-component/packages/digitransit-component-control-panel/src/index.js
index a37e345afe..8a783fad54 100644
--- a/digitransit-component/packages/digitransit-component-control-panel/src/index.js
+++ b/digitransit-component/packages/digitransit-component-control-panel/src/index.js
@@ -4,8 +4,6 @@
import PropTypes from 'prop-types';
import React, { Fragment, useEffect, useState } from 'react';
import i18next from 'i18next';
-import { useCookies } from 'react-cookie';
-import cx from 'classnames';
import Icon from '@digitransit-component/digitransit-component-icon';
import styles from './helpers/styles.scss';
import translations from './helpers/translations';
@@ -67,73 +65,6 @@ OriginToDestination.defaultProps = {
language: 'fi',
};
-function BubbleDialog({ title, content, closeDialog, shouldRender, lang }) {
- const [show, setShow] = useState(false);
- useEffect(() => {
- setTimeout(() => {
- setShow(true);
- }, 500);
- }, [show]);
-
- return (
-
-
-
-
- {title}
-
-
- {content}
-
-
{
- event.preventDefault();
- closeDialog();
- }}
- onKeyDown={event => {
- event.preventDefault();
- const space = [13, ' ', 'Spacebar'];
- const enter = [32, 'Enter'];
- const key = event && event.key;
- if (key && space.concat(enter).includes(key)) {
- closeDialog();
- }
- }}
- type="button"
- >
-
-
-
-
-
-
- );
-}
-
-BubbleDialog.propTypes = {
- title: PropTypes.string.isRequired,
- content: PropTypes.string.isRequired,
- closeDialog: PropTypes.func.isRequired,
- shouldRender: PropTypes.bool.isRequired,
- lang: PropTypes.string.isRequired,
-};
-
/**
* Show button links to near you page for different travel modes
*
@@ -196,15 +127,11 @@ function NearStopsAndRoutes({
modeSet,
modeIconColors,
fontWeights,
- showTeaser,
}) {
const [modesWithAlerts, setModesWithAlerts] = useState([]);
- const [cookies, setCookie] = useCookies(['nearbyTeaserShown']);
useEffect(() => {
- Object.keys(translations).forEach(lang => {
- i18next.addResourceBundle(lang, 'translation', translations[lang]);
- });
+ i18next.changeLanguage(language);
if (alertsContext) {
alertsContext
.getModesWithAlerts(alertsContext.currentTime, alertsContext.feedIds)
@@ -214,12 +141,6 @@ function NearStopsAndRoutes({
}
}, []);
- const closeBubbleDialog = () =>
- setCookie('nearbyTeaserShown', true, {
- path: '/',
- maxAge: 10 * 365 * 24 * 60 * 60,
- });
-
let urlStart;
if (omitLanguageUrl) {
urlStart = urlPrefix;
@@ -328,20 +249,6 @@ function NearStopsAndRoutes({
: title[language]}
)}
- {showTeaser && !cookies?.nearbyTeaserShown && (
-
- )}
{
+ i18next.addResourceBundle(lang, 'translation', translations[lang]);
+ });
+ }
+
render() {
const className =
this.props.position === 'bottom'
? styles['main-bottom']
: styles['main-left'];
- const children = React.Children.map(this.props.children, child => {
- if (child) {
- let lang = this.props.language;
- if (lang === undefined) {
- lang = 'fi';
- }
- i18next.changeLanguage(lang);
- return React.cloneElement(child, { lang });
- }
- return null;
- });
return (
- {children}
+ {this.props.children}
);
}
diff --git a/digitransit-component/packages/digitransit-component/package.json b/digitransit-component/packages/digitransit-component/package.json
index 10045a9523..ffbee607d6 100644
--- a/digitransit-component/packages/digitransit-component/package.json
+++ b/digitransit-component/packages/digitransit-component/package.json
@@ -16,7 +16,7 @@
"dependencies": {
"@digitransit-component/digitransit-component-autosuggest": "^2.0.8",
"@digitransit-component/digitransit-component-autosuggest-panel": "^3.0.8",
- "@digitransit-component/digitransit-component-control-panel": "^1.1.8",
+ "@digitransit-component/digitransit-component-control-panel": "^2.0.0",
"@digitransit-component/digitransit-component-favourite-bar": "2.0.5",
"@digitransit-component/digitransit-component-favourite-editing-modal": "^2.0.2",
"@digitransit-component/digitransit-component-favourite-modal": "^1.0.6",
diff --git a/sass/_main.scss b/sass/_main.scss
index d65d8a8e96..5c5f3534f5 100644
--- a/sass/_main.scss
+++ b/sass/_main.scss
@@ -62,6 +62,7 @@ $body-font-weight: $font-weight-medium;
@import '../app/component/itinerary/settings-panel';
@import '../app/component/itinerary/mobile-ticket-purchase-information';
@import 'base/button';
+@import '../app/component/itinerary/navigator';
/* Modal */
@import '~foundation-apps/scss/helpers/breakpoints';
diff --git a/scripts/README.md b/scripts/README.md
new file mode 100644
index 0000000000..0613f70d9f
--- /dev/null
+++ b/scripts/README.md
@@ -0,0 +1,16 @@
+# Using scripts
+
+## Before using:
+```
+source ui.sh
+```
+## Usage examples
+
+Using remote instance of OTP with subscription key.
+```
+SUBSCRIPTION_KEY=
ui hsl
+```
+Using local instance of OTP on port `9080`.
+```
+uiotp matka
+```
\ No newline at end of file
diff --git a/scripts/ui.sh b/scripts/ui.sh
new file mode 100755
index 0000000000..3c1cd304ea
--- /dev/null
+++ b/scripts/ui.sh
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+
+ui () {
+ CONFIG=$1 API_SUBSCRIPTION_QUERY_PARAMETER_NAME=digitransit-subscription-key API_SUBSCRIPTION_HEADER_NAME=digitransit-subscription-key API_SUBSCRIPTION_TOKEN=$SUBSCRIPTION_KEY yarn run dev
+}
+
+uiotp () {
+ if [ "$1" = "hsl" ]; then
+ OTP_URL=http://localhost:9080/otp/routers/hsl/ ui hsl
+ elif [ "$1" = "matka" ]; then
+ OTP_URL=http://localhost:9080/otp/routers/finland/ ui matka
+ elif [ "$1" = "kela" ]; then
+ OTP_URL=http://localhost:9080/otp/routers/kela/ ui kela
+ else
+ OTP_URL=http://localhost:9080/otp/routers/waltti/ ui $1
+ fi
+}
diff --git a/server/server.js b/server/server.js
index 068335a57c..5f1e18e3b8 100644
--- a/server/server.js
+++ b/server/server.js
@@ -424,8 +424,8 @@ function fetchCitybikeConfigurations() {
// eslint-disable-next-line import/no-dynamic-require
const conf = require(`${configsDir}/${file}`);
const configName = conf.default.CONFIG;
- const { cityBike } = conf.default;
- if (cityBike && Object.keys(cityBike).length > 0) {
+ const { vehicleRental } = conf.default;
+ if (vehicleRental && Object.keys(vehicleRental).length > 0) {
promises.push(
new Promise(resolve => {
resolve(
diff --git a/static/assets/svg-sprite.default.svg b/static/assets/svg-sprite.default.svg
index 27393ee4fb..48df87502b 100644
--- a/static/assets/svg-sprite.default.svg
+++ b/static/assets/svg-sprite.default.svg
@@ -279,7 +279,7 @@
-
+
diff --git a/test/unit/component/BicycleLeg.test.js b/test/unit/component/BicycleLeg.test.js
index 55bd7e41ea..8d9c947d58 100644
--- a/test/unit/component/BicycleLeg.test.js
+++ b/test/unit/component/BicycleLeg.test.js
@@ -23,7 +23,7 @@ describe(' ', () => {
name: 'Hertanmäenkatu',
vehicleRentalStation: {
vehiclesAvailable: 0,
- network: 'foobar',
+ rentalNetwork: { networkId: 'foobar' },
},
},
to: {
@@ -34,7 +34,7 @@ describe(' ', () => {
const wrapper = shallowWithIntl( , {
context: {
config: {
- cityBike: {
+ vehicleRental: {
networks: { foobar: { type: RentalNetworkType.CityBike } },
},
defaultSettings: { walkSpeed: 1, bikeSpeed: 1 },
@@ -64,7 +64,7 @@ describe(' ', () => {
name: 'Hertanmäenkatu',
vehicleRentalStation: {
vehiclesAvailable: 0,
- network: 'foobar',
+ rentalNetwork: { networkId: 'foobar' },
},
},
to: {
@@ -75,7 +75,7 @@ describe(' ', () => {
const wrapper = shallowWithIntl( , {
context: {
config: {
- cityBike: {
+ vehicleRental: {
networks: { foobar: { type: RentalNetworkType.Scooter } },
},
defaultSettings: { walkSpeed: 1, bikeSpeed: 1 },
@@ -84,7 +84,7 @@ describe(' ', () => {
},
});
expect(wrapper.find(FormattedMessage).at(0).prop('id')).to.equal(
- 'rent-scooter-at',
+ 'rent-e-scooter-at',
);
});
@@ -105,7 +105,7 @@ describe(' ', () => {
name: 'Hertanmäenkatu',
vehicleRentalStation: {
vehiclesAvailable: 0,
- network: 'foobar',
+ rentalNetwork: { networkId: 'foobar' },
},
},
to: {
@@ -116,7 +116,7 @@ describe(' ', () => {
const wrapper = shallowWithIntl( , {
context: {
config: {
- cityBike: {
+ vehicleRental: {
networks: { foobar: { type: RentalNetworkType.CityBike } },
},
defaultSettings: { walkSpeed: 1, bikeSpeed: 1 },
@@ -149,7 +149,7 @@ describe(' ', () => {
name: 'Hertanmäenkatu',
vehicleRentalStation: {
vehiclesAvailable: 0,
- network: 'foobar',
+ rentalNetwork: { networkId: 'foobar' },
},
},
to: {
@@ -160,7 +160,7 @@ describe(' ', () => {
const wrapper = shallowWithIntl( , {
context: {
config: {
- cityBike: {
+ vehicleRental: {
networks: { foobar: { type: RentalNetworkType.Scooter } },
},
defaultSettings: { walkSpeed: 1, bikeSpeed: 1 },
@@ -193,7 +193,7 @@ describe(' ', () => {
name: 'Hertanmäenkatu',
vehicleRentalStation: {
vehiclesAvailable: 0,
- network: 'foobar',
+ rentalNetwork: { networkId: 'foobar' },
},
},
to: {
@@ -204,7 +204,7 @@ describe(' ', () => {
const wrapper = shallowWithIntl( , {
context: {
config: {
- cityBike: {
+ vehicleRental: {
networks: { foobar: { type: RentalNetworkType.CityBike } },
},
defaultSettings: { walkSpeed: 1, bikeSpeed: 1 },
@@ -234,7 +234,7 @@ describe(' ', () => {
name: 'Hertanmäenkatu',
vehicleRentalStation: {
vehiclesAvailable: 0,
- network: 'foobar',
+ rentalNetwork: { networkId: 'foobar' },
},
},
to: {
@@ -245,7 +245,7 @@ describe(' ', () => {
const wrapper = shallowWithIntl( , {
context: {
config: {
- cityBike: {
+ vehicleRental: {
networks: { foobar: { type: RentalNetworkType.Scooter } },
},
defaultSettings: { walkSpeed: 1, bikeSpeed: 1 },
diff --git a/test/unit/component/Itinerary.test.js b/test/unit/component/Itinerary.test.js
index f5bc89b6fe..3894419812 100644
--- a/test/unit/component/Itinerary.test.js
+++ b/test/unit/component/Itinerary.test.js
@@ -53,7 +53,7 @@ describe(' ', () => {
const wrapper = mountWithIntl( , {
context: {
...mockContext,
- config: { CONFIG: 'default', cityBike: { fewAvailableCount: 3 } },
+ config: { CONFIG: 'default', vehicleRental: { fewAvailableCount: 3 } },
},
childContextTypes: { ...mockChildContextTypes },
});
diff --git a/test/unit/component/MapLayersDialogContent.test.js b/test/unit/component/MapLayersDialogContent.test.js
index 2933b4a703..67cd95dd75 100644
--- a/test/unit/component/MapLayersDialogContent.test.js
+++ b/test/unit/component/MapLayersDialogContent.test.js
@@ -218,7 +218,7 @@ describe(' ', () => {
const context = {
config: {
CONFIG: 'default',
- cityBike: {
+ vehicleRental: {
networks: {
foo: {
type: 'citybike',
diff --git a/test/unit/component/map/tile-layer/SelectVehicleRentalStationRow.test.js b/test/unit/component/map/tile-layer/SelectVehicleRentalStationRow.test.js
index 236025919b..0c38f64b04 100644
--- a/test/unit/component/map/tile-layer/SelectVehicleRentalStationRow.test.js
+++ b/test/unit/component/map/tile-layer/SelectVehicleRentalStationRow.test.js
@@ -29,7 +29,7 @@ describe(' ', () => {
const wrapper = shallowWithIntl( , {
context: {
config: {
- cityBike: { networks: { scooter_network: { icon: 'scooter' } } },
+ vehicleRental: { networks: { scooter_network: { icon: 'scooter' } } },
},
},
});
diff --git a/test/unit/component/map/tile-layer/TileLayerContainer.test.js b/test/unit/component/map/tile-layer/TileLayerContainer.test.js
index 472695df8c..8ea2474815 100644
--- a/test/unit/component/map/tile-layer/TileLayerContainer.test.js
+++ b/test/unit/component/map/tile-layer/TileLayerContainer.test.js
@@ -127,7 +127,7 @@ describe(' ', () => {
}),
on: () => {},
}),
- config: { CONFIG: 'default', cityBike: {} },
+ config: { CONFIG: 'default', vehicleRental: {} },
},
},
);
diff --git a/test/unit/test-data/dcw12.js b/test/unit/test-data/dcw12.js
index d6a4db5c1b..aa5e6552d1 100644
--- a/test/unit/test-data/dcw12.js
+++ b/test/unit/test-data/dcw12.js
@@ -250,7 +250,7 @@ export default {
lat: 60.2010614,
lon: 24.9440506,
stop: null,
- vehicleRentalStation: { networks: ['smoove'] },
+ vehicleRentalStation: { rentalNetwork: { networkId: 'smoove' } },
},
to: { stop: null },
},
@@ -311,7 +311,7 @@ export default {
lat: 60.179765,
lon: 24.9554618,
stop: null,
- vehicleRentalStation: { networks: ['smoove'] },
+ vehicleRentalStation: { rentalNetwork: { networkId: 'smoove' } },
},
to: { stop: null },
},
@@ -332,7 +332,7 @@ export default {
lat: 60.160925600000006,
lon: 24.941921,
stop: null,
- vehicleRentalStation: { networks: ['smoove'] },
+ vehicleRentalStation: { rentalNetwork: { networkId: 'smoove' } },
},
to: { stop: null },
},
@@ -353,7 +353,7 @@ export default {
lat: 60.160952472069354,
lon: 24.9418835642972,
stop: null,
- vehicleRentalStation: { networks: ['smoove'] },
+ vehicleRentalStation: { rentalNetwork: { networkId: 'smoove' } },
},
to: { stop: null },
},
@@ -414,7 +414,7 @@ export default {
lat: 60.1618359,
lon: 24.9368179,
stop: null,
- vehicleRentalStation: { networks: ['smoove'] },
+ vehicleRentalStation: { rentalNetwork: { networkId: 'smoove' } },
},
to: { stop: null },
},
@@ -435,7 +435,7 @@ export default {
lat: 60.16185062722838,
lon: 24.936860480731475,
stop: null,
- vehicleRentalStation: { networks: ['smoove'] },
+ vehicleRentalStation: { rentalNetwork: { networkId: 'smoove' } },
},
to: { stop: null },
},
@@ -456,7 +456,7 @@ export default {
lat: 60.1617163,
lon: 24.937049100000003,
stop: null,
- vehicleRentalStation: { networks: ['smoove'] },
+ vehicleRentalStation: { rentalNetwork: { networkId: 'smoove' } },
},
to: { stop: null },
},
diff --git a/test/unit/util/planParamUtil.test.js b/test/unit/util/planParamUtil.test.js
index eb39245bb5..64edc5dd63 100644
--- a/test/unit/util/planParamUtil.test.js
+++ b/test/unit/util/planParamUtil.test.js
@@ -29,7 +29,7 @@ const config = {
},
},
modePolygons: {},
- cityBike: {
+ vehicleRental: {
networks: {
smoove: {
icon: 'citybike',
diff --git a/test/unit/util/vehiclerental.test.js b/test/unit/util/vehiclerental.test.js
index 321d051857..d8a049d175 100644
--- a/test/unit/util/vehiclerental.test.js
+++ b/test/unit/util/vehiclerental.test.js
@@ -32,24 +32,24 @@ describe('vehiclerental', () => {
expect(getRentalNetworkConfig('Smoove', {})).to.equal(
defaultNetworkConfig,
);
- expect(getRentalNetworkConfig('Smoove', { cityBike: {} })).to.equal(
+ expect(getRentalNetworkConfig('Smoove', { vehicleRental: {} })).to.equal(
defaultNetworkConfig,
);
expect(
getRentalNetworkConfig('Smoove', {
- cityBike: { networks: {} },
+ vehicleRental: { networks: {} },
}),
).to.equal(defaultNetworkConfig);
expect(
getRentalNetworkConfig('Smoove', {
- cityBike: { networks: { smoove: {} } },
+ vehicleRental: { networks: { smoove: {} } },
}),
).to.equal(defaultNetworkConfig);
});
it('should return the configuration by the given network id', () => {
const config = {
- cityBike: {
+ vehicleRental: {
networks: {
foobar: {
icon: 'citybike',
@@ -59,13 +59,13 @@ describe('vehiclerental', () => {
},
};
expect(getRentalNetworkConfig('foobar', config)).to.equal(
- config.cityBike.networks.foobar,
+ config.vehicleRental.networks.foobar,
);
});
it('should convert networkId to lowercase', () => {
const config = {
- cityBike: {
+ vehicleRental: {
networks: {
foobar: {
icon: 'citybike',
@@ -75,7 +75,7 @@ describe('vehiclerental', () => {
},
};
expect(getRentalNetworkConfig('Foobar', config)).to.equal(
- config.cityBike.networks.foobar,
+ config.vehicleRental.networks.foobar,
);
});
});
diff --git a/yarn.lock b/yarn.lock
index abe77cbc2d..1b00cb003e 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2013,7 +2013,7 @@ __metadata:
languageName: unknown
linkType: soft
-"@digitransit-component/digitransit-component-control-panel@^1.1.8, @digitransit-component/digitransit-component-control-panel@workspace:digitransit-component/packages/digitransit-component-control-panel":
+"@digitransit-component/digitransit-component-control-panel@^2.0.0, @digitransit-component/digitransit-component-control-panel@workspace:digitransit-component/packages/digitransit-component-control-panel":
version: 0.0.0-use.local
resolution: "@digitransit-component/digitransit-component-control-panel@workspace:digitransit-component/packages/digitransit-component-control-panel"
peerDependencies:
@@ -2168,7 +2168,7 @@ __metadata:
dependencies:
"@digitransit-component/digitransit-component-autosuggest": ^2.0.8
"@digitransit-component/digitransit-component-autosuggest-panel": ^3.0.8
- "@digitransit-component/digitransit-component-control-panel": ^1.1.8
+ "@digitransit-component/digitransit-component-control-panel": ^2.0.0
"@digitransit-component/digitransit-component-favourite-bar": 2.0.5
"@digitransit-component/digitransit-component-favourite-editing-modal": ^2.0.2
"@digitransit-component/digitransit-component-favourite-modal": ^1.0.6
@@ -8770,9 +8770,9 @@ __metadata:
linkType: hard
"caniuse-lite@npm:^1.0.0, caniuse-lite@npm:^1.0.30001109, caniuse-lite@npm:^1.0.30001524, caniuse-lite@npm:^1.0.30001580":
- version: 1.0.30001585
- resolution: "caniuse-lite@npm:1.0.30001585"
- checksum: c5994f0b5de857349ae0c157a3c61883e800ed154bbeab339aecf01a0a0fd24f67d23ebb48bc995c4c9cde2a281a51b682d1b14bbf2f832f6b2261119f450af4
+ version: 1.0.30001651
+ resolution: "caniuse-lite@npm:1.0.30001651"
+ checksum: c31a5a01288e70cdbbfb5cd94af3df02f295791673173b8ce6d6a16db4394a6999197d44190be5a6ff06b8c2c7d2047e94dfd5e5eb4c103ab000fca2d370afc7
languageName: node
linkType: hard