aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorstuebinm2024-05-15 01:55:17 +0200
committerstuebinm2024-05-15 01:56:55 +0200
commitf7b461e244b825b443eee429bbafa8797d7dc56c (patch)
tree3ce4886790dcf7082dd67aafaac9ad7855702e48 /lib
parent92a302caa945f48e798aa4e053373d1b8bfc2cfb (diff)
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.
Diffstat (limited to 'lib')
-rw-r--r--lib/Server/Frontend/Tickets.hs5
1 files changed, 5 insertions, 0 deletions
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
+ <section>
+ ^{spaceTime}
<section>
<h2>_{MsgAnnouncements}
<ul>