From ee69c62adc5943a1dbd154df5142c0e726bdd317 Mon Sep 17 00:00:00 2001 From: Ariel Costas Guerrero Date: Fri, 13 Mar 2026 16:49:10 +0100 Subject: feat(routes): add realtime estimates panel with pattern-aware styling - New GET /api/stops/estimates endpoint (nano mode: tripId, patternId, estimate, delay only) - useStopEstimates hook wiring estimates to routes-$id stop panel - Pattern-aware styling: dim schedules and estimates from other patterns - Past scheduled departures shown with strikethrough instead of hidden - Persist selected pattern in URL hash (replace navigation, no history push) - Fix planner arrivals using new estimates endpoint --- .../Queries/ArrivalsAtStop.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/Enmarcha.Sources.OpenTripPlannerGql/Queries') diff --git a/src/Enmarcha.Sources.OpenTripPlannerGql/Queries/ArrivalsAtStop.cs b/src/Enmarcha.Sources.OpenTripPlannerGql/Queries/ArrivalsAtStop.cs index 64e148d..6e89f08 100644 --- a/src/Enmarcha.Sources.OpenTripPlannerGql/Queries/ArrivalsAtStop.cs +++ b/src/Enmarcha.Sources.OpenTripPlannerGql/Queries/ArrivalsAtStop.cs @@ -53,8 +53,12 @@ public class ArrivalsAtStopContent : IGraphRequest }} }} {geometryField} + pattern {{ + id + }} stoptimes {{ stop {{ + gtfsId name lat lon @@ -125,9 +129,16 @@ public class ArrivalsAtStopResponse : AbstractGraphResponse [JsonPropertyName("tripGeometry")] public GeometryDetails? Geometry { get; set; } + [JsonPropertyName("pattern")] public PatternRef? Pattern { get; set; } + [JsonPropertyName("stoptimes")] public List Stoptimes { get; set; } = []; } + public class PatternRef + { + [JsonPropertyName("id")] public required string Id { get; set; } + } + public class GeometryDetails { [JsonPropertyName("points")] public string? Points { get; set; } @@ -141,6 +152,7 @@ public class ArrivalsAtStopResponse : AbstractGraphResponse public class StopDetails { + [JsonPropertyName("gtfsId")] public string? GtfsId { get; set; } [JsonPropertyName("name")] public required string Name { get; set; } [JsonPropertyName("lat")] public double Lat { get; set; } [JsonPropertyName("lon")] public double Lon { get; set; } -- cgit v1.3