diff --git a/messages/uniworx/categories/firm/de-de-formal.msg b/messages/uniworx/categories/firm/de-de-formal.msg index 9bef83c31..5872e4271 100644 --- a/messages/uniworx/categories/firm/de-de-formal.msg +++ b/messages/uniworx/categories/firm/de-de-formal.msg @@ -5,7 +5,7 @@ FirmAssociates: Firmenangehörige, ohne externe Ansprechpartner FirmEmail: Allgemeine Email FirmAddress: Postanschrift -FirmDefaultPostalPreferenceInfo: Hinweis: Dies ist lediglich die Voreinstellung für neue Firmenangehörige +FirmDefaultPostalPreferenceInfo: Diese Voreinstellung gilt nur für neue Firmenangehörige FirmAllActNotify: Mitteilung versenden FirmAllActResetSupervision: Ansprechpartner für alle Firmenangehörigen zurücksetzen FirmUserActNotify: Mitteilung versenden diff --git a/messages/uniworx/categories/firm/en-eu.msg b/messages/uniworx/categories/firm/en-eu.msg index 71652d37e..164526d1f 100644 --- a/messages/uniworx/categories/firm/en-eu.msg +++ b/messages/uniworx/categories/firm/en-eu.msg @@ -5,7 +5,7 @@ FirmAssociates: Company associated users, excluding foreign supervisors FirmEmail: General company email FirmAddress: Postal address -FirmDefaultPostalPreferenceInfo: Note that this is only the default setting for new company associates +FirmDefaultPostalPreferenceInfo: Default setting for new company associates only. FirmAllActNotify: Send message FirmAllActResetSupervision: Reset supervisors for all company associates FirmUserActNotify: Send message diff --git a/src/Handler/Firm.hs b/src/Handler/Firm.hs index d910c4ea9..998d1edf8 100644 --- a/src/Handler/Firm.hs +++ b/src/Handler/Firm.hs @@ -560,30 +560,7 @@ postFirmUsersR fsh = do (FirmUserActMkSuperData, fids) -> addMessage Info $ text2Html $ "Make " <> tshow (length fids) <> " employees to supervisors. TODO" siteLayout (citext2widget companyName) $ do setTitle $ toHtml $ CI.original companyShorthand <> " (" <> tshow companyAvsId <> ")" - [whamlet| -
-
-
- _{MsgPrefersPostal} -
- #{iconLetterOrEmail companyPrefersPostal} # - _{MsgFirmDefaultPostalPreferenceInfo} - $maybe fem <- companyEmail -
- #{iconLetterOrEmail False} _{MsgFirmEmail} -
- #{mailToHtml fem} - $maybe addr <- companyPostAddress -
- #{iconLetterOrEmail True} _{MsgFirmEmail} -
- #{addr} -
-

- _{MsgFirmAssociates} -

- ^{fusrTable} - |] + $(widgetFile "firm-users") ----------------------------- diff --git a/src/Handler/Utils/Company.hs b/src/Handler/Utils/Company.hs index 1b8b9dafa..440f6c8fa 100644 --- a/src/Handler/Utils/Company.hs +++ b/src/Handler/Utils/Company.hs @@ -40,14 +40,14 @@ upsertCompany cName cAddr = Nothing -> do let cShort = companyShorthandFromName cName cShort' <- findShort cName' $ CI.mk cShort - let compy = Company cName' cShort' 0 False cAddr -- TODO: Fix this once AVS CR3 SCF-165 is implemented + let compy = Company cName' cShort' 0 False cAddr Nothing -- TODO: Fix this once AVS CR3 SCF-165 is implemented either entityKey id <$> insertBy compy where findShort :: CompanyName -> CompanyShorthand -> DB CompanyShorthand findShort fna fsh = aux 0 where aux n = let fsh' = if n==0 then fsh else fsh <> CI.mk (tshow n) in - checkUnique (Company fna fsh' 0 False Nothing) >>= \case + checkUnique (Company fna fsh' 0 False Nothing Nothing) >>= \case Nothing -> return fsh' _other -> aux (n+1) diff --git a/templates/firm-users.hamlet b/templates/firm-users.hamlet index 60ffd4d92..fcddb64b0 100644 --- a/templates/firm-users.hamlet +++ b/templates/firm-users.hamlet @@ -1,60 +1,29 @@ $newline never -$# SPDX-FileCopyrightText: 2022 Steffen Jost +$# SPDX-FileCopyrightText: 2023 Steffen Jost $# $# SPDX-License-Identifier: AGPL-3.0-or-later +

+
+
+ _{MsgPrefersPostal} +
+ #{iconLetterOrEmail companyPrefersPostal} # + _{MsgFirmDefaultPostalPreferenceInfo} + $maybe fem <- companyEmail +
+ _{MsgFirmEmail} #{iconLetterOrEmail False} +
+ #{mailtoHtml fem} + $maybe addr <- companyPostAddress +
+ _{MsgFirmAddress} #{iconLetterOrEmail True} +
+ #{addr} +

- _{MsgProblemsHeadingDrivers} - -
-
^{flagError driversHaveAvsIds} -
^{simpleLinkI MsgProblemsDriversHaveAvsIds ProblemWithoutAvsId} - - $case diffLics - $of Left err -
^{flagError False} -
^{modal (i18n MsgProblemsAvsProblem) (Right err)} - - $of Right (ok0,ok1up,ok1down,ok2) -
^{flagNonZero ok2} -
^{simpleLinkI MsgProblemsDriverSynch2 ProblemAvsSynchR} - -
^{flagNonZero ok1down} -
^{simpleLinkI MsgProblemsDriverSynch1down ProblemAvsSynchR} - -
^{flagNonZero ok1up} -
^{simpleLinkI MsgProblemsDriverSynch1up ProblemAvsSynchR} - -
^{flagNonZero ok0} -
^{simpleLinkI MsgProblemsDriverSynch0 ProblemAvsSynchR} - -
^{flagWarning rDriversHaveFs} -
^{simpleLinkI MsgProblemsRDriversHaveFs ProblemFbutNoR} - - -
-

- _{MsgProblemsHeadingNotifications} - -
-
^{flagError usersAreReachable} -
^{simpleLinkI MsgProblemsUsersAreReachable ProblemUnreachableR} - -
^{flagError noStalePrintJobs} -
^{simpleLinkI (MsgProblemsNoStalePrintJobs cutOffPrintDays) PrintCenterR} - -
^{flagError noBadAPCids} -
_{MsgProblemsNoBadAPCIds} - - $maybe reroute <- rerouteMail -
^{flagWarning False} -
_{MsgMailRerouteTo reroute} - -
-

- _{MsgProblemsHeadingMisc} -
-
^{flagError noAvsSynchProblems} -
^{simpleLinkI MsgProblemsNoAvsSynchProblems ProblemAvsErrorR} + _{MsgFirmAssociates} +

+ ^{fusrTable} \ No newline at end of file diff --git a/test/Database/Fill.hs b/test/Database/Fill.hs index 850074cea..9e1b9cea6 100644 --- a/test/Database/Fill.hs +++ b/test/Database/Fill.hs @@ -624,11 +624,12 @@ fillDb = do I am aware that violations in the form plagiarism or collaboration with third parties will lead to expulsion from the course. |] } - fraportAg <- insert' $ Company "Fraport AG" "Fraport" 1 True $ Just $ markdownToStoredMarkup ("Frankfurt Airport Services Worldwide\n60547 Frankfurt am Main"::Text) - fraGround <- insert' $ Company "Fraport Ground Handling Professionals GmbH" "FraGround" 2 True $ Just $ markdownToStoredMarkup ("Sauerbierstraße 772 \nBürokomplex 80/C/1\n112233 Nieder-Tupfing-Hohen-Kreisingen\nTöpferbezirk"::Text) - nice <- insert' $ Company "N*ICE Aircraft Services & Support GmbH" "N*ICE" 33 False $ Just $ markdownToStoredMarkup ("69 Nevermore Blvd.\nHarlaemn\nNew York\nUSA"::Text) - ffacil <- insert' $ Company "Fraport Facility Services GmbH" "GCS" 44 False Nothing - bpol <- insert' $ Company "Bundespolizeidirektion Flughafen Frankfurt am Main" "BPol" 5555 False Nothing + fraportAg <- insert' $ Company "Fraport AG" "Fraport" 1 True (Just $ markdownToStoredMarkup ("Frankfurt Airport Services Worldwide\n60547 Frankfurt am Main"::Text)) (Just "fraport@fraport.de") + fraGround <- insert' $ Company "Fraport Ground Handling Professionals GmbH" "FraGround" 2 True (Just $ markdownToStoredMarkup ("Sauerbierstraße 772 \nBürokomplex 80/C/1\n112233 Nieder-Tupfing-Hohen-Kreisingen\nTöpferbezirk"::Text)) Nothing + nice <- insert' $ Company "N*ICE Aircraft Services & Support GmbH" "N*ICE" 33 False (Just $ markdownToStoredMarkup ("69 Nevermore Blvd.\nHarlaemn\nNew York\nUSA"::Text)) (Just "badguy@nice.com") + ffacil <- insert' $ Company "Fraport Facility Services GmbH" "GCS" 44 False Nothing $ Just "gcs@gcs.com" + bpol <- insert' $ Company "Bundespolizeidirektion Flughafen Frankfurt am Main" "BPol" 5555 False Nothing Nothing + _noone <- insert' $ Company "Vollautomaten GmbH" "NoOne" 3 True Nothing Nothing void . insert' $ UserCompany jost fraportAg True True void . insert' $ UserCompany svaupel nice True False void . insert' $ UserCompany gkleen nice False False