From e6ee9070ea10cb9740395b31839b6cd4337218e7 Mon Sep 17 00:00:00 2001 From: SJost Date: Sun, 8 Oct 2017 08:51:22 +0200 Subject: [PATCH] Model change: term aware of lecturing times now --- models | 12 +++++++----- src/Handler/Term.hs | 2 ++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/models b/models index 160ea3fea..c03087e76 100644 --- a/models +++ b/models @@ -4,11 +4,13 @@ User matrikelnummer Text UniqueAuthentication plugin ident Term json - name TermIdentifier - start Day - end Day - holidays [Day] - active Bool + name TermIdentifier + start Day + end Day + holidays [Day] + lectureStart Day + lectureEnd Day + active Bool Primary name deriving Show School json diff --git a/src/Handler/Term.hs b/src/Handler/Term.hs index 7dc59513d..44183fbca 100644 --- a/src/Handler/Term.hs +++ b/src/Handler/Term.hs @@ -130,6 +130,8 @@ newTermForm template = <*> areq dayField (bfs ("Erster Tag" :: Text)) (termStart <$> template) <*> areq dayField (set "Letzer Tag") (termEnd <$> template) <*> pure [] -- TODO: List of Day field required, must probably be done as its own form and then combined + <*> areq dayField (bfs ("Beginn Vorlesungen" :: Text)) (termLectureStart <$> template) + <*> areq dayField (set "Ende Vorlesungen") (termLectureEnd <$> template) <*> areq checkBoxField (set "Aktiv") (termActive <$> template) -- <* bootstrapSubmit (bsSubmit "Semester bearbeiten") where set txt = FieldSettings