feat(schedule): display tutorial name

This commit is contained in:
Sarah Vaupel 2020-08-20 18:15:54 +02:00
parent 4007122265
commit 6245079465
3 changed files with 9 additions and 6 deletions

View File

@ -84,8 +84,8 @@ weekSchedule uid _weekOffset = do
in scheduleds <> exceptions
tutorialToScheduleEntries :: (Entity Course, Entity Tutorial) -> [ScheduleEntry]
tutorialToScheduleEntries (seCourse@(Entity _ Course{..}), Entity _ Tutorial{tutorialType,tutorialRoom,tutorialTime=Occurrences{..}}) =
let seType = SETTutorial { settType = tutorialType }
tutorialToScheduleEntries (seCourse@(Entity _ Course{..}), Entity _ Tutorial{tutorialType,tutorialName,tutorialRoom,tutorialTime=Occurrences{..}}) =
let seType = SETTutorial { settType = tutorialType, settName = tutorialName }
seRoom = tutorialRoom
scheduleds
-- omit regular occurrences if the course's term is not currently active

View File

@ -16,8 +16,10 @@ data ScheduleEntry = ScheduleEntry
}
data ScheduleEntryType = SETCourseEvent { setceType :: CI Text } -- TODO: CourseEventType not possible here (comes from data family instance)
| SETTutorial { settType :: CI Text } -- TODO: TutorialType not possible here (comes from data family instance)
| SETExamOccurrence { seteoExamName :: ExamName }
| SETTutorial { settType :: CI Text
, settName :: TutorialName
} -- TODO: TutorialType not possible here (comes from data family instance)
| SETExamOccurrence { seteoName :: ExamName }
-- TODO: more?
deriving (Eq, Ord, Show, Read, Generic, Typeable)

View File

@ -26,9 +26,10 @@ $newline never
$of SETCourseEvent{..}
#{CI.original setceType}
$of SETTutorial{..}
#{CI.original settType}
#{settName} #
(#{CI.original settType})
$of SETExamOccurrence{..}
#{seteoExamName}
#{seteoName}
<br>
$maybe room <- seRoom