From 6606ccc82c758fa01fb46394424f62aa3f922404 Mon Sep 17 00:00:00 2001 From: Steffen Jost Date: Fri, 9 Dec 2022 18:02:26 +0100 Subject: [PATCH] chore(users): show companies in users list --- .../uniworx/categories/admin/de-de-formal.msg | 2 +- messages/uniworx/categories/admin/en-eu.msg | 2 +- .../utils/table_column/de-de-formal.msg | 1 + messages/uniworx/utils/table_column/en-eu.msg | 1 + models/lms.model | 4 +- src/Foundation/Navigation.hs | 8 ++++ src/Handler/Admin.hs | 39 ++++++++++--------- src/Handler/Profile.hs | 8 ++-- src/Handler/Users.hs | 10 +++++ src/Handler/Utils/Table/Columns.hs | 36 +++++++++++++++++ 10 files changed, 86 insertions(+), 25 deletions(-) diff --git a/messages/uniworx/categories/admin/de-de-formal.msg b/messages/uniworx/categories/admin/de-de-formal.msg index 1a6353160..0a02c699e 100644 --- a/messages/uniworx/categories/admin/de-de-formal.msg +++ b/messages/uniworx/categories/admin/de-de-formal.msg @@ -95,7 +95,7 @@ TestDownloadDirect: Direkte Generierung TestDownloadInTransaction: Generierung während Datenbank-Transaktion TestDownloadFromDatabase: Generierung während Download aus Datenbank -ProblemsHeading: Overview Problems +ProblemsHeading: Problemübersicht ProblemsHeadingDrivers: Fahrberechtigungen ProblemsAvsProblem: Synchronisation mit AVS/MoBaKo komplett fehlgeschlagen ProblemsDriverSynch n@Int: #{tshow n} Diskrepanzen zwischen AVS und FRADrive diff --git a/messages/uniworx/categories/admin/en-eu.msg b/messages/uniworx/categories/admin/en-eu.msg index 9a4e5ab52..1f346e598 100644 --- a/messages/uniworx/categories/admin/en-eu.msg +++ b/messages/uniworx/categories/admin/en-eu.msg @@ -95,7 +95,7 @@ TestDownloadDirect: Direct generation TestDownloadInTransaction: Generate during database transaction TestDownloadFromDatabase: Generate while streaming from database -ProblemsHeading: Problemübersicht +ProblemsHeading: Overview Problems ProblemsHeadingDrivers: Driving Licences ProblemsAvsProblem: Synchronisation with AVS/MoBaKo failed entirely ProblemsDriverSynch n: #{tshow n} mismatches between AVS and FRADrive diff --git a/messages/uniworx/utils/table_column/de-de-formal.msg b/messages/uniworx/utils/table_column/de-de-formal.msg index 81e97e872..7bf2ecfad 100644 --- a/messages/uniworx/utils/table_column/de-de-formal.msg +++ b/messages/uniworx/utils/table_column/de-de-formal.msg @@ -71,3 +71,4 @@ TableDiffDaysTooltip: Zeitspanne nach ISO 8601. Beispiel: "P2Y3M4D" ist eine Zei TableExamOfficeLabel: Label-Name TableExamOfficeLabelStatus: Label-Farbe TableExamOfficeLabelPriority: Label-Priorität +TableCompany: Firma diff --git a/messages/uniworx/utils/table_column/en-eu.msg b/messages/uniworx/utils/table_column/en-eu.msg index 450a5c9a1..0cba1d67c 100644 --- a/messages/uniworx/utils/table_column/en-eu.msg +++ b/messages/uniworx/utils/table_column/en-eu.msg @@ -71,3 +71,4 @@ TableDiffDaysTooltip: Duration given according to ISO 8601. Example: "P2Y3M4D" i TableExamOfficeLabel: Label name TableExamOfficeLabelStatus: Label colour TableExamOfficeLabelPriority: Label priority +TableCompany: Company \ No newline at end of file diff --git a/models/lms.model b/models/lms.model index 4c8ae02ee..139cc6c3f 100644 --- a/models/lms.model +++ b/models/lms.model @@ -15,8 +15,8 @@ Qualification -- elearningOnly Bool -- successful E-learing automatically increases validity. NO! -- refreshInvitation StoredMarkup -- hard-coded I18N-MSGs used instead, but displayed on qualification page NO! -- expiryNotification StoredMarkup Maybe -- configurable user-profile-notifcations are used instead NO! - avsLicence AvsLicence Maybe -- if set, is synchronized to Avs as a driving licence - sapId Text Maybe -- if set, all QualificationUsers with userCompanyPersonalNumber are transmitted via SAP interface under this id + avsLicence AvsLicence Maybe -- if set, valid QualificationUsers are synchronized to AVS as a driving licence + sapId Text Maybe -- if set, valid QualificationUsers with userCompanyPersonalNumber are transmitted via SAP interface under this id SchoolQualificationShort school shorthand -- must be unique per school and shorthand SchoolQualificationName school name -- must be unique per school and name -- across all schools, only one qualification may be a driving licence: diff --git a/src/Foundation/Navigation.hs b/src/Foundation/Navigation.hs index c376aa598..583273cd2 100644 --- a/src/Foundation/Navigation.hs +++ b/src/Foundation/Navigation.hs @@ -779,6 +779,14 @@ defaultLinks = fmap catMaybes . mapM runMaybeT $ -- Define the menu items of the , navIcon = IconMenuAdmin , navChildren = [ NavLink + { navLabel = MsgProblemsHeading + , navRoute = AdminR + , navAccess' = NavAccessTrue + , navType = NavTypeLink { navModal = False } + , navQuick' = mempty + , navForceActive = False + } + , NavLink { navLabel = MsgMenuUsers , navRoute = UsersR , navAccess' = NavAccessTrue diff --git a/src/Handler/Admin.hs b/src/Handler/Admin.hs index eb5efbf9f..5215d16b5 100644 --- a/src/Handler/Admin.hs +++ b/src/Handler/Admin.hs @@ -73,7 +73,7 @@ getAdminR = do getProblemUnreachableR :: Handler Html getProblemUnreachableR = do - unreachables <- runDB $ E.select getUnreachableUsers + unreachables <- runDB $ E.select retrieveUnreachableUsers siteLayoutMsg MsgProblemsUnreachableHeading $ do setTitleI MsgProblemsUnreachableHeading [whamlet| @@ -82,14 +82,14 @@ getProblemUnreachableR = do