From fb960c660357f9cd4dca57be1325e4ecbb50f649 Mon Sep 17 00:00:00 2001 From: stuebinm Date: Tue, 29 Nov 2022 16:38:21 +0100 Subject: controlroom: show tripShortName instead of tripId since the ids really should be internal to the gtfs, and not needed in "normal" contexts. --- lib/GTFS.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/GTFS.hs') diff --git a/lib/GTFS.hs b/lib/GTFS.hs index 1fda897..8ff87db 100644 --- a/lib/GTFS.hs +++ b/lib/GTFS.hs @@ -639,3 +639,8 @@ runsToday :: MonadIO m => GTFS -> TripID -> m Bool runsToday gtfs trip = do today <- liftIO getCurrentTime <&> utctDay pure (runsOnDay gtfs trip today) + +tripName :: Trip a b -> Text +tripName Trip{..} = case tripShortName of + Just name -> name + Nothing -> tripTripID -- cgit v1.2.3