chore(daily): add stub for consistency check
This commit is contained in:
parent
6c50758800
commit
8ffa8ef852
@ -98,6 +98,7 @@ MenuLecturerInvite: Funktionäre hinzufügen
|
|||||||
MenuSchoolList: Bereiche
|
MenuSchoolList: Bereiche
|
||||||
MenuSchoolNew: Neuen Bereich anlegen
|
MenuSchoolNew: Neuen Bereich anlegen
|
||||||
MenuSchoolDay ssh@SchoolId d@Text: #{d} #{unSchoolKey ssh} Tagesansicht
|
MenuSchoolDay ssh@SchoolId d@Text: #{d} #{unSchoolKey ssh} Tagesansicht
|
||||||
|
MenuSchoolDayCheck: Konsistenzprüfung
|
||||||
MenuExternalExamGrades: Prüfungsleistungen
|
MenuExternalExamGrades: Prüfungsleistungen
|
||||||
MenuExternalExamUsers: Teilnehmer:innen
|
MenuExternalExamUsers: Teilnehmer:innen
|
||||||
MenuExternalExamEdit: Bearbeiten
|
MenuExternalExamEdit: Bearbeiten
|
||||||
|
|||||||
@ -98,6 +98,7 @@ MenuLecturerInvite: Add functionaries
|
|||||||
MenuSchoolList: Departments
|
MenuSchoolList: Departments
|
||||||
MenuSchoolNew: Create new department
|
MenuSchoolNew: Create new department
|
||||||
MenuSchoolDay ssh d: #{d} #{unSchoolKey ssh} Agenda
|
MenuSchoolDay ssh d: #{d} #{unSchoolKey ssh} Agenda
|
||||||
|
MenuSchoolDayCheck: Consistence check
|
||||||
MenuExternalExamGrades: Exam results
|
MenuExternalExamGrades: Exam results
|
||||||
MenuExternalExamUsers: Participants
|
MenuExternalExamUsers: Participants
|
||||||
MenuExternalExamEdit: Edit
|
MenuExternalExamEdit: Edit
|
||||||
|
|||||||
3
routes
3
routes
@ -1,4 +1,4 @@
|
|||||||
-- SPDX-FileCopyrightText: 2022-2024 Sarah Vaupel <sarah.vaupel@uniworx.de>, Gregor Kleen <gregor.kleen@ifi.lmu.de>, Sarah Vaupel <sarah.vaupel@ifi.lmu.de>, Steffen Jost <jost@tcs.ifi.lmu.de>, Wolfgang Witt <Wolfgang.Witt@campus.lmu.de>, Steffeb Jost <s.jost@fraport.de>
|
-- SPDX-FileCopyrightText: 2022-2024 Sarah Vaupel <sarah.vaupel@uniworx.de>, Gregor Kleen <gregor.kleen@ifi.lmu.de>, Sarah Vaupel <sarah.vaupel@ifi.lmu.de>, Steffen Jost <jost@tcs.ifi.lmu.de>, Wolfgang Witt <Wolfgang.Witt@campus.lmu.de>, Steffen Jost <s.jost@fraport.de>
|
||||||
--
|
--
|
||||||
-- SPDX-License-Identifier: AGPL-3.0-or-later
|
-- SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|
||||||
@ -159,6 +159,7 @@
|
|||||||
/school/#SchoolId SchoolR:
|
/school/#SchoolId SchoolR:
|
||||||
/edit SchoolEditR GET POST
|
/edit SchoolEditR GET POST
|
||||||
/day/#Day SchoolDayR GET POST
|
/day/#Day SchoolDayR GET POST
|
||||||
|
/day/#Day/check SchoolDayCheckR GET
|
||||||
|
|
||||||
/participants ParticipantsListR GET !evaluation
|
/participants ParticipantsListR GET !evaluation
|
||||||
/participants/#TermId/#SchoolId ParticipantsR GET !evaluation
|
/participants/#TermId/#SchoolId ParticipantsR GET !evaluation
|
||||||
|
|||||||
@ -143,7 +143,7 @@ breadcrumb PrintAckR{} = i18nCrumb MsgMenuPrintSend $ Just PrintCenter
|
|||||||
breadcrumb PrintAckDirectR{}= i18nCrumb MsgMenuPrintAck $ Just PrintCenterR
|
breadcrumb PrintAckDirectR{}= i18nCrumb MsgMenuPrintAck $ Just PrintCenterR
|
||||||
breadcrumb PrintLogR = i18nCrumb MsgMenuPrintLog $ Just PrintCenterR
|
breadcrumb PrintLogR = i18nCrumb MsgMenuPrintLog $ Just PrintCenterR
|
||||||
|
|
||||||
breadcrumb SchoolListR = i18nCrumb MsgMenuSchoolList $ Just AdminR
|
breadcrumb SchoolListR = i18nCrumb MsgMenuSchoolList $ Just AdminR
|
||||||
breadcrumb (SchoolR ssh SchoolEditR) =
|
breadcrumb (SchoolR ssh SchoolEditR) =
|
||||||
useRunDB . maybeT (i18nCrumb MsgBreadcrumbSchool $ Just SchoolListR) $ do
|
useRunDB . maybeT (i18nCrumb MsgBreadcrumbSchool $ Just SchoolListR) $ do
|
||||||
School{..} <- MaybeT $ get ssh
|
School{..} <- MaybeT $ get ssh
|
||||||
@ -153,7 +153,9 @@ breadcrumb (SchoolR ssh (SchoolDayR d)) = do
|
|||||||
dt <- formatTime SelFormatDate d
|
dt <- formatTime SelFormatDate d
|
||||||
mr <- getMessageRender
|
mr <- getMessageRender
|
||||||
return (mr $ MsgMenuSchoolDay ssh dt, Just SchoolListR)
|
return (mr $ MsgMenuSchoolDay ssh dt, Just SchoolListR)
|
||||||
breadcrumb SchoolNewR = i18nCrumb MsgMenuSchoolNew $ Just SchoolListR
|
breadcrumb (SchoolR ssh (SchoolDayCheckR d))
|
||||||
|
= i18nCrumb MsgMenuSchoolDayCheck $ Just (SchoolR ssh (SchoolDayR d))
|
||||||
|
breadcrumb SchoolNewR = i18nCrumb MsgMenuSchoolNew $ Just SchoolListR
|
||||||
|
|
||||||
breadcrumb (ExamOfficeR EOExamsR) = i18nCrumb MsgMenuExamOfficeExams Nothing
|
breadcrumb (ExamOfficeR EOExamsR) = i18nCrumb MsgMenuExamOfficeExams Nothing
|
||||||
breadcrumb (ExamOfficeR EOFieldsR) = i18nCrumb MsgMenuExamOfficeFields . Just $ ExamOfficeR EOExamsR
|
breadcrumb (ExamOfficeR EOFieldsR) = i18nCrumb MsgMenuExamOfficeFields . Just $ ExamOfficeR EOExamsR
|
||||||
@ -1201,7 +1203,12 @@ pageActions SchoolListR = return
|
|||||||
, navChildren = []
|
, navChildren = []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
pageActions (SchoolR ssh (SchoolDayR nd)) = return
|
pageActions (SchoolR ssh (SchoolDayR nd)) = return $
|
||||||
|
( NavPageActionPrimary
|
||||||
|
{ navLink = defNavLinkModal MsgMenuSchoolDayCheck $ SchoolR ssh $ SchoolDayCheckR nd
|
||||||
|
, navChildren = []
|
||||||
|
}
|
||||||
|
) :
|
||||||
[ NavPageActionPrimary
|
[ NavPageActionPrimary
|
||||||
{ navLink = defNavLink msg $ SchoolR ssh (SchoolDayR $ addDays n nd)
|
{ navLink = defNavLink msg $ SchoolR ssh (SchoolDayR $ addDays n nd)
|
||||||
, navChildren = []
|
, navChildren = []
|
||||||
|
|||||||
@ -632,7 +632,7 @@ postSchoolDayR ssh nd = do
|
|||||||
(fmap unFormResult -> tableRes, tableDaily) <- runDB $ mkDailyTable isAdmin ssh nd
|
(fmap unFormResult -> tableRes, tableDaily) <- runDB $ mkDailyTable isAdmin ssh nd
|
||||||
-- logInfoS "****DailyTable****" $ tshow tableRes
|
-- logInfoS "****DailyTable****" $ tshow tableRes
|
||||||
formResult tableRes $ \resMap -> do
|
formResult tableRes $ \resMap -> do
|
||||||
tuts <- runDB $ forM (Map.toList resMap) $ \(tpid, DailyFormData{..}) -> do
|
_tuts <- runDB $ forM (Map.toList resMap) $ \(tpid, DailyFormData{..}) -> do
|
||||||
-- logDebugS "TableForm" (tshow dfd)
|
-- logDebugS "TableForm" (tshow dfd)
|
||||||
TutorialParticipant{..} <- get404 tpid -- needed anyway to find the ParticipantDay/UserDay updated
|
TutorialParticipant{..} <- get404 tpid -- needed anyway to find the ParticipantDay/UserDay updated
|
||||||
when ( tutorialParticipantDrivingPermit /= dailyFormDrivingPermit
|
when ( tutorialParticipantDrivingPermit /= dailyFormDrivingPermit
|
||||||
@ -654,10 +654,10 @@ postSchoolDayR ssh nd = do
|
|||||||
then flip upsertBy_ (UserDay tutorialParticipantUser nd dailyFormParkingToken) -- upsert if a permit was issued
|
then flip upsertBy_ (UserDay tutorialParticipantUser nd dailyFormParkingToken) -- upsert if a permit was issued
|
||||||
else updateBy -- only update to no permit, if the record exists, but do not create a fresh record with parkingToken==False
|
else updateBy -- only update to no permit, if the record exists, but do not create a fresh record with parkingToken==False
|
||||||
updateUserDay udUq [ UserDayParkingToken =. dailyFormParkingToken]
|
updateUserDay udUq [ UserDayParkingToken =. dailyFormParkingToken]
|
||||||
return $ tutorialParticipantTutorial
|
return tutorialParticipantTutorial
|
||||||
forM_ tuts $ \tid -> do
|
-- forM_ tuts $ \tid -> do -- TODO reinstate this after test
|
||||||
memcachedByInvalidate (CacheKeySuggsParticipantNote ssh tid) $ Proxy @(OptionListCacheable Text)
|
-- memcachedByInvalidate (CacheKeySuggsParticipantNote ssh tid) $ Proxy @(OptionListCacheable Text)
|
||||||
memcachedByInvalidate (CacheKeySuggsAttendanceNote ssh tid) $ Proxy @(OptionListCacheable Text)
|
-- memcachedByInvalidate (CacheKeySuggsAttendanceNote ssh tid) $ Proxy @(OptionListCacheable Text)
|
||||||
-- audit log? Currently decided against.
|
-- audit log? Currently decided against.
|
||||||
addMessageI Success $ MsgTutorialParticipantsDayEdits dday
|
addMessageI Success $ MsgTutorialParticipantsDayEdits dday
|
||||||
redirect $ SchoolR ssh $ SchoolDayR nd
|
redirect $ SchoolR ssh $ SchoolDayR nd
|
||||||
@ -671,6 +671,9 @@ getSchoolDayCheckR :: SchoolId -> Day -> Handler Html
|
|||||||
getSchoolDayCheckR ssh nd = do
|
getSchoolDayCheckR ssh nd = do
|
||||||
-- isAdmin <- hasReadAccessTo AdminR
|
-- isAdmin <- hasReadAccessTo AdminR
|
||||||
dday <- formatTime SelFormatDate nd
|
dday <- formatTime SelFormatDate nd
|
||||||
siteLayoutMsg (MsgMenuSchoolDay ssh dday) $ do
|
siteLayoutMsg MsgMenuSchoolDayCheck $ do
|
||||||
setTitleI (MsgMenuSchoolDay ssh dday)
|
setTitleI MsgMenuSchoolDayCheck
|
||||||
[whamlet|TODO: this is just a stub.|]
|
[whamlet|
|
||||||
|
TODO: this is just a stub.
|
||||||
|
_{MsgMenuSchoolDay ssh dday}
|
||||||
|
|]
|
||||||
Loading…
Reference in New Issue
Block a user