mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 15:19:35 +02:00
add provenance field on arrivals
This commit is contained in:
parent
542aa8caef
commit
3ca4a0c2b2
2 changed files with 4 additions and 0 deletions
|
@ -29,6 +29,7 @@ const createParseArrOrDep = (prefix) => {
|
||||||
...profile.parsePlatform(ctx, plPlanned, plPrognosed, cancelled),
|
...profile.parsePlatform(ctx, plPlanned, plPrognosed, cancelled),
|
||||||
// todo: for arrivals, this is the *origin*, not the *direction*
|
// todo: for arrivals, this is the *origin*, not the *direction*
|
||||||
direction: prefix === DEPARTURE && d.dirTxt && profile.parseStationName(ctx, d.dirTxt) || null,
|
direction: prefix === DEPARTURE && d.dirTxt && profile.parseStationName(ctx, d.dirTxt) || null,
|
||||||
|
provenance: prefix === ARRIVAL && d.dirTxt && profile.parseStationName(ctx, d.dirTxt) || null,
|
||||||
line: d.line || null,
|
line: d.line || null,
|
||||||
remarks: []
|
remarks: []
|
||||||
}
|
}
|
||||||
|
|
3
test/fixtures/vbb-departures.js
vendored
3
test/fixtures/vbb-departures.js
vendored
|
@ -185,6 +185,7 @@ module.exports = [
|
||||||
platform: null,
|
platform: null,
|
||||||
plannedPlatform: null,
|
plannedPlatform: null,
|
||||||
direction: 'S+U Hermannstr.',
|
direction: 'S+U Hermannstr.',
|
||||||
|
provenance: null,
|
||||||
line: {
|
line: {
|
||||||
type: 'line',
|
type: 'line',
|
||||||
id: 'u8',
|
id: 'u8',
|
||||||
|
@ -849,6 +850,7 @@ module.exports = [
|
||||||
platform: null,
|
platform: null,
|
||||||
plannedPlatform: null,
|
plannedPlatform: null,
|
||||||
direction: 'U Paracelsus-Bad',
|
direction: 'U Paracelsus-Bad',
|
||||||
|
provenance: null,
|
||||||
line: {
|
line: {
|
||||||
type: 'line',
|
type: 'line',
|
||||||
id: 'u8',
|
id: 'u8',
|
||||||
|
@ -1608,6 +1610,7 @@ module.exports = [
|
||||||
platform: '4',
|
platform: '4',
|
||||||
plannedPlatform: '4',
|
plannedPlatform: '4',
|
||||||
direction: 'S Spandau',
|
direction: 'S Spandau',
|
||||||
|
provenance: null,
|
||||||
line: {
|
line: {
|
||||||
type: 'line',
|
type: 'line',
|
||||||
id: 's9',
|
id: 's9',
|
||||||
|
|
Loading…
Add table
Reference in a new issue