parseStopover: arrivalPlatform, departurePlatform

This commit is contained in:
Jannis R 2018-06-22 13:38:47 +02:00
parent ebe4fa64d8
commit 96f9f93957
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5

View file

@ -1,15 +1,15 @@
'use strict' 'use strict'
// todo: arrivalDelay, departureDelay or only delay ?
// todo: arrivalPlatform, departurePlatform
const createParseStopover = (profile, stations, lines, remarks, date) => { const createParseStopover = (profile, stations, lines, remarks, date) => {
const parseStopover = (st) => { const parseStopover = (st) => {
const res = { const res = {
station: stations[parseInt(st.locX)] || null, station: stations[parseInt(st.locX)] || null,
arrival: null, arrival: null,
arrivalDelay: null, arrivalDelay: null,
arrivalPlatform: st.aPlatfR || st.aPlatfS || null,
departure: null, departure: null,
departureDelay: null departureDelay: null,
departurePlatform: st.dPlatfR || st.dPlatfS || null
} }
// todo: DRY with parseDeparture // todo: DRY with parseDeparture