diff --git a/assets/tsconfig.json b/assets/tsconfig.json index c7b5d30c7..23ed2fc1f 100644 --- a/assets/tsconfig.json +++ b/assets/tsconfig.json @@ -45,10 +45,10 @@ "moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */, "baseUrl": "./src", /* Base directory to resolve non-absolute module names. */ "paths": { - "Components": ["/components"], - "Hooks": ["/hooks"], - "Util": ["/util"], - "Constants": ["/constants"] + "Components/*": ["components/*"], + "Hooks/*": ["hooks/*"], + "Util/*": ["util/*"], + "Constants/*": ["constants/*"] }, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ // "typeRoots": [], /* List of folders to include type definitions from. */ diff --git a/lib/screens/v2/candidate_generator/widgets/train_crowding.ex b/lib/screens/v2/candidate_generator/widgets/train_crowding.ex index fdcfd1c41..fa9398083 100644 --- a/lib/screens/v2/candidate_generator/widgets/train_crowding.ex +++ b/lib/screens/v2/candidate_generator/widgets/train_crowding.ex @@ -57,6 +57,7 @@ defmodule Screens.V2.CandidateGenerator.Widgets.TrainCrowding do Prediction.vehicle_status(next_train_prediction) == :incoming_at and next_train_prediction |> Prediction.stop_for_vehicle() |> fetch_parent_stop_id_fn.() == train_crowding.station_id and + next_train_prediction.vehicle.carriages != [] and not any_alert_makes_this_a_terminal?(alerts, location_context) do [ %CrowdingWidget{ diff --git a/lib/screens/vehicles/vehicle.ex b/lib/screens/vehicles/vehicle.ex index c3cdfec04..6c64d43a4 100644 --- a/lib/screens/vehicles/vehicle.ex +++ b/lib/screens/vehicles/vehicle.ex @@ -6,6 +6,7 @@ defmodule Screens.Vehicles.Vehicle do current_status: nil, trip_id: nil, stop_id: nil, + parent_stop_id: nil, occupancy_status: nil, carriages: nil @@ -26,6 +27,7 @@ defmodule Screens.Vehicles.Vehicle do current_status: current_status, trip_id: Screens.Trips.Trip.id() | nil, stop_id: Screens.Stops.Stop.id() | nil, + parent_stop_id: Screens.Stops.Stop.id() | nil, occupancy_status: occupancy_status, carriages: list(occupancy_status) | nil }