diff --git a/messages/uniworx/categories/courses/courses/en-eu.msg b/messages/uniworx/categories/courses/courses/en-eu.msg index 9f7835095..d71d9178a 100644 --- a/messages/uniworx/categories/courses/courses/en-eu.msg +++ b/messages/uniworx/categories/courses/courses/en-eu.msg @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: AGPL-3.0-or-later -FilterCourse: Course +FilterCourse: Course type FilterCourseShort: Shorthand FilterTerm: Year FilterCourseSchoolShort: Department diff --git a/messages/uniworx/categories/courses/tutorial/de-de-formal.msg b/messages/uniworx/categories/courses/tutorial/de-de-formal.msg index bb07d57ba..539f014f0 100644 --- a/messages/uniworx/categories/courses/tutorial/de-de-formal.msg +++ b/messages/uniworx/categories/courses/tutorial/de-de-formal.msg @@ -55,5 +55,5 @@ TutorialDrivingPermit: Führerschein TutorialEyeExam: Sehtest TutorialNote: Kursnotiz TutorialDayAttendance day@Text: Anwesenheit #{day} -TutorialDayNote day@Text: Anwesenheitsnotiz für #{day} +TutorialDayNote day@Text: Anwesenheitsnotiz #{day} TutorialParticipantsDayEdits day@Text: Kursteilnehmer-Tagesnotizen aktualisiert für #{day} \ No newline at end of file diff --git a/messages/uniworx/utils/navigation/menu/de-de-formal.msg b/messages/uniworx/utils/navigation/menu/de-de-formal.msg index ae3990d41..f6ab783b9 100644 --- a/messages/uniworx/utils/navigation/menu/de-de-formal.msg +++ b/messages/uniworx/utils/navigation/menu/de-de-formal.msg @@ -97,7 +97,7 @@ MenuExamOfficeUsers: Benutzer:innen MenuLecturerInvite: Funktionäre hinzufügen MenuSchoolList: Bereiche MenuSchoolNew: Neuen Bereich anlegen -MenuSchoolDay ssh@SchoolId d@Text: #{unSchoolKey ssh} #{d} Tagesansicht +MenuSchoolDay ssh@SchoolId d@Text: #{d} #{unSchoolKey ssh} Tagesansicht MenuExternalExamGrades: Prüfungsleistungen MenuExternalExamUsers: Teilnehmer:innen MenuExternalExamEdit: Bearbeiten diff --git a/messages/uniworx/utils/navigation/menu/en-eu.msg b/messages/uniworx/utils/navigation/menu/en-eu.msg index c8775ef4e..594f9c320 100644 --- a/messages/uniworx/utils/navigation/menu/en-eu.msg +++ b/messages/uniworx/utils/navigation/menu/en-eu.msg @@ -97,7 +97,7 @@ MenuExamOfficeUsers: Users MenuLecturerInvite: Add functionaries MenuSchoolList: Departments MenuSchoolNew: Create new department -MenuSchoolDay ssh d: #{unSchoolKey ssh} #{d} Day +MenuSchoolDay ssh d: #{d} #{unSchoolKey ssh} Agenda MenuExternalExamGrades: Exam results MenuExternalExamUsers: Participants MenuExternalExamEdit: Edit diff --git a/messages/uniworx/utils/table_column/de-de-formal.msg b/messages/uniworx/utils/table_column/de-de-formal.msg index ee6890725..6376747a3 100644 --- a/messages/uniworx/utils/table_column/de-de-formal.msg +++ b/messages/uniworx/utils/table_column/de-de-formal.msg @@ -80,7 +80,9 @@ TableCompanyFilter: Firma oder Nummer TableCompanyShort: Firmenkürzel TableCompanies: Firmen TablePrimeCompany: Primäre Firma +TablePrimeCompanyShort: Kürzel primäre Firma TableBookingCompany: Buchende Firma +TableBookingCompanyShort: Kürzel buchende Firma TableCompanyNo: Firmennummer TableCompanyNos: Firmennummern TableCompanyUser: Firmenangehöriger @@ -118,4 +120,4 @@ TableFilterCommaName: Mehrere Namen mit Komma trennen. TableFilterCommaNameNr: Mehrere Namen oder Nummern mit Komma trennen. Nummern werden nur exakt gesucht. TableUserEdit: Benutzer bearbeiten TableRows: Zeilen -TableUserParkingToken: Parkmarke \ No newline at end of file +TableUserParkingToken day@Text: Parkmarke #{day} \ No newline at end of file diff --git a/messages/uniworx/utils/table_column/en-eu.msg b/messages/uniworx/utils/table_column/en-eu.msg index 0ecdd9a0a..b2066a8d7 100644 --- a/messages/uniworx/utils/table_column/en-eu.msg +++ b/messages/uniworx/utils/table_column/en-eu.msg @@ -20,7 +20,7 @@ TableMatrikelNr: AVS person no TableSex: Sex TableBirthday: Birthday TableSchool: Department -TableCourse: Course +TableCourse: Course type TableCourseMembers: Participants TableExamOccurrence: Occurrence/room TableExamName: Name @@ -80,7 +80,9 @@ TableCompanyFilter: Company/Nr TableCompanyShort: Company shorthand TableCompanies: Companies TablePrimeCompany: Primary company +TablePrimeCompanyShort: Primary company shorthand TableBookingCompany: Booking company +TableBookingCompanyShort: Booking company shorthand TableCompanyNo: Company number TableCompanyNos: Company numbers TableCompanyUser: Associate @@ -118,4 +120,4 @@ TableFilterCommaName: Separate names by comma. TableFilterCommaNameNr: Separate names and numbers by comma. Numbers have to match exact. TableUserEdit: Edit user TableRows: Rows -TableUserParkingToken: Parking token \ No newline at end of file +TableUserParkingToken day: Parking token #{day} \ No newline at end of file diff --git a/src/Handler/School/DayTasks.hs b/src/Handler/School/DayTasks.hs index 1fe505234..707208601 100644 --- a/src/Handler/School/DayTasks.hs +++ b/src/Handler/School/DayTasks.hs @@ -191,8 +191,8 @@ queryTutorial :: DailyTableExpr -> E.SqlExpr (Entity Tutorial) queryTutorial = $(sqlMIXproj' ''DailyTableExpr 2) queryParticipant :: DailyTableExpr -> E.SqlExpr (Entity TutorialParticipant) -queryParticipant = $(sqlMIXproj' ''DailyTableExpr 3) -- TODO reify seems problematic for now --- queryParticipant = $(sqlMIXproj DAILY_TABLE_JOIN 3) +queryParticipant = $(sqlMIXproj' ''DailyTableExpr 3) +-- queryParticipant = $(sqlMIXproj DAILY_TABLE_JOIN 3) -- reify seems problematic for now queryUser :: DailyTableExpr -> E.SqlExpr (Entity User) queryUser = $(sqlMIXproj' ''DailyTableExpr 4) @@ -286,7 +286,8 @@ colParticipantEyeExamField' l = sortable (Just "eye-exam") (i18nCell MsgTutorial -- ) colParticipantNoteField :: Colonnade Sortable DailyTableData (DBCell _ (FormResult (DBFormResult TutorialParticipantId DailyFormData DailyTableData))) -colParticipantNoteField = sortable (Just "note-tutorial") (i18nCell MsgTutorialNote) $ (cellAttrs <>~ [("style","width:60%")]) <$> formCell id +colParticipantNoteField = sortable (Just "note-tutorial") (i18nCell MsgTutorialNote) $ -- (cellAttrs <>~ [("style","width:60%")]) <$> + formCell id (views (resultParticipant . _entityKey) return) (\row mkUnique -> let note = row ^. resultParticipant . _entityVal . _tutorialParticipantNote @@ -348,7 +349,7 @@ suggsParticipantNote sid cid tid = do -- $logInfoS "NOTE-SUGGS *** B: " $ tshow ol pure $ mkOptionListFromCacheable ol -suggsAttendanceNote :: SchoolId -> CourseId -> TutorialId -> Handler (OptionList Textarea) +suggsAttendanceNote :: SchoolId -> CourseId -> TutorialId -> Handler (OptionList Text) suggsAttendanceNote sid cid tid = do ol <- $(memcachedByHere) (Just . Right $ 12 * diffSecond) (sid,cid,tid) $ do -- memcached key good enough? suggs <- runDB $ E.select $ do @@ -362,41 +363,39 @@ suggsAttendanceNote sid cid tid = do E.orderBy [E.desc $ tpa E.^. TutorialParticipantDayDay, E.desc countRows'] E.limit maxSuggestions pure (tpa E.^. TutorialParticipantDayNote, E.val (1 :: Int64)) - -- ) `E.unionAll_` - -- ( do - -- (tpa :& tut) <- E.from $ E.table @TutorialParticipantDay - -- `E.innerJoin` E.table @Tutorial - -- `E.on` (\(tpa :& tut) -> tut E.^. TutorialId E.==. tpa E.^. TutorialParticipantDayTutorial) - -- E.where_ $ E.isJust (tpa E.^. TutorialParticipantDayNote) - -- E.&&. tpa E.^. TutorialParticipantDayTutorial E.!=. E.val tid - -- E.&&. tut E.^. TutorialCourse E.==. E.val cid - -- E.groupBy (tut E.^. TutorialLastChanged, tpa E.^. TutorialParticipantDayNote) - -- E.orderBy [E.desc $ tut E.^. TutorialLastChanged, E.desc $ tpa E.^. TutorialParticipantDayDay, E.desc countRows'] - -- E.limit maxSuggestions - -- pure (tpa E.^. TutorialParticipantDayNote, E.val 2) - -- ) `E.unionAll_` - -- ( do - -- tpa :& tut :& crs <- E.from $ E.table @TutorialParticipantDay - -- `E.innerJoin` E.table @Tutorial - -- `E.on` (\(tpa :& tut) -> tut E.^. TutorialId E.==. tpa E.^. TutorialParticipantDayTutorial) - -- `E.innerJoin` E.table @Course - -- `E.on` (\(_ :& tut :& crs) -> tut E.^. TutorialCourse E.==. crs E.^. CourseId) - -- E.where_ $ E.isJust (tpa E.^. TutorialParticipantDayNote) - -- E.&&. tpa E.^. TutorialParticipantDayTutorial E.!=. E.val tid - -- E.&&. tut E.^. TutorialCourse E.!=. E.val cid - -- E.&&. crs E.^. CourseSchool E.==. E.val sid - -- E.groupBy (tut E.^. TutorialLastChanged, tpa E.^. TutorialParticipantDayNote) - -- E.orderBy [E.desc $ tut E.^. TutorialLastChanged, E.desc countRows'] - -- E.limit maxSuggestions - -- pure (tpa E.^. TutorialParticipantDayNote, E.val 3) + ) `E.unionAll_` + ( do + (tpa :& tut) <- E.from $ E.table @TutorialParticipantDay + `E.innerJoin` E.table @Tutorial + `E.on` (\(tpa :& tut) -> tut E.^. TutorialId E.==. tpa E.^. TutorialParticipantDayTutorial) + E.where_ $ E.isJust (tpa E.^. TutorialParticipantDayNote) + E.&&. tpa E.^. TutorialParticipantDayTutorial E.!=. E.val tid + E.&&. tut E.^. TutorialCourse E.==. E.val cid + E.groupBy (tpa E.^. TutorialParticipantDayNote, tpa E.^. TutorialParticipantDayDay, tut E.^. TutorialLastChanged) + E.orderBy [E.desc $ tpa E.^. TutorialParticipantDayDay, E.desc $ tut E.^. TutorialLastChanged, E.desc countRows'] + E.limit maxSuggestions + pure (tpa E.^. TutorialParticipantDayNote, E.val 2) + ) `E.unionAll_` + ( do + tpa :& tut :& crs <- E.from $ E.table @TutorialParticipantDay + `E.innerJoin` E.table @Tutorial + `E.on` (\(tpa :& tut) -> tut E.^. TutorialId E.==. tpa E.^. TutorialParticipantDayTutorial) + `E.innerJoin` E.table @Course + `E.on` (\(_ :& tut :& crs) -> tut E.^. TutorialCourse E.==. crs E.^. CourseId) + E.where_ $ E.isJust (tpa E.^. TutorialParticipantDayNote) + E.&&. tpa E.^. TutorialParticipantDayTutorial E.!=. E.val tid + E.&&. tut E.^. TutorialCourse E.!=. E.val cid + E.&&. crs E.^. CourseSchool E.==. E.val sid + E.groupBy (tpa E.^. TutorialParticipantDayNote, tpa E.^. TutorialParticipantDayDay, tut E.^. TutorialLastChanged) + E.orderBy [E.desc $ tpa E.^. TutorialParticipantDayDay, E.desc $ tut E.^. TutorialLastChanged, E.desc countRows'] + E.limit maxSuggestions + pure (tpa E.^. TutorialParticipantDayNote, E.val 3) ) E.groupBy (tpn, prio) E.orderBy [E.asc prio, E.asc tpn] E.limit maxSuggestions pure $ E.coalesceDefault [tpn] $ E.val "" -- default never used due to where_ condtions, but conveniently changes type - -- $logInfoS "NOTE-SUGGS *** A: " $ tshow suggs - pure $ mkOptionListCacheable $ fmap Textarea . mkOptionText <$> nubOrd suggs -- TODO: datalist does not work on textarea inputs! - -- $logInfoS "NOTE-SUGGS *** B: " $ tshow ol + pure $ mkOptionListCacheable $ mkOptionText <$> nubOrd suggs -- NOTE: datalist does not work on textarea inputs pure $ mkOptionListFromCacheable ol @@ -416,16 +415,18 @@ colAttendanceNoteField dday = sortable (Just "note-attend") (i18nCell $ MsgTutor sid = row ^. resultCourse . _entityVal . _courseSchool cid = row ^. resultCourse . _entityKey tid = row ^. resultTutorial . _entityKey - in over (_1.mapped) ((_dailyFormAttendanceNote .~) . assertM (not . null) . fmap (Text.strip . unTextarea)) . over _2 fvWidget <$> - mopt (textareaField & addDatalist (suggsAttendanceNote sid cid tid)) -- TODO: datalist does not work on textarea inputs! - (fsUniq mkUnique "note-attendance" & addClass' "uwx-short" - -- & addAttr "rows" "2" -- does not work without class uwx-short - -- & addAttr "cols" "12" -- let it stretch - -- & addAutosubmit -- submits while typing - ) (Textarea <<$>> note) + in over (_1.mapped) ((_dailyFormAttendanceNote .~) . assertM (not . null) . fmap Text.strip) . over _2 fvWidget <$> -- For Textarea use: fmap (Text.strip . unTextarea) + mopt (textField & cfStrip & addDatalist (suggsAttendanceNote sid cid tid)) (fsUniq mkUnique "note-attendance") note + ---- Version für Textare + -- mopt (textareaField) -- & addDatalist (suggsAttendanceNote sid cid tid)) -- NOTE: datalist does not work on textarea inputs + -- (fsUniq mkUnique "note-attendance" & addClass' "uwx-short" + -- -- & addAttr "rows" "2" -- does not work without class uwx-short + -- -- & addAttr "cols" "12" -- let it stretch + -- -- & addAutosubmit -- submits while typing + -- ) (Textarea <<$>> note) ) -colParkingField :: Colonnade Sortable DailyTableData (DBCell _ (FormResult (DBFormResult TutorialParticipantId DailyFormData DailyTableData))) +colParkingField :: Text -> Colonnade Sortable DailyTableData (DBCell _ (FormResult (DBFormResult TutorialParticipantId DailyFormData DailyTableData))) colParkingField = colParkingField' _dailyFormParkingToken -- colParkingField' :: ASetter' a Bool -> Colonnade Sortable DailyTableData (DBCell _ (FormResult (DBFormResult TutorialParticipantId a DailyTableData))) @@ -435,18 +436,18 @@ colParkingField = colParkingField' _dailyFormParkingToken -- over (_1.mapped) (l .~) . over _2 fvWidget <$> mreq checkBoxField (fsUniq mkUnique "parktoken") parking -- ) -colParkingField' :: ASetter' a Bool -> Colonnade Sortable DailyTableData (DBCell _ (FormResult (DBFormResult TutorialParticipantId a DailyTableData))) -colParkingField' l = sortable (Just "parking") (i18nCell MsgTableUserParkingToken) $ (cellAttrs %~ addAttrsClass "text--center") <$> formCell +colParkingField' :: ASetter' a Bool -> Text -> Colonnade Sortable DailyTableData (DBCell _ (FormResult (DBFormResult TutorialParticipantId a DailyTableData))) +colParkingField' l dday = sortable (Just "parking") (i18nCell $ MsgTableUserParkingToken dday) $ (cellAttrs %~ addAttrsClass "text--center") <$> formCell id -- TODO: this should not be id! Refactor to simplify the thrid argument below (views (resultParticipant . _entityKey) return) (\(preview (resultUserDay . _userDayParkingToken) -> parking) mkUnique -> over (_1.mapped) (l .~) . over _2 fvWidget <$> mreq checkBoxField (fsUniq mkUnique "parktoken") parking ) -mkDailyTable :: Bool -> SchoolId -> Day -> DB (FormResult (DBFormResult TutorialParticipantId DailyFormData DailyTableData), Widget) +mkDailyTable :: Bool -> SchoolId -> Day -> DB (FormResult (DBFormResult TutorialParticipantId DailyFormData DailyTableData), Maybe Widget) mkDailyTable isAdmin ssh nd = getDayTutorials' ssh (nd,nd) >>= \case tutLessons - | Map.null tutLessons -> return (FormMissing, [whamlet|No tutorials on this day|]) + | Map.null tutLessons -> return (FormMissing, Nothing) | otherwise -> do dday <- formatTime SelFormatDate nd let @@ -473,7 +474,7 @@ mkDailyTable isAdmin ssh nd = getDayTutorials' ssh (nd,nd) >>= \case dbtProj = dbtProjId dbtColonnade = formColonnade $ mconcat [ -- dbSelect (applying _2) id (return . view (resultTutorial . _entityKey)) - sortable (Just "course") (i18nCell MsgFilterCourse) $ \(view $ resultCourse . _entityVal -> c) -> courseCell c + sortable (Just "course") (i18nCell MsgTableCourse) $ \(view $ resultCourse . _entityVal -> c) -> courseCell c , sortable (Just "tutorial") (i18nCell MsgCourseTutorial) $ \row -> let Course{courseTerm=tid, courseSchool=cssh, courseShorthand=csh} = row ^. resultCourse . _entityVal @@ -486,8 +487,8 @@ mkDailyTable isAdmin ssh nd = getDayTutorials' ssh (nd,nd) >>= \case -- , sortable Nothing (i18nCell MsgTableTutorialRoom) $ \(view $ resultTutorial . _entityKey -> _) -> listCell ["A","D","C","B"] textCell -- DEMO: listCell reverses the order, for list-types! listInlineCell is fixed now , sortable Nothing (i18nCell $ MsgCourseQualifications 3) $ \(preview resultCourseQualis -> cqs) -> maybeCell cqs $ flip listInlineCell qualificationIdShortCell -- , sortable (Just "user-company") (i18nCell MsgTablePrimeCompany) $ \(preview resultCompanyId -> mcid) -> cellMaybe companyIdCell mcid - -- , sortable (Just "booking-company") (i18nCell MsgTableBookingCompany) $ \(view $ resultParticipant . _entityVal . _tutorialParticipantCompany -> mcid) -> cellMaybe companyIdCell mcid - , sortable (Just "booking-company") (i18nCell MsgTableBookingCompany) $ \row -> + -- , sortable (Just "booking-firm") (i18nCell MsgTableBookingCompany) $ \(view $ resultParticipant . _entityVal . _tutorialParticipantCompany -> mcid) -> cellMaybe companyIdCell mcid + , sortable (Just "booking-firm") (i18nCell MsgTableBookingCompany) $ \row -> let bookComp = row ^. resultParticipant . _entityVal . _tutorialParticipantCompany primComp = row ^? resultCompanyId bookLink = cellMaybe companyIdCell bookComp @@ -500,7 +501,7 @@ mkDailyTable isAdmin ssh nd = getDayTutorials' ssh (nd,nd) >>= \case (Just IconCompanyWarning) True) | otherwise = bookLink in result - -- , sortable (Just "booking-company") (i18nCell MsgTableBookingCompany) $ \row -> + -- , sortable (Just "booking-firm") (i18nCell MsgTableBookingCompany) $ \row -> -- let bookComp = row ^. resultParticipant . _entityVal . _tutorialParticipantCompany -- primComp = row ^? resultCompanyId -- bookLink = cellMaybe companyIdCell bookComp @@ -510,7 +511,7 @@ mkDailyTable isAdmin ssh nd = getDayTutorials' ssh (nd,nd) >>= \case -- , Just (unCompanyKey -> csh) <- primComp -- = bookLink -- <> spacerCell - -- <> cell (modal (warnIcon csh) (Right -- TODO: use iconCompanyWarning instead! + -- <> cell (modal (warnIcon csh) (Right -- maybe just use iconCompanyWarning instead of modal? -- [whamlet| --

-- ^{userWidget row} @@ -528,8 +529,8 @@ mkDailyTable isAdmin ssh nd = getDayTutorials' ssh (nd,nd) >>= \case , colParticipantNoteField , colAttendanceField dday , colAttendanceNoteField dday - , colParkingField - -- FOR DEBUGGING ONLY + , colParkingField dday + -- FOR DEBUGGING ONLY: -- , sortable (Just "permit") (i18nCell MsgTutorialDrivingPermit) $ \(view $ resultParticipant . _entityVal . _tutorialParticipantDrivingPermit -> x) -> x & cellMaybe i18nCell -- , sortable (Just "eye-exam") (i18nCell MsgTutorialEyeExam) $ \(view $ resultParticipant . _entityVal . _tutorialParticipantEyeExam -> x) -> x & cellMaybe i18nCell -- , sortable (Just "note-tutorial") (i18nCell MsgTutorialNote) $ \(view $ resultParticipant . _entityVal . _tutorialParticipantNote -> x) -> x & cellMaybe textCell @@ -543,7 +544,7 @@ mkDailyTable isAdmin ssh nd = getDayTutorials' ssh (nd,nd) >>= \case , ("course" , SortColumn $ queryCourse >>> (E.^. CourseName)) , ("tutorial" , SortColumn $ queryTutorial >>> (E.^. TutorialName)) , ("user-company" , SortColumn $ queryUser >>> selectCompanyUserPrime) - , ("booking-company", SortColumn $ queryParticipant >>> (E.^. TutorialParticipantCompany)) + , ("booking-firm" , SortColumn $ queryParticipant >>> (E.^. TutorialParticipantCompany)) , ("card-no" , SortColumn $ queryUserAvs >>> (E.?. UserAvsLastCardNo)) , ("permit" , SortColumnNullsInv $ queryParticipant >>> (E.^. TutorialParticipantDrivingPermit)) , ("eye-exam" , SortColumnNullsInv $ queryParticipant >>> (E.^. TutorialParticipantEyeExam)) @@ -557,12 +558,14 @@ mkDailyTable isAdmin ssh nd = getDayTutorials' ssh (nd,nd) >>= \case , fltrUserMatriclenr queryUser , ("course" , FilterColumn . E.mkContainsFilter $ queryCourse >>> (E.^. CourseName)) , ("tutorial" , FilterColumn . E.mkContainsFilter $ queryTutorial >>> (E.^. TutorialName)) - , ("user-company" , FilterColumn . E.mkContainsFilter $ queryUser >>> selectCompanyUserPrime) + , ("booking-firm" , FilterColumn . E.mkContainsFilterWith Just $ queryParticipant >>> (E.^. TutorialParticipantCompany)) + , ("user-company" , FilterColumn . E.mkContainsFilterWith Just $ queryUser >>> selectCompanyUserPrime) ] dbtFilterUI mPrev = mconcat [ prismAForm (singletonFilter "course" . maybePrism _PathPiece) mPrev $ aopt (hoistField lift textField) (fslI MsgFilterCourse) , prismAForm (singletonFilter "tutorial" . maybePrism _PathPiece) mPrev $ aopt (hoistField lift textField) (fslI MsgCourseTutorial) - , prismAForm (singletonFilter "user-company" . maybePrism _PathPiece) mPrev $ aopt (hoistField lift textField) (fslI MsgTablePrimeCompany) + , prismAForm (singletonFilter "booking-firm" . maybePrism _PathPiece) mPrev $ aopt (hoistField lift textField) (fslI MsgTableBookingCompanyShort) + , prismAForm (singletonFilter "user-company" . maybePrism _PathPiece) mPrev $ aopt (hoistField lift textField) (fslI MsgTablePrimeCompanyShort) , fltrUserNameEmailUI mPrev , fltrUserMatriclenrUI mPrev ] @@ -605,7 +608,7 @@ mkDailyTable isAdmin ssh nd = getDayTutorials' ssh (nd,nd) >>= \case -- return (act, jobSet) psValidator = def & defaultSorting [SortAscBy "user-name", SortAscBy "course", SortAscBy "tutorial"] -- over _1 postprocess <$> dbTable psValidator DBTable{..} - dbTable psValidator DBTable{..} + (over _2 Just) <$> dbTable psValidator DBTable{..} getSchoolDayR, postSchoolDayR :: SchoolId -> Day -> Handler Html @@ -622,12 +625,12 @@ postSchoolDayR ssh nd = do , dailyFormAttendanceNote = row ^? resultParticipantDay ._tutorialParticipantDayNote . _Just , dailyFormParkingToken = row ^? resultUserDay . _userDayParkingToken & fromMaybe False } - (fmap unFormResult -> tableRes,tableDaily) <- runDB $ mkDailyTable isAdmin ssh nd - $logInfoS "****DailyTable****" $ tshow tableRes + (fmap unFormResult -> tableRes, tableDaily) <- runDB $ mkDailyTable isAdmin ssh nd + -- logInfoS "****DailyTable****" $ tshow tableRes formResult tableRes $ \resMap -> do runDB $ do 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 when ( tutorialParticipantDrivingPermit /= dailyFormDrivingPermit || tutorialParticipantEyeExam /= dailyFormEyeExam @@ -654,6 +657,5 @@ postSchoolDayR ssh nd = do siteLayoutMsg (MsgMenuSchoolDay ssh dday) $ do setTitleI (MsgMenuSchoolDay ssh dday) - [whamlet|TODO Overview School #{ciOriginal (unSchoolKey ssh)} - ^{tableDaily} - |] + $(i18nWidgetFile "day-view") + diff --git a/templates/i18n/day-view/de-de-formal.hamlet b/templates/i18n/day-view/de-de-formal.hamlet new file mode 100644 index 000000000..ce8f630c5 --- /dev/null +++ b/templates/i18n/day-view/de-de-formal.hamlet @@ -0,0 +1,29 @@ +$newline never + +$# SPDX-FileCopyrightText: 2024 Steffen Jost +$# +$# SPDX-License-Identifier: AGPL-3.0-or-later + +$maybe tbl <- tableDaily +
+ ^{tbl} +
+

Hinweise zu den Formularspalten +
+
+ _{MsgTutorialDrivingPermit}, _{MsgTutorialEyeExam}, _{MsgTutorialNote} +
+ Pro Kurs und Teilnehmer wird je ein Wert gespeichert. +
+ _{MsgTutorialDayAttendance mempty}, _{MsgTutorialDayNote mempty} +
+ Pro Tag, Kurs und Teilnehmer wird je ein Wert gespeichert. +
+ _{MsgTableUserParkingToken mempty} +
+ Pro Tag und Teilnehmer wird ein Wert gespeichert, d.h. unabhängig vom Kurs. + \ Daraus folgt, dass die Parkmarke immer in allen Zeilen des gleichen Teilnehmers geändert werden muss. +$nothing +
+ An diesem Tag sind zur Zeit keine Kurse eingetragen. + diff --git a/templates/i18n/day-view/en-eu.hamlet b/templates/i18n/day-view/en-eu.hamlet new file mode 100644 index 000000000..603b66abc --- /dev/null +++ b/templates/i18n/day-view/en-eu.hamlet @@ -0,0 +1,29 @@ +$newline never + +$# SPDX-FileCopyrightText: 2024 Steffen Jost +$# +$# SPDX-License-Identifier: AGPL-3.0-or-later + +$maybe tbl <- tableDaily +
+ ^{tbl} +
+

Note how form data is saved +
+
+ _{MsgTutorialDrivingPermit}, _{MsgTutorialEyeExam}, _{MsgTutorialNote} +
+ For each course and participant pairing, one value is stored each. +
+ _{MsgTutorialDayAttendance mempty}, _{MsgTutorialDayNote mempty} +
+ For each day, course and participant, one value is stored each. +
+ _{MsgTableUserParkingToken mempty} +
+ For each day and participant, one value is stored, i.e., indipendant of the course. + \ This requires that a change is performed in all rows of the same participant. +$nothing +
+ No courses are currently scheduled on this day. + diff --git a/templates/i18n/profile-remarks/de-de-formal.hamlet b/templates/i18n/profile-remarks/de-de-formal.hamlet index 443df86aa..e830163e8 100644 --- a/templates/i18n/profile-remarks/de-de-formal.hamlet +++ b/templates/i18n/profile-remarks/de-de-formal.hamlet @@ -11,6 +11,8 @@ $# SPDX-License-Identifier: AGPL-3.0-or-later Nicht aufgeführt sind Zeitstempel mit Benutzerinformationen, z.B. bei der Editierung und Korrektur von Übungen, Kursleiterschaft, Raumbuchungen, etc.
  • Nicht aufgeführt sind die an diesen Benutzer versendeten Benachrichtigungen per E-Mail oder Briefpost. +
  • + Nicht aufgeführt sind personenbezogene Vermerke, z.B. über Anwesenheit, Erhalt von Parkmarken, etc.
  • Sie können die diff --git a/templates/i18n/profile-remarks/en-eu.hamlet b/templates/i18n/profile-remarks/en-eu.hamlet index ee749f36c..c7cc41aef 100644 --- a/templates/i18n/profile-remarks/en-eu.hamlet +++ b/templates/i18n/profile-remarks/en-eu.hamlet @@ -11,6 +11,8 @@ $# SPDX-License-Identifier: AGPL-3.0-or-later Timestamps with user information (e.g. editing of corrections, submission groups, rooms, ...) are not shown here.

  • Sent notifications by email or letter are not shown here. +
  • + Some personal notes (e.g. about attendance, receipt of parking permits, ...) are not shown here."
  • You can request your data be deleted by opening