Skip to content

Commit a542bfe

Browse files
committed
refactor(timetable): add stop ID to stop time column headers
1 parent 3f5969c commit a542bfe

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/editor/selectors/timetable.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,18 @@ export const getTimetableColumns = createSelector(
4343
pattern.patternStops.map((ps, index) => {
4444
const stop = stops ? stops.find(st => st.stop_id === ps.stopId) : null
4545
const stopName = stop ? stop.stop_name : ps.stopId
46+
const stopId = stop && stop.stop_code
47+
? stop.stop_code
48+
: stop && stop.stop_id
49+
? stop.stop_id
50+
: ''
4651
const abbreviatedStopName = stop
4752
? getAbbreviatedStopName(stop)
4853
: ps.stopId
4954
const TIME_WIDTH = 80
5055
columns.push({
5156
name: abbreviatedStopName,
52-
title: stopName,
57+
title: `${stopName} (${stopId})`,
5358
width: TIME_WIDTH,
5459
key: `stopTimes.${index}.arrivalTime`,
5560
colSpan: '2',

0 commit comments

Comments
 (0)