mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 15:19:35 +02:00
BVG: parse high occupancies
This commit is contained in:
parent
69ddf5fb8d
commit
6941e7a4ad
1 changed files with 3 additions and 2 deletions
|
@ -19,6 +19,7 @@ const {
|
||||||
const baseProfile = require('./base.json')
|
const baseProfile = require('./base.json')
|
||||||
const products = require('./products')
|
const products = require('./products')
|
||||||
|
|
||||||
|
// todo: there's also a referenced icon `{"res":"occup_fig_{low,mid}"}`
|
||||||
const addOccupancy = (item, occupancyCodes) => {
|
const addOccupancy = (item, occupancyCodes) => {
|
||||||
const remIdx = (item.remarks || [])
|
const remIdx = (item.remarks || [])
|
||||||
.findIndex(r => r.code && occupancyCodes.has(r.code))
|
.findIndex(r => r.code && occupancyCodes.has(r.code))
|
||||||
|
@ -34,12 +35,12 @@ const addOccupancy = (item, occupancyCodes) => {
|
||||||
const stopoverOccupancyCodes = new Map([
|
const stopoverOccupancyCodes = new Map([
|
||||||
['text.occup.loc.max.11', 'low'],
|
['text.occup.loc.max.11', 'low'],
|
||||||
['text.occup.loc.max.12', 'medium'],
|
['text.occup.loc.max.12', 'medium'],
|
||||||
// todo: high
|
['text.occup.loc.max.13', 'high'],
|
||||||
])
|
])
|
||||||
const journeyLegOccupancyCodes = new Map([
|
const journeyLegOccupancyCodes = new Map([
|
||||||
['text.occup.jny.max.11', 'low'],
|
['text.occup.jny.max.11', 'low'],
|
||||||
['text.occup.jny.max.12', 'medium'],
|
['text.occup.jny.max.12', 'medium'],
|
||||||
// todo: high
|
['text.occup.jny.max.13', 'high'],
|
||||||
])
|
])
|
||||||
|
|
||||||
// todo: https://m.tagesspiegel.de/berlin/fahrerlebnis-wie-im-regionalexpress-so-faehrt-es-sich-in-der-neuen-express-s-bahn/25338674.html
|
// todo: https://m.tagesspiegel.de/berlin/fahrerlebnis-wie-im-regionalexpress-so-faehrt-es-sich-in-der-neuen-express-s-bahn/25338674.html
|
||||||
|
|
Loading…
Add table
Reference in a new issue