chore(postal): fix #12 by changing default for userPrefersPostal to True

This commit is contained in:
Steffen Jost 2022-12-07 10:31:33 +01:00
parent 2a98148993
commit f025b42bfe
6 changed files with 6 additions and 4 deletions

View File

@ -276,6 +276,7 @@ user-defaults:
show-sex: false
exam-office-get-synced: true
exam-office-get-labels: true
prefers-postal: true
# During central allocations lecturer-given ratings of applications (as
# ExamGrades) are combined with a central priority.

View File

@ -291,7 +291,7 @@ decodeUser now UserDefaultConf{..} upsertMode ldapData = do
, userMatrikelnummer = Nothing -- not known from LDAP, must be derived from REST interface to AVS TODO
, userPostAddress = Nothing -- not known from LDAP, must be derived from REST interface to AVS TODO
, userPinPassword = Nothing -- must be derived via AVS
, userPrefersPostal = False
, userPrefersPostal = userDefaultPrefersPostal
, ..
}
userUpdate = [

View File

@ -318,7 +318,7 @@ upsertAvsUserById api = do
, aufFPersonalNumber = avsInternalPersonalNo <$> canonical avsPersonInternalPersonalNo
, aufFDepartment = Nothing
, aufPostAddress = userFirmAddr
, aufPrefersPostal = isJust firmAddress
, aufPrefersPostal = True
, aufPinPassword = userPin
, aufEmail = fakeNo -- Email is unknown in this version of the avs query, to be updated later (FUTURE TODO)
, aufIdent = fakeIdent -- use AvsPersonId instead

View File

@ -281,6 +281,7 @@ data UserDefaultConf = UserDefaultConf
, userDefaultShowSex :: Bool
, userDefaultExamOfficeGetSynced :: Bool
, userDefaultExamOfficeGetLabels :: Bool
, userDefaultPrefersPostal :: Bool
} deriving (Show)
data PWHashConf = PWHashConf

View File

@ -199,7 +199,7 @@ fillDb = do
, userCompanyDepartment = Just "AVN-AR2"
, userPinPassword = Nothing
, userPostAddress = Nothing
, userPrefersPostal = False
, userPrefersPostal = True
, userExamOfficeGetSynced = userDefaultExamOfficeGetSynced
, userExamOfficeGetLabels = userDefaultExamOfficeGetLabels
}

View File

@ -55,4 +55,4 @@ fakeUser adjUser = adjUser User{..}
userCompanyDepartment = Nothing
userPinPassword = Nothing
userPostAddress = Nothing
userPrefersPostal = False
userPrefersPostal = userDefaultPrefersPostal