From f0170f077430ff03c76cb8b2706e435a6c9c34f5 Mon Sep 17 00:00:00 2001 From: Steffen Jost Date: Fri, 27 Jan 2023 15:57:48 +0100 Subject: [PATCH] chore(qualifications): provide separate route for lms and qualifciations --- routes | 15 ++++++++------- src/Foundation/Navigation.hs | 14 +++++++++++++- src/Utils/Icon.hs | 4 +++- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/routes b/routes index 5246a375a..4b5251a75 100644 --- a/routes +++ b/routes @@ -259,17 +259,18 @@ -- !/*{CI FilePath} CryptoFileNameDispatchR GET !free -- Disabled until preliminary check for valid cID exists -- for users -/qualification QualificationAllR GET -- TODO repurpose -/qualification/#SchoolId QualificationSchoolR GET -- TODO repurpose -/qualification/#SchoolId/#QualificationShorthand QualificationR GET -- TODO repurpose +/qualification QualificationAllR GET !free +/qualification/#SchoolId QualificationSchoolR GET !free +/qualification/#SchoolId/#QualificationShorthand QualificationR GET !free +-- /qualification/#CryptoUUIDUser/ -- maybe distingquish via URL? -- SAP export /qualifications/sap/direct QualificationSAPDirectR GET !token -- OSIS CSV Export Demo -/lms LmsAllR GET POST !free -- TODO verify that this is ok -/lms/#SchoolId LmsSchoolR GET !free -- TODO verify that this is ok -/lms/#SchoolId/#QualificationShorthand LmsR GET POST !free -- -/lms/#SchoolId/#QualificationShorthand/limit/#Int64/skip/#Int64 LmsLSR GET POST !free -- FIXME Pagination does not work here somehow +/lms LmsAllR GET POST +/lms/#SchoolId LmsSchoolR GET +/lms/#SchoolId/#QualificationShorthand LmsR GET POST +/lms/#SchoolId/#QualificationShorthand/limit/#Int64/skip/#Int64 LmsLSR GET POST -- FIXME Pagination does not work here somehow /lms/#SchoolId/#QualificationShorthand/edit LmsEditR GET POST /lms/#SchoolId/#QualificationShorthand/users LmsUsersR GET /lms/#SchoolId/#QualificationShorthand/users/direct LmsUsersDirectR GET -- development only diff --git a/src/Foundation/Navigation.hs b/src/Foundation/Navigation.hs index 5191afa77..16f50b94d 100644 --- a/src/Foundation/Navigation.hs +++ b/src/Foundation/Navigation.hs @@ -712,9 +712,21 @@ defaultLinks = fmap catMaybes . mapM runMaybeT $ -- Define the menu items of the } , return NavHeader { navHeaderRole = NavHeaderPrimary - , navIcon = IconMenuLms + , navIcon = IconMenuQualifications , navLink = NavLink { navLabel = MsgMenuQualifications + , navRoute = QualificationsAllR + , navAccess' = NavAccessTrue + , navType = NavTypeLink { navModal = False } + , navQuick' = mempty + , navForceActive = False + } + } + , return NavHeader + { navHeaderRole = NavHeaderPrimary + , navIcon = IconMenuLms + , navLink = NavLink + { navLabel = MsgMenuLms , navRoute = LmsAllR , navAccess' = NavAccessTrue , navType = NavTypeLink { navModal = False } diff --git a/src/Utils/Icon.hs b/src/Utils/Icon.hs index 23cd8d29f..0e9391894 100644 --- a/src/Utils/Icon.hs +++ b/src/Utils/Icon.hs @@ -86,6 +86,7 @@ data Icon | IconMenuCorrections | IconMenuExams | IconMenuAdmin + | IconMenuQualification | IconMenuLms | IconPageActionPrimaryExpand | IconPageActionSecondary | IconBreadcrumbSeparator @@ -168,7 +169,8 @@ iconText = \case IconMenuCorrections -> "check" IconMenuExams -> "poll-h" IconMenuAdmin -> "screwdriver" - IconMenuLms -> "graduation-cap" -- "award" "diploma" "file-certificate" + IconMenuLms -> "tasks" -- "user-graduate" "laptop" + IconMenuQualification -> "graduation-cap" -- "award" "diploma" "file-certificate" IconPageActionPrimaryExpand -> "bars" IconPageActionSecondary -> "ellipsis-h" IconBreadcrumbSeparator -> "angle-right"