Commit 8b332f6 1 parent 1af6295 commit 8b332f6 Copy full SHA for 8b332f6
File tree 1 file changed +2
-11
lines changed
front/src/modules/trainschedule/components/ImportTrainSchedule
1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -176,10 +176,7 @@ const ImportTrainScheduleConfig = ({
176
176
const isLastOcp = ocpTT === ocpTTs . at ( - 1 ) ;
177
177
const ocpType = ocpTT . getAttribute ( 'ocpType' ) ;
178
178
let departureTime = times ?. getAttribute ( 'departure' ) || '' ;
179
- let arrivalTime =
180
- ocpType === 'pass'
181
- ? times ?. getAttribute ( 'departure' ) || ''
182
- : times ?. getAttribute ( 'arrival' ) || '' ;
179
+ let arrivalTime = ocpType === 'pass' ? departureTime : times ?. getAttribute ( 'arrival' ) || '' ;
183
180
arrivalTime = cleanTimeFormat ( arrivalTime ) ;
184
181
departureTime = cleanTimeFormat ( departureTime ) ;
185
182
@@ -210,14 +207,8 @@ const ImportTrainScheduleConfig = ({
210
207
stopFor = 0 ;
211
208
}
212
209
} else if ( ocpType === 'pass' ) {
213
- if ( arrivalTime && departureTime && arrivalTime !== departureTime ) {
214
- // Incorrect data, it shouldn't happen on a ocpType pass, skip step
215
- return null ;
216
- }
217
210
if ( isLastOcp ) {
218
211
stopFor = 0 ;
219
- } else {
220
- stopFor = undefined ;
221
212
}
222
213
}
223
214
@@ -228,7 +219,7 @@ const ImportTrainScheduleConfig = ({
228
219
name : ocpRef ,
229
220
arrivalTime : formattedArrivalTime ,
230
221
departureTime : formattedDepartureTime ,
231
- duration : stopFor || undefined ,
222
+ duration : stopFor ,
232
223
} as Step ;
233
224
} )
234
225
. filter ( ( step ) : step is Step => step !== null ) ;
You can’t perform that action at this time.
0 commit comments