Skip to content

Commit

Permalink
fix: show Massport routes in trip planner result
Browse files Browse the repository at this point in the history
  • Loading branch information
thecristen committed Apr 30, 2024
1 parent 4920fe6 commit 8e5ce22
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/dotcom_web/views/helpers.ex
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ defmodule DotcomWeb.ViewHelpers do
def mode_name(type) when type in ["2272", "983", :massport_shuttle],
do: "Massport Shuttle"

def mode_name("Massport-" <> _route), do: "Massport Shuttle"
def mode_name("Massport" <> _route), do: "Massport Shuttle"

def mode_name(:access), do: "Access"
def mode_name(:the_ride), do: "The Ride"
Expand Down
4 changes: 2 additions & 2 deletions lib/routes/route.ex
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ defmodule Routes.Route do
def type_atom("2274"), do: :logan_express
def type_atom("983"), do: :massport_shuttle
def type_atom("2272"), do: :massport_shuttle
def type_atom("Massport-" <> _), do: :massport_shuttle
def type_atom("Massport" <> _), do: :massport_shuttle
def type_atom("the_ride"), do: :the_ride

@spec types_for_mode(gtfs_route_type | subway_lines_type) :: [0..4]
Expand Down Expand Up @@ -110,7 +110,7 @@ defmodule Routes.Route do
def icon_atom(%__MODULE__{id: "Green-C"}), do: :green_line_c
def icon_atom(%__MODULE__{id: "Green-D"}), do: :green_line_d
def icon_atom(%__MODULE__{id: "Green-E"}), do: :green_line_e
def icon_atom(%__MODULE__{id: "Massport-" <> _}), do: :massport_shuttle
def icon_atom(%__MODULE__{id: "Massport" <> _}), do: :massport_shuttle

for silver_line_route <- @silver_line do
def icon_atom(%__MODULE__{id: unquote(silver_line_route)}), do: unquote(:silver_line)
Expand Down

0 comments on commit 8e5ce22

Please sign in to comment.