Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined trunkRoute error handling #433

Merged
merged 107 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
5df15f1
fix combining rows
ahjyrkia Mar 10, 2023
344cc15
Merge pull request #362 from HSLdevcom/timetable-fix
ahjyrkia Mar 10, 2023
732a101
MM-484: Allow launching separate services as different instances (#363)
e-halinen Mar 29, 2023
9be2fb4
MM-497: Endpoint for render URL generation, Update README about servi…
e-halinen Apr 26, 2023
8677a96
Allow route title to enter the padding area
jhanninen May 5, 2023
0943138
Merge pull request #367 from HSLdevcom/hotfix-routes-overflow
jhanninen May 5, 2023
e1b1a4e
MM-495: Rename ticket-zones.json, update README (#365)
e-halinen May 9, 2023
518bfa6
MM-502: Add more functionality to generateRenderUrl endpoint and rend…
e-halinen May 9, 2023
4397c12
Fix url env variables for server (#368)
e-halinen May 10, 2023
0e6e5dc
MM-504: Add redirect parameter to generateRenderUrl endpoint
e-halinen May 10, 2023
1bb0e9b
Merge pull request #369 from HSLdevcom/MM-504
jhanninen Jun 8, 2023
63d3416
Remove forever from deployment
jhanninen Jun 12, 2023
0dbfed1
Add publisher server url to env to be build in the image
jhanninen Jun 12, 2023
a60cf90
Fix and enhance puppeteer console logging
jhanninen Jun 13, 2023
4b254d9
Remove trailing slash from server url env
jhanninen Jun 13, 2023
c9fbb7c
Upgrade hsl-map-style
jhanninen Jul 5, 2023
f684bdb
Fix single departure grouping with same minutes
e-halinen Aug 24, 2023
ad29935
Add filtering for duplicate departures
e-halinen Aug 24, 2023
8daf91e
Merge pull request #370 from HSLdevcom/MM-522
jhanninen Aug 25, 2023
1d6370b
Drop console statement
jhanninen Aug 25, 2023
a308ffc
day specific a4 timetable departures
ahjyrkia Sep 1, 2023
fa78fa6
bug fixes
ahjyrkia Sep 5, 2023
60fb703
Merge pull request #372 from HSLdevcom/MM-525-day-specific-timetables
jhanninen Sep 7, 2023
d2202dc
l_rail color added
ahjyrkia Sep 25, 2023
b1d9c56
legend updated
ahjyrkia Sep 25, 2023
47d2488
translations
ahjyrkia Sep 25, 2023
898cb04
Merge pull request #374 from HSLdevcom/MM-511-L-rail
ahjyrkia Sep 26, 2023
1600040
style reference update
ahjyrkia Sep 26, 2023
d783730
Merge pull request #375 from HSLdevcom/MM-511-hsl-map-style-fix
ahjyrkia Sep 26, 2023
c6610d0
yarn.lock
ahjyrkia Sep 26, 2023
3eb24bc
Merge pull request #376 from HSLdevcom/MM-511-hsl-map-style-fix
ahjyrkia Sep 26, 2023
9314565
revert package.json and yarn.lock
ahjyrkia Sep 26, 2023
f947fac
Merge pull request #377 from HSLdevcom/MM-511-hsl-map-style-fix
ahjyrkia Sep 26, 2023
fb96b6b
new color and background color for stopPoster
ahjyrkia Sep 26, 2023
1aba0d1
Merge pull request #378 from HSLdevcom/MM-511-L-rail
ahjyrkia Sep 26, 2023
03abf02
yarn.lock update
ahjyrkia Sep 26, 2023
ed2dbc0
Merge branch 'development' into MM-511-L-rail
ahjyrkia Sep 26, 2023
2711fde
Merge pull request #379 from HSLdevcom/MM-511-L-rail
ahjyrkia Sep 26, 2023
47a0709
L-rail icon and color update
ahjyrkia Sep 27, 2023
f955569
Merge pull request #380 from HSLdevcom/MM-511-L-rail
ahjyrkia Sep 27, 2023
14347ba
MM-507: Add Docker Compose setup for development (#383)
e-halinen Oct 9, 2023
05b1b60
Use tram diagram also on light rail stops
jhanninen Oct 11, 2023
e9f0e14
Merge pull request #384 from HSLdevcom/25242-tram-diagram-on-light-ra…
jhanninen Oct 11, 2023
ab41ab2
Resize Pikaratikka's icon to render it correctly
jhanninen Oct 12, 2023
c5fb6ca
fixed StopPoster timetable columns
ahjyrkia Oct 31, 2023
49a4b5f
removed redundant prop
ahjyrkia Oct 31, 2023
fd17a6b
Merge pull request #389 from HSLdevcom/timetables-column-fix
ahjyrkia Nov 2, 2023
090a6f9
#26114: language change for print button (#388)
e-halinen Nov 6, 2023
f226f12
#26236: Fix StopPosterA3 generating error (#391)
e-halinen Nov 14, 2023
05a9b5f
Merge branch 'master' into development
e-halinen Nov 15, 2023
9c3dadc
Merge conflict fix
e-halinen Nov 15, 2023
fcd10c8
empty day columns fixed
ahjyrkia Dec 12, 2023
c26f785
Merge pull request #395 from HSLdevcom/daily-timetable-empty-days-hotfix
ahjyrkia Dec 12, 2023
abd2096
AB#27362: Scripted test stops (#393)
e-halinen Dec 13, 2023
39dfd02
yarn.lock and dockerfile updates
ahjyrkia Jan 10, 2024
82af63b
update react
ahjyrkia Jan 31, 2024
2fd120d
deprecated lifecycles removed
ahjyrkia Jan 31, 2024
4b96aca
WIP: Create line timetable component
e-halinen Mar 7, 2024
88b0afb
Include app.js for new component
e-halinen Mar 7, 2024
7d29073
AB#32085: WIP: Add LineTimetable component
e-halinen Mar 13, 2024
a7701c8
Change routeIdentifier property
e-halinen Mar 13, 2024
323f370
AB#32085: Add LineTimetable to test script
e-halinen Mar 14, 2024
eb5b081
Add font styling, tweak font sizes and date formatting
e-halinen Mar 14, 2024
3929423
AB#33201: Fix wrong route color in StopPoster
e-halinen Mar 19, 2024
b7155b6
Merge pull request #398 from HSLdevcom/AB#33201_routeId_color_fix
jhanninen Mar 22, 2024
1bdc2b9
Merge pull request #396 from HSLdevcom/#AB25283-node-update
jhanninen Mar 22, 2024
91be8f2
Merge pull request #397 from HSLdevcom/AB#32085_line_timetable
jhanninen Mar 22, 2024
ec9939b
Add build command to compose and fix output folder location
jhanninen Mar 22, 2024
89aa890
Revert "Merge pull request #397 from HSLdevcom/AB#32085_line_timetable"
jhanninen Mar 25, 2024
fa31eb4
Merge pull request #400 from HSLdevcom/docker-compose-enhancements
jhanninen Mar 25, 2024
c210c6a
Revert "#AB25283 Node/React update"
jhanninen Mar 25, 2024
28aa23d
Revert "Revert "Merge pull request #397 from HSLdevcom/AB#32085_line_…
jhanninen Mar 25, 2024
7d3cf1d
Merge pull request #401 from HSLdevcom/revert-396-#AB25283-node-update
jhanninen Mar 25, 2024
cb348b8
Revert "Revert "#AB25283 Node/React update""
ahjyrkia Mar 25, 2024
174b083
build fix
ahjyrkia Mar 25, 2024
aee895f
Merge pull request #403 from HSLdevcom/revert-401-revert-396-#AB25283…
ahjyrkia Mar 25, 2024
91bc942
removing fast refresh from dev webpack
ahjyrkia Mar 25, 2024
b730080
Merge pull request #404 from HSLdevcom/revert-401-revert-396-#AB25283…
ahjyrkia Mar 25, 2024
bf5ee49
removing fast refresh from webpack.common
ahjyrkia Mar 25, 2024
514837d
Merge pull request #405 from HSLdevcom/revert-401-revert-396-#AB25283…
ahjyrkia Mar 25, 2024
47aeacb
node env
ahjyrkia Mar 27, 2024
77a92fb
Merge pull request #406 from HSLdevcom/revert-401-revert-396-#AB25283…
ahjyrkia Mar 27, 2024
da5eaf4
AB#33966: Pass api key to client-side in env variables (#407)
e-halinen Mar 27, 2024
93aff58
Revert "AB#33966: Pass api key to client-side in env variables (#407)"
e-halinen Mar 28, 2024
74ecf4c
AB#33966: Expose local env file in compose to pass apikey without ext…
e-halinen Mar 28, 2024
c5fb6d4
AB#32085: add print button (#409)
e-halinen Mar 28, 2024
b1cabdb
AB#32085: Remove unused prop
e-halinen Mar 28, 2024
61d6f59
AB#32667: Add smaller size variant to TerminalPoster component (#399)
e-halinen Apr 3, 2024
8fdc3df
Bump map-style version to 1.1.3 (#412)
e-halinen Apr 24, 2024
3333d21
WIP: Bug fix for stop poster
e-halinen May 15, 2024
f0d31fc
AB#37216: Fix horizontal overflow error on large terminal route lists…
e-halinen May 17, 2024
5945c68
Fix trunk route color in route diagram (#414)
e-halinen May 21, 2024
e76e844
AB#39315: remove opening times from SVG (#416)
e-halinen Jun 17, 2024
98db819
AB#32085: Refactor generateRenderUrl endpoint to accept LineTimetable…
e-halinen Aug 6, 2024
32913de
AB#32085: Show both directions in same timetable (#411)
e-halinen Aug 6, 2024
d834563
AB#32085: Tweak styling, refactor render logic (#419)
e-halinen Sep 12, 2024
a367a14
AB#32085: Change LineTimetable print layout to A5 (#420)
e-halinen Oct 15, 2024
3f321ad
AB#44831: Add font styling to StopPoster map legend texts (#421)
e-halinen Oct 22, 2024
83f0e6b
AB#44831: Add italics to Stop Poster TableHeaders (#422)
e-halinen Oct 24, 2024
07d2fa5
AB#46862: Refactor route filtering logic (#425)
e-halinen Nov 18, 2024
3800544
AB#32085: Add page numbering (#424)
e-halinen Nov 22, 2024
7f72e74
AB#32085: Tweak print parameters, clean up (#428)
e-halinen Nov 25, 2024
7f748be
AB#32085: Tweak LineTimetable font styles (#429)
e-halinen Nov 26, 2024
f80ea9f
Merge branch 'master' into development
e-halinen Nov 26, 2024
ed19393
AB#48147: Improve missing line data error handling (#431)
e-halinen Dec 9, 2024
b569ac6
AB#48147: Improve empty line node array error handling (#432)
e-halinen Dec 9, 2024
597d80a
Merge branch 'master' into development
e-halinen Dec 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions src/components/map/stopMapContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,24 @@ const stopsMapper = stopGroup => ({
const destinationSe = mergedRouteSegment.destinationSe
? mergedRouteSegment.destinationSe
: get(mergedRouteSegment, 'route.nodes[0].destinationSe');

let trunkRoute;

try {
trunkRoute =
mergedRouteSegment.line.nodes && mergedRouteSegment.line.nodes[0].trunkRoute === '1';
} catch (e) {
trunkRoute = false;
}

return {
routeId: trimRouteId(mergedRouteSegment.routeId),
destinationFi,
destinationSe,
viaFi: mergedRouteSegment.viaFi,
viaSe: mergedRouteSegment.viaSe,
mode: mergedRouteSegment.route.nodes[0].mode,
trunkRoute:
mergedRouteSegment.line.nodes && mergedRouteSegment.line.nodes[0].trunkRoute === '1',
trunkRoute,
};
}),
).sort(routeCompare),
Expand Down
9 changes: 8 additions & 1 deletion src/util/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,14 @@ function routesToTree(routes, { stopZone, shortId }, height = 'auto', width = MA
type: 'stop',
zone: stop.stopZone,
routeSegments: stop.routeSegments.nodes.map(segment => {
const trunkRoute = segment.line.nodes[0].trunkRoute === '1';

let trunkRoute;
try {
trunkRoute = segment.line.nodes[0].trunkRoute === '1';
} catch (e) {
trunkRoute = false;
}

return {
...segment,
trunkRoute,
Expand Down
Loading