mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-04-20 23:23:56 +03:00
parseWarning: parse products
This commit is contained in:
parent
59de9b8862
commit
820f2abe86
1 changed files with 3 additions and 1 deletions
|
@ -10,7 +10,8 @@ const typesByIcon = Object.assign(Object.create(null), {
|
|||
|
||||
// todo: is passing in profile necessary?
|
||||
const parseWarning = (profile, w, icons) => {
|
||||
// todo: hid, act, pub, lead, tckr, icoX, fLocX, tLocX, prod, comp,
|
||||
// todo: pass `d`/`d.common` in, parse `w.fLocX`/`w.tLocX`/`w.icoX`
|
||||
// todo: hid, act, pub, lead, tckr, comp,
|
||||
// todo: cat (1, 2), pubChL
|
||||
// pubChL:
|
||||
// [ { name: 'timetable',
|
||||
|
@ -35,6 +36,7 @@ const parseWarning = (profile, w, icons) => {
|
|||
priority: w.prio,
|
||||
category: w.cat || null // todo: parse to sth meaningful
|
||||
}
|
||||
if ('prod' in w) res.products = client.profile.parseProducts(61442)
|
||||
|
||||
// todo: pass tzOffset to `parseDateTime`
|
||||
if (w.sDate && w.sTime) res.validFrom = parseDateTime(profile, w.sDate, w.sTime, null)
|
||||
|
|
Loading…
Add table
Reference in a new issue