mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 15:19:35 +02:00
departures, arrivals, stopovers: former scheduled platform(s)
This commit is contained in:
parent
0199749a31
commit
0d5a8fab1b
2 changed files with 8 additions and 1 deletions
|
@ -39,7 +39,7 @@ const createParseArrOrDep = (profile, opt, data, prefix) => {
|
|||
const pR = d.stbStop[prefix + 'PlatfR']
|
||||
const pP = d.stbStop[prefix + 'PlatfS']
|
||||
res.platform = pR || pP || null
|
||||
// todo: `formerScheduledPlatform`
|
||||
if (pR && pP && pR !== pP) res.formerScheduledPlatform = pP
|
||||
|
||||
// todo: DRY with parseStopover
|
||||
// todo: DRY with parseJourneyLeg
|
||||
|
|
|
@ -39,6 +39,13 @@ const createParseStopover = (profile, opt, data, date) => {
|
|||
res.departureDelay = Math.round((realtime - planned) / 1000)
|
||||
}
|
||||
|
||||
if (st.aPlatfR && st.aPlatfS && st.aPlatfR !== st.aPlatfS) {
|
||||
res.formerScheduledArrivalPlatform = st.aPlatfS
|
||||
}
|
||||
if (st.dPlatfR && st.dPlatfS && st.dPlatfR !== st.dPlatfS) {
|
||||
res.formerScheduledDeparturePlatform = st.dPlatfS
|
||||
}
|
||||
|
||||
// mark stations the train passes without stopping
|
||||
if(st.dInS === false && st.aOutS === false) res.passBy = true
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue