From f7b461e244b825b443eee429bbafa8797d7dc56c Mon Sep 17 00:00:00 2001 From: stuebinm Date: Wed, 15 May 2024 01:55:17 +0200 Subject: Frontend.Tickets: add a space-time diagram in ticket view not sure if i'll keep it here — it should probably gain some logic for real-time udpates and be moved to the map view instead. --- lib/Server/Frontend/Tickets.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib') diff --git a/lib/Server/Frontend/Tickets.hs b/lib/Server/Frontend/Tickets.hs index c3de1a1..1f4ad3f 100644 --- a/lib/Server/Frontend/Tickets.hs +++ b/lib/Server/Frontend/Tickets.hs @@ -199,6 +199,8 @@ getTicketViewR ticketId = do anchors <- runDB $ selectList [ TrainAnchorTicket ==. ticketKey ] [] <&> nonEmpty . fmap entityVal + spaceTimeMaybe <- mkSpaceTimeDiagramHandler 2 ticketDay [ TicketId ==. coerce ticketId ] + (widget, enctype) <- generateFormPost (announceForm ticketId) nowSeconds <- secondsNow ticketDay @@ -233,6 +235,9 @@ getTicketViewR ticketId = do $maybe history <- anchors $maybe delay <- guessDelay history (int2Double stopSequence) \ (#{delay}) +$maybe spaceTime <- spaceTimeMaybe +
+ ^{spaceTime}

_{MsgAnnouncements}
    -- cgit v1.2.3