Skip to content

Commit

Permalink
fix(TimetableEditor): Add continuousPickup and Dropoff values to Stop…
Browse files Browse the repository at this point in the history
…Times object
  • Loading branch information
philip-cline committed Feb 4, 2022
1 parent 3d35a98 commit 380ff1e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/editor/components/timetable/TimetableEditor.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
// @flow

import {camelCaseKeys} from '../../../common/util/map-keys'
import clone from 'lodash/cloneDeep'
import objectPath from 'object-path'
import React, {Component} from 'react'
import {Button} from 'react-bootstrap'

import {camelCaseKeys} from '../../../common/util/map-keys'
import * as activeActions from '../../actions/active'
import * as tripActions from '../../actions/trip'
import {ENTITY} from '../../constants'
import {generateNullProps} from '../../util/gtfs'
import {entityIsNew} from '../../util/objects'
import {isTimeFormat} from '../../util/timetable'
import Timetable from './Timetable'
import TimetableHeader from './TimetableHeader'
import TimetableHelpModal from './TimetableHelpModal'

import type {Props as ContainerProps} from '../../containers/ActiveTimetableEditor'
import type {Feed, FetchStatus, Pattern, StopTime, TimetableColumn, Trip, TripCounts} from '../../../types'
import type {TripValidationIssues} from '../../selectors/timetable'
import type {EditorTables, TimetableState} from '../../../types/reducers'

import TimetableHelpModal from './TimetableHelpModal'
import TimetableHeader from './TimetableHeader'
import Timetable from './Timetable'

type Props = ContainerProps & {
activeCell?: ?string,
activePattern: Pattern,
Expand Down Expand Up @@ -192,6 +192,8 @@ export default class TimetableEditor extends Component<Props, State> {
cumulativeTravelTime += +stop.defaultDwellTime
// if (stop.timepoint === null || stop.timepoint) {
objectPath.set(newRow, `stopTimes.${i}.departureTime`, cumulativeTravelTime)
objectPath.set(newRow, `stopTimes.${i}.continuousPickup`, stop.continuousPickup)
objectPath.set(newRow, `stopTimes.${i}.continuousDropOff`, stop.continuousDropOff)
objectPath.set(newRow, `stopTimes.${i}.timepoint`, stop.timepoint || 0)
objectPath.set(newRow, `stopTimes.${i}.shapeDistTraveled`, stop.shapeDistTraveled)
// Use pattern stop index to set stop sequence. Stop sequences should all
Expand Down

0 comments on commit 380ff1e

Please # to comment.