chore: strikethrough names of ignored occurrences

This commit is contained in:
Wolfgang Witt 2021-03-19 14:17:47 +01:00 committed by Gregor Kleen
parent 25fa6ef0d7
commit 84a50646b0
2 changed files with 7 additions and 1 deletions

View File

@ -243,6 +243,8 @@ postEAutoOccurrenceR tid ssh csh examn = do
, formSubmit = FormNoSubmit
, formAttrs = [("class", "buttongroup")]
}
isIgnored :: ExamOccurrenceId -> Bool
isIgnored occId = maybe False (Set.member occId) $ formResult' calculateRes' ^? _Just . _eaofConfig . _eaocIgnoreRooms . _eaoirIgnored
ExamAutoOccurrenceAcceptForm{..} <- maybe (redirect $ CExamR tid ssh csh examn EUsersR) return calcResult

View File

@ -28,7 +28,11 @@ $newline never
$forall Entity occId ExamOccurrence{ examOccurrenceName, examOccurrenceRoom, examOccurrenceStart, examOccurrenceEnd, examOccurrenceDescription, examOccurrenceCapacity } <- occurrences
<tr .table__row>
<td .table__td>
_{examOccurrenceName}
$if isIgnored occId
<strike>
_{examOccurrenceName}
$else
_{examOccurrenceName}
<td .table__td>
_{loadProp (occLoad occId) examOccurrenceCapacity}
<td .table__td>