Skip to content

Commit db1e72e

Browse files
committed
Merge branch 'v3' into next
2 parents 6be509f + a63e9a0 commit db1e72e

File tree

5 files changed

+18
-12
lines changed

5 files changed

+18
-12
lines changed

app/component/itinerary/navigator/NaviCardContainer.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,18 @@ function NaviCardContainer(
6969
const focusRef = useRef(false);
7070

7171
const { intl, config, match, router } = context;
72+
const platformRef = useRef();
7273

73-
const nextLegPlatformCode = nextLeg?.from?.stop?.platformCode;
74-
const platformStatus = getPlatformChangeStatus(
75-
nextLeg,
76-
usePrevious(nextLegPlatformCode).previous,
77-
);
74+
if (legChanged) {
75+
platformRef.current = undefined;
76+
}
77+
let platformStatus = PLATFORM_STATUS.NORMAL;
78+
if (nextLeg?.transitLeg) {
79+
platformStatus = getPlatformChangeStatus(nextLeg, platformRef.current);
80+
if (platformStatus === PLATFORM_STATUS.CHANGED) {
81+
platformRef.current = nextLeg.from.stop.platformCode;
82+
}
83+
}
7884

7985
const handleRemove = index => {
8086
const msg = messages.get(activeMessages[index].id);

app/component/nearyou/stops-near-you.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,7 @@
347347

348348
.platform-cell {
349349
display: flex;
350+
white-space: nowrap;
350351
}
351352

352353
.platform-code {

app/configurations/config.hsl.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -443,9 +443,6 @@ export default {
443443
ticketPurchaseLink: function purchaseTicketLink(fare) {
444444
return `https://open.app.hsl.fi/zoneTicketWizard/TICKET_TYPE_SINGLE_TICKET/${fare.ticketName}/adult/-`;
445445
},
446-
ticketLink: {
447-
fi: 'https://open.app.hsl.fi/tickets',
448-
},
449446
ticketLinkOperatorCode: 'hsl',
450447
// mapping fareId from OTP fare identifiers to human readable form
451448
// in the new HSL zone model, just strip off the prefix 'HSL:'

app/configurations/config.varely.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,4 +191,5 @@ export default configMerger(walttiConfig, {
191191
allowLogin: false,
192192
routeNotifications: [],
193193
analyticsScript: '',
194+
GTMid: null,
194195
});

app/util/planParamUtil.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -272,9 +272,10 @@ export function planQueryNeeded(
272272
}
273273
}
274274

275-
function getLocation(str) {
275+
function getLocation(str, planType) {
276276
const loc = otpToLocation(str);
277-
if (loc.gtfsId) {
277+
// direct car routing from/to a stop does not work
278+
if (loc.gtfsId && planType !== PLANTYPE.CAR) {
278279
return {
279280
location: {
280281
stopLocation: { stopLocationId: loc.gtfsId },
@@ -320,8 +321,8 @@ export function getPlanParams(
320321
planType,
321322
relaxSettings = false,
322323
) {
323-
const fromPlace = getLocation(from);
324-
const toPlace = getLocation(to);
324+
const fromPlace = getLocation(from, planType);
325+
const toPlace = getLocation(to, planType);
325326
const useLatestArrival = arriveBy === 'true';
326327
// estimate distance for search iteration heuristics
327328
const fromLocation = otpToLocation(from);

0 commit comments

Comments
 (0)