Skip to content

Commit

Permalink
Merge pull request #2253 from HSLdevcom/DT-2598
Browse files Browse the repository at this point in the history
DT-2598: Route page's Timetable view is broken
  • Loading branch information
vesameskanen authored Apr 19, 2018
2 parents 0cdb155 + 3edaa5f commit 7d83d18
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/component/RoutePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ class RoutePage extends React.Component {
route={this.props.route}
onSelectChange={this.onPatternChange}
gtfsId={this.props.route.gtfsId}
activeTab={activeTab}
className={cx({
'bp-large': this.context.breakpoint === 'large',
})}
Expand Down
8 changes: 7 additions & 1 deletion app/component/RoutePatternSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class RoutePatternSelect extends Component {
route: PropTypes.object,
onSelectChange: PropTypes.func.isRequired,
serviceDay: PropTypes.string.isRequired,
activeTab: PropTypes.string.isRequired,
relay: PropTypes.object.isRequired,
gtfsId: PropTypes.string.isRequired,
};
Expand Down Expand Up @@ -47,7 +48,12 @@ class RoutePatternSelect extends Component {
o => o.tripsForDate && o.tripsForDate.length > 0,
) !== undefined
? this.props.route.patterns
.filter(o => o.tripsForDate && o.tripsForDate.length > 0)
.filter(
o =>
this.props.activeTab !== 'aikataulu'
? o.tripsForDate && o.tripsForDate.length > 0
: o,
)
.map(pattern => (
<option key={pattern.code} value={pattern.code}>
{pattern.stops[0].name}{pattern.headsign}
Expand Down

0 comments on commit 7d83d18

Please sign in to comment.