feat(course): show direct registration dates
This commit is contained in:
parent
d4ab6f64e2
commit
8f284acde8
@ -36,7 +36,8 @@ RegisterTo: Anmeldungen bis
|
||||
DeRegUntil: Abmeldungen bis
|
||||
RegisterRetry: Sie wurden noch nicht angemeldet. Drücken Sie dazu den Knopf "Anmelden"
|
||||
|
||||
CourseRegistrationInterval: Anmeldezeitraum
|
||||
CourseRegistrationInterval: Anmeldung
|
||||
CourseDirectRegistrationInterval: Direkte Anmeldung
|
||||
CourseDeregisterUntil time@Text: Abmeldung nur bis #{time}
|
||||
|
||||
GenericKey: Schlüssel
|
||||
|
||||
@ -90,11 +90,12 @@ getCShowR tid ssh csh = do
|
||||
return (cID, n, visible, files, lastEditText, mayEdit, mayDelete)
|
||||
return (cid,course,schoolName,participants,registration,lecturers,assistants,correctors,tutors,mAllocation,hasApplicationTemplate,mApplication,news)
|
||||
|
||||
mDereg <- traverse (formatTime SelFormatDateTime) $ courseDeregisterUntil course
|
||||
let mDereg' = maybe id min (allocationOverrideDeregister =<< mAllocation) <$> courseDeregisterUntil course
|
||||
mDereg <- traverse (formatTime SelFormatDateTime) mDereg'
|
||||
|
||||
cID <- encrypt cid :: Handler CryptoUUIDCourse
|
||||
mAllocation' <- for mAllocation $ \Allocation{..} -> (,)
|
||||
<$> pure allocationName
|
||||
mAllocation' <- for mAllocation $ \alloc@Allocation{..} -> (,)
|
||||
<$> pure alloc
|
||||
<*> toTextUrl (AllocationR allocationTerm allocationSchool allocationShorthand AShowR :#: cID)
|
||||
regForm <- if
|
||||
| is _Just mbAid -> do
|
||||
|
||||
@ -123,11 +123,22 @@ $# $if NTop (Just 0) < NTop (courseCapacity course)
|
||||
_{MsgCourseParticipantsCountOf participants capacity}
|
||||
$nothing
|
||||
_{MsgCourseParticipantsCount participants}
|
||||
$maybe (name, url) <- mAllocation'
|
||||
$maybe (Allocation{allocationName, allocationRegisterByCourse}, url) <- mAllocation'
|
||||
<dt .deflist__dt>_{MsgCourseAllocation}
|
||||
<dd .deflist__dd>
|
||||
<a href=#{url}>
|
||||
#{name}
|
||||
#{allocationName}
|
||||
$maybe regFrom <- allocationRegisterByCourse
|
||||
$maybe regFrom' <- courseRegisterFrom course
|
||||
$with regFrom'' <- max regFrom regFrom'
|
||||
$if NTop (Just regFrom'') <= NTop (courseRegisterTo course)
|
||||
<dt .deflist__dt>_{MsgCourseDirectRegistrationInterval}
|
||||
<dd .deflist__dd>
|
||||
<p>
|
||||
^{formatTimeRangeW SelFormatDateTime regFrom'' (courseRegisterTo course)}
|
||||
$maybe dereg <- mDereg
|
||||
<p .emph>
|
||||
_{MsgCourseDeregisterUntil dereg}
|
||||
$nothing
|
||||
$maybe regFrom <- courseRegisterFrom course
|
||||
<dt .deflist__dt>_{MsgCourseRegistrationInterval}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user