Skip to content

Commit

Permalink
allow stop times with same times for flex
Browse files Browse the repository at this point in the history
  • Loading branch information
miles-grant-ibigroup committed Feb 16, 2024
1 parent facb8cc commit 0d9c956
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/editor/selectors/timetable.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ const isCellValueInvalid = (
tripIds: Array<string>
): ?EditorValidationIssue => {
const col = columns[colIndex]
const isFlexInvolved = columns.some(isFlexStopTime)

if (isTimeFormat(col.type)) {
// FIXME: This does not yet support validating frequency start/end times.
Expand All @@ -176,7 +177,7 @@ const isCellValueInvalid = (
// Ensure value is increasing over previous value
// Flexible stop times (because intra zonal trips are represented by a duplicate stop time) can
// include the same start and end pickup times back to back and so must avoid this check.
const isInvalid = !isFlexStopTime(col) && val < previousValue
const isInvalid = !isFlexInvolved && val < previousValue
return isInvalid
? {
field: col.key,
Expand Down

0 comments on commit 0d9c956

Please sign in to comment.