feat(schedule): display tutorial name
This commit is contained in:
parent
4007122265
commit
6245079465
@ -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
|
||||
|
||||
@ -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)
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user