aboutsummaryrefslogtreecommitdiff
path: root/src/Enmarcha.Sources.OpenTripPlannerGql/Queries/ArrivalsAtStop.cs
diff options
context:
space:
mode:
authorAriel Costas Guerrero <ariel@costas.dev>2026-03-13 16:49:10 +0100
committerAriel Costas Guerrero <ariel@costas.dev>2026-03-13 16:49:30 +0100
commitee69c62adc5943a1dbd154df5142c0e726bdd317 (patch)
tree5874249173aa249d4d497733ef9fc410e64ab664 /src/Enmarcha.Sources.OpenTripPlannerGql/Queries/ArrivalsAtStop.cs
parent90ad5395f6310da86fee9a29503e58ea74f3078b (diff)
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
Diffstat (limited to 'src/Enmarcha.Sources.OpenTripPlannerGql/Queries/ArrivalsAtStop.cs')
-rw-r--r--src/Enmarcha.Sources.OpenTripPlannerGql/Queries/ArrivalsAtStop.cs12
1 files changed, 12 insertions, 0 deletions
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<ArrivalsAtStopContent.Args>
}}
}}
{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<StoptimeDetails> 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; }