Skip to content

Commit

Permalink
create available vehicle filter
Browse files Browse the repository at this point in the history
  • Loading branch information
Xuan-1998 committed Aug 24, 2022
1 parent 895a822 commit aa1f7b4
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -389,14 +389,14 @@ trait ChoosesMode {
var availableVehicles = newlyAvailableBeamVehicles.map(_.streetVehicle) :+ bodyStreetVehicle
personData.currentTourMode match {

case Some(BIKE_BASED) => availableVehicles = newlyAvailableBeamVehicles.filterNot(v => BeamVehicle.isSharedTeleportationVehicle(v.id)).map(_.streetVehicle)
case Some(BIKE_BASED) => availableVehicles = newlyAvailableBeamVehicles.filterNot(v => BeamVehicle.isSharedVehicle(v.id)).map(_.streetVehicle) :+ bodyStreetVehicle
case Some(WALK_BASED) => availableVehicles = availableVehicles
case Some(CAR_BASED) => availableVehicles = availableVehicles
case Some(CAR_BASED) => availableVehicles = newlyAvailableBeamVehicles.filterNot(v => BeamVehicle.isSharedVehicle(v.id)).map(_.streetVehicle) :+ bodyStreetVehicle
}

makeRequestWith(
withTransit = availableModesGivenTourMode.exists(_.isTransit),
newlyAvailableBeamVehicles.map(_.streetVehicle) :+ bodyStreetVehicle,
availableVehicles,
possibleEgressVehicles = dummySharedVehicles
)
case Some(WALK) =>
Expand Down

0 comments on commit aa1f7b4

Please sign in to comment.