diff --git a/src/Handler/Admin/Avs.hs b/src/Handler/Admin/Avs.hs
index 1c0af28fd..5d3c66a36 100644
--- a/src/Handler/Admin/Avs.hs
+++ b/src/Handler/Admin/Avs.hs
@@ -155,8 +155,8 @@ postAdminAvsR = do
Left err -> let msg = tshow err in return $ Just [whamlet|
Error:
#{msg}|]
Right (AvsResponsePerson pns) -> return $ Just [whamlet|
- $forall p <- pns
- - #{tshow p}
+ $forall p <- pns
+
- #{decodeUtf8 (Pretty.encodePretty (toJSON p))}
|]
mbPerson <- formResultMaybe presult procFormPerson
@@ -169,7 +169,7 @@ postAdminAvsR = do
Right (AvsResponseStatus pns) -> return $ Just [whamlet|
$forall p <- pns
- - #{tshow p}
+
- #{decodeUtf8 (Pretty.encodePretty (toJSON p))}
|]
mbStatus <- formResultMaybe sresult procFormStatus
@@ -181,8 +181,12 @@ postAdminAvsR = do
Left err -> let msg = tshow err in return $ Just [whamlet|
Error:
#{msg}|]
Right (AvsResponseContact pns) -> return $ Just [whamlet|
- $forall p <- pns
- - #{Pretty.encodePretty (toJSON p)}
+ $forall AvsDataContact{..} <- pns
+
-
+
+ - AvsId: #{tshow avsContactPersonID}
+
- #{decodeUtf8 (Pretty.encodePretty (toJSON avsContactPersonInfo))}
+
- #{decodeUtf8 (Pretty.encodePretty (toJSON avsContactFirmInfo))}
|]
mbContact <- formResultMaybe cresult procFormContact
@@ -443,11 +447,10 @@ getProblemAvsSynchR = do
Just $ QualificationBlocked
{ qualificationBlockedDay = nowaday
, qualificationBlockedReason = licenceTableChangeFDriveReason
- }
- let lReq = length apids
- if | oks < 0 -> addMessageI Error $ MsgRevokeFraDriveLicencesError alic
- | oks == lreq && lreq > 0 -> addMessageI Success $ MsgRevokeFraDriveLicences alic oks
- | otherwise -> addMessageI Warning $ MsgRevokeFraDriveLicences alic oks
+ }
+ if | oks < 0 -> addMessageI Error $ MsgRevokeFraDriveLicencesError alic
+ | oks > 0, oks == length apids -> addMessageI Success $ MsgRevokeFraDriveLicences alic oks
+ | otherwise -> addMessageI Warning $ MsgRevokeFraDriveLicences alic oks
redirect ProblemAvsSynchR -- must be outside runDB
procRes _alic (LicenceTableGrantFDriveData{..}, apids ) = do
diff --git a/src/Model/Types/Avs.hs b/src/Model/Types/Avs.hs
index 59cabb982..64161ee41 100644
--- a/src/Model/Types/Avs.hs
+++ b/src/Model/Types/Avs.hs
@@ -480,7 +480,7 @@ data AvsPersonInfo = AvsPersonInfo
{ avsInfoPersonNo :: Text -- Int -- AVS Personennummer, zum Gebrauch in menschlicher Kommunikation
, avsInfoFirstName :: Text -- WARNING: name stored as is, but AVS does contain weird whitespaces
, avsInfoLastName :: Text -- WARNING: name stored as is, but AVS does contain weird whitespaces
- , avsInfoRampLicence :: AvsLicence -- unlike other queries, may return -1 for guest unable to hold a licence; currently not distinquished from no licence
+ , avsInfoRampLicence :: Int -- AvsLicence -- unlike other queries, may return -1 for guest unable to hold a licence; currently not distinquished from no licence
, avsInfoDateOfBirth :: Maybe Day
, avsInfoPersonEMail :: Maybe Text
, avsInfoPersonMobilePhoneNo :: Maybe Text
diff --git a/src/Utils/Avs.hs b/src/Utils/Avs.hs
index 71e90c910..e1c3bc4f9 100644
--- a/src/Utils/Avs.hs
+++ b/src/Utils/Avs.hs
@@ -68,7 +68,7 @@ mkAvsQuery :: BaseUrl -> BasicAuthData -> ClientEnv -> AvsQuery
mkAvsQuery _ _ _ = AvsQuery
{ avsQueryPerson = \_ -> return . Right $ AvsResponsePerson mempty
, avsQueryStatus = \_ -> return . Right $ AvsResponseStatus mempty
- , avsQueryContact = \_ -> return . Right $ AvsResponseContact mempty
+ , avsQueryContact = \_ -> return . Right $ AvsResponseContact $ Set.singleton $ AvsDataContact (AvsPersonId 1234567) (AvsPersonInfo "AVSNO:123" "Heribert" "Sumpfmeier" (-1) Nothing Nothing Nothing Nothing) (AvsFirmInfo "Lange Firma" 7 "Kurz" Nothing Nothing Nothing Nothing Nothing Nothing)
, avsQuerySetLicences = \_ -> return . Right $ AvsResponseSetLicences mempty
, avsQueryGetAllLicences = return . Right $ AvsResponseGetLicences mempty
}