mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 15:19:35 +02:00
parseLint: use addName, add todos
This commit is contained in:
parent
707fd292d7
commit
1e0182f8f6
2 changed files with 9 additions and 1 deletions
|
@ -5,6 +5,13 @@ const codesByIcon = Object.assign(Object.create(null), {
|
|||
})
|
||||
|
||||
// todo: is passing in profile necessary?
|
||||
// todo: pass in tag list from hint reference, e.g.:
|
||||
// "tagL": [
|
||||
// "RES_JNY_H3" // H3 = level 3 heading? shown on overview
|
||||
// ]
|
||||
// "tagL": [
|
||||
// "RES_JNY_DTL" // only shown in journey detail
|
||||
// ]
|
||||
const parseHint = (profile, h, icons) => {
|
||||
// todo: C
|
||||
// todo:
|
||||
|
|
|
@ -12,7 +12,7 @@ const createParseLine = (profile, opt, {operators}) => {
|
|||
|
||||
const parseLine = (p) => {
|
||||
if (!p) return null // todo: handle this upstream
|
||||
const name = p.line || p.name || null
|
||||
const name = p.line || p.addName || p.name || null // wtf
|
||||
const res = {
|
||||
type: 'line',
|
||||
// This is terrible, but FPTF demands an ID. Let's pray for HAFAS.
|
||||
|
@ -21,6 +21,7 @@ const createParseLine = (profile, opt, {operators}) => {
|
|||
|| name && slugg(name.trim())
|
||||
|| null
|
||||
),
|
||||
// todo: what is p.prodCtx.matchId? use as `id`? expose it.
|
||||
fahrtNr: p.prodCtx && p.prodCtx.num || null,
|
||||
name,
|
||||
public: true
|
||||
|
|
Loading…
Add table
Reference in a new issue