diff --git a/messages/uniworx/misc/de-de-formal.msg b/messages/uniworx/misc/de-de-formal.msg index 3ed3bd645..36db7750e 100644 --- a/messages/uniworx/misc/de-de-formal.msg +++ b/messages/uniworx/misc/de-de-formal.msg @@ -4,8 +4,8 @@ #messages or constructors that are used all over the code -Logo !ident-ok: Uni2work -EmailInvitationWarning: Diese Adresse konnte keinem Uni2work-Benutzer/keiner Uni2work-Benutzerin zugeordnet werden. Es wird eine Einladung per E-Mail versandt. +Logo !ident-ok: FRADrive +EmailInvitationWarning: Diese Adresse konnte keinem FRADrive-Benutzer/-Benutzerin zugeordnet werden. Es wird eine Einladung per E-Mail versandt. BoolIrrelevant !ident-ok: — FieldPrimary: Hauptfach FieldSecondary: Nebenfach @@ -15,6 +15,7 @@ WeekDay: Wochentag LdapIdentificationOrEmail: Fraport AG-Kennung / E-Mail-Adresse Months num@Int64: #{num} #{pluralDE num "Monat" "Monate"} Days num@Int64: #{num} #{pluralDE num "Tag" "Tage"} +NoAutomaticUpdateTip: Dieser Wert wurde manuell editiert und wird daher nicht mehr automatisch aktualisiert. ClusterVolatileQuickActionsEnabled: Schnellzugriffsmenü aktiv diff --git a/messages/uniworx/misc/en-eu.msg b/messages/uniworx/misc/en-eu.msg index d652ed4ba..b968ce9c0 100644 --- a/messages/uniworx/misc/en-eu.msg +++ b/messages/uniworx/misc/en-eu.msg @@ -4,8 +4,8 @@ #messages or constructors that are used all over the Code -Logo: Uni2work -EmailInvitationWarning: This address could not be matched to any Uni2work user. An invitation will be sent via email. +Logo: FRADrive +EmailInvitationWarning: This address could not be matched to any FRADrive user. An invitation will be sent via email. BoolIrrelevant: — FieldPrimary: Major FieldSecondary: Minor @@ -15,6 +15,7 @@ WeekDay: Day of the week LdapIdentificationOrEmail: Fraport AG-Kennung / email address Months num: #{num} #{pluralEN num "Month" "Months"} Days num: #{num} #{pluralEN num "Day" "Days"} +NoAutomaticUpdateTip: This value receives no automatic updates, since it has been edited manually. ClusterVolatileQuickActionsEnabled: Quick actions enabled diff --git a/models/company.model b/models/company.model index c123e281b..4ed5274e1 100644 --- a/models/company.model +++ b/models/company.model @@ -11,15 +11,8 @@ Company prefersPostal Bool default=false -- new company users prefers letters by post instead of email postAddress StoredMarkup Maybe -- default company postal address, including company name email UserEmail Maybe -- Case-insensitive generic company eMail address - UniqueCompanyName name + -- UniqueCompanyName name -- Should be Unique in AVS, but we do not yet need to enforce it -- UniqueCompanyShorthand shorthand -- unnecessary, since it is the primary key already - UniqueCompanyAvsId avsId - Primary shorthand -- newtype Key Company = CompanyKey { unCompanyKey :: CompanyShorthand } + UniqueCompanyAvsId avsId -- Should be the key, is not for historical reasons and for convenience in URLs and columns + Primary shorthand -- newtype Key Company = CompanyKey { unCompanyKey :: CompanyShorthand } deriving Ord Eq Show Generic Binary - --- -- TODO: a way to populate this table (manually) --- CompanySynonym --- synonym CompanyName --- canonical CompanyShorthand OnDeleteCascade OnUpdateCascade -- DEPRECATED: should be CompanyId --- UniqueCompanySynonym synonym --- deriving Ord Eq Show Generic diff --git a/src/Handler/Admin/Avs.hs b/src/Handler/Admin/Avs.hs index 82d739bb8..d117376e8 100644 --- a/src/Handler/Admin/Avs.hs +++ b/src/Handler/Admin/Avs.hs @@ -93,7 +93,7 @@ validateAvsQueryPerson = do is _Just avsPersonQueryInternalPersonalNo || is _Just avsPersonQueryVersionNo -makeAvsStatusForm :: Maybe AvsQueryStatus -> Form AvsQueryStatus +makeAvsStatusForm :: Maybe AvsPersonId -> Form AvsQueryStatus makeAvsStatusForm tmpl = identifyForm FIDAvsQueryStatus . validateForm validateAvsQueryStatus $ \html -> flip (renderAForm FormStandard) html $ parseAvsIds <$> areq textField (fslI MsgAvsPersonId) (unparseAvsIds <$> tmpl) @@ -103,15 +103,15 @@ makeAvsStatusForm tmpl = identifyForm FIDAvsQueryStatus . validateForm validateA where nonemptys = filter (not . Text.null) $ Text.strip <$> Text.split (==',') txt ids = mapMaybe readMay nonemptys - unparseAvsIds :: AvsQueryStatus -> Text - unparseAvsIds (AvsQueryStatus ids) = Text.intercalate ", " $ tshow <$> Set.toAscList ids + unparseAvsIds :: AvsPersonId -> Text + unparseAvsIds = tshow . avsPersonId validateAvsQueryStatus :: FormValidator AvsQueryStatus Handler () validateAvsQueryStatus = do AvsQueryStatus ids <- State.get guardValidation (MsgAvsQueryStatusInvalid $ tshow ids) $ not (null ids) -makeAvsContactForm :: Maybe AvsQueryContact -> Form AvsQueryContact +makeAvsContactForm :: Maybe AvsPersonId -> Form AvsQueryContact makeAvsContactForm tmpl = identifyForm FIDAvsQueryContact . validateForm validateAvsQueryContact $ \html -> flip (renderAForm FormStandard) html $ parseAvsIds <$> areq textField (fslI MsgAvsPersonId) (unparseAvsIds <$> tmpl) -- consider using cfAnySeparatedSet here @@ -121,8 +121,9 @@ makeAvsContactForm tmpl = identifyForm FIDAvsQueryContact . validateForm validat where nonemptys = filter (not . Text.null) $ Text.strip <$> Text.split (==',') txt ids = mapMaybe (fmap AvsObjPersonId . readMay) nonemptys - unparseAvsIds :: AvsQueryContact -> Text - unparseAvsIds (AvsQueryContact ids) = Text.intercalate ", " $ tshow <$> Set.toAscList ids + unparseAvsIds :: AvsPersonId -> Text + unparseAvsIds = tshow . avsPersonId + --unparseAvsIds (AvsQueryContact ids) = Text.intercalate ", " $ tshow <$> Set.toAscList ids validateAvsQueryContact :: FormValidator AvsQueryContact Handler () validateAvsQueryContact = do @@ -161,19 +162,26 @@ postAdminAvsR = do ((presult, pwidget), penctype) <- runFormPost $ makeAvsPersonForm Nothing - let procFormPerson fr = do + let procFormPerson :: AvsQueryPerson -> Handler (Maybe (Maybe Widget, Maybe AvsPersonId)) + procFormPerson fr = do addMessage Info $ text2Html $ "Query: " <> tshow (toJSON fr) - tryShow $ do - AvsResponsePerson pns <- avsQuery fr - return [whamlet| -