Model change: term aware of lecturing times now

This commit is contained in:
SJost 2017-10-08 08:51:22 +02:00
parent 6d1c3bad06
commit e6ee9070ea
2 changed files with 9 additions and 5 deletions

12
models
View File

@ -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

View File

@ -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