fix(schedule-opt): account for registration status in course schedule opt

This commit is contained in:
Sarah Vaupel 2020-11-09 19:00:22 +01:00
parent d8a921f335
commit 42c133d3ed

View File

@ -320,8 +320,8 @@ $# $if NTop (Just 0) < NTop (courseCapacity course)
<dt .deflist__dt>
_{MsgScheduleOptActions}
<dd .deflist__dd>
<a .btn .btn-primary href=@{CourseR tid ssh csh (CScheduleOptSetR (not (maybe userScheduleOccurrenceDisplayDefault (courseScheduleOptOpt . entityVal) mCourseScheduleOpt)))}>
_{bool MsgCourseScheduleOptIn MsgCourseScheduleOptOut (maybe userScheduleOccurrenceDisplayDefault (courseScheduleOptOpt . entityVal) mCourseScheduleOpt)}
<a .btn .btn-primary href=@{CourseR tid ssh csh (CScheduleOptSetR (not (maybe ((is _Just registration) && userScheduleOccurrenceDisplayDefault) (courseScheduleOptOpt . entityVal) mCourseScheduleOpt)))}>
_{bool MsgCourseScheduleOptIn MsgCourseScheduleOptOut (maybe ((is _Just registration) && userScheduleOccurrenceDisplayDefault) (courseScheduleOptOpt . entityVal) mCourseScheduleOpt)}
$if is _Just mCourseScheduleOpt
<a .btn .btn-primary href=@{CourseR tid ssh csh CScheduleOptDelR}>
_{MsgCourseScheduleOptDelete}