fix(build)
This commit is contained in:
parent
8d5836c457
commit
617706b895
@ -39,10 +39,11 @@ makeAvsPersonForm :: Maybe AvsQueryPerson -> Form AvsQueryPerson
|
|||||||
makeAvsPersonForm tmpl = identifyForm FIDAvsQueryPerson . validateForm validateAvsQueryPerson $ \html ->
|
makeAvsPersonForm tmpl = identifyForm FIDAvsQueryPerson . validateForm validateAvsQueryPerson $ \html ->
|
||||||
flip (renderAForm FormStandard) html $ AvsQueryPerson
|
flip (renderAForm FormStandard) html $ AvsQueryPerson
|
||||||
<$> aopt avsCardNoField (fslI MsgAvsCardNo) (avsPersonQueryCardNo <$> tmpl)
|
<$> aopt avsCardNoField (fslI MsgAvsCardNo) (avsPersonQueryCardNo <$> tmpl)
|
||||||
|
<*> aopt textField (fslI MsgAvsVersionNo) (avsPersonQueryVersionNo <$> tmpl)
|
||||||
<*> aopt textField (fslI MsgAvsFirstName) (avsPersonQueryFirstName <$> tmpl)
|
<*> aopt textField (fslI MsgAvsFirstName) (avsPersonQueryFirstName <$> tmpl)
|
||||||
<*> aopt textField (fslI MsgAvsLastName) (avsPersonQueryLastName <$> tmpl)
|
<*> aopt textField (fslI MsgAvsLastName) (avsPersonQueryLastName <$> tmpl)
|
||||||
<*> aopt textField (fslI MsgAvsInternalPersonalNo) (avsPersonQueryInternalPersonalNo <$> tmpl)
|
<*> aopt textField (fslI MsgAvsInternalPersonalNo) (avsPersonQueryInternalPersonalNo <$> tmpl)
|
||||||
<*> aopt textField (fslI MsgAvsVersionNo) (avsPersonQueryVersionNo <$> tmpl)
|
|
||||||
|
|
||||||
validateAvsQueryPerson :: FormValidator AvsQueryPerson Handler ()
|
validateAvsQueryPerson :: FormValidator AvsQueryPerson Handler ()
|
||||||
validateAvsQueryPerson = do
|
validateAvsQueryPerson = do
|
||||||
@ -93,14 +94,16 @@ postAdminAvsR = do
|
|||||||
((presult, pwidget), penctype) <- runFormPost $ makeAvsPersonForm Nothing
|
((presult, pwidget), penctype) <- runFormPost $ makeAvsPersonForm Nothing
|
||||||
|
|
||||||
let procFormPerson fr = do
|
let procFormPerson fr = do
|
||||||
|
addMessage Info $ text2Html $ "Query: " <> tshow (toJSON fr)
|
||||||
res <- avsQueryPerson fr
|
res <- avsQueryPerson fr
|
||||||
case res of
|
case res of
|
||||||
Left err -> return . Just $ tshow err
|
Left err -> return . Just $ tshow err
|
||||||
Right jsn -> return . Just $ tshow jsn
|
Right jsn -> return . Just $ tshow jsn
|
||||||
mbPerson <- formResultMaybe presult procFormPerson
|
mbPerson <- formResultMaybe presult procFormPerson
|
||||||
|
|
||||||
((sresult, swidget), senctype) <- runFormPost $ makeAvsStatusForm Nothing
|
((sresult, swidget), senctype) <- runFormPost $ makeAvsStatusForm Nothing
|
||||||
let procFormStatus fr = do
|
let procFormStatus fr = do
|
||||||
|
addMessage Info $ text2Html $ "Query: " <> tshow (toJSON fr)
|
||||||
res <- avsQueryStatus fr
|
res <- avsQueryStatus fr
|
||||||
case res of
|
case res of
|
||||||
Left err -> return . Just $ tshow err
|
Left err -> return . Just $ tshow err
|
||||||
@ -110,6 +113,7 @@ postAdminAvsR = do
|
|||||||
((crUsrRes, crUsrWgt), crUsrEnctype) <- runFormPost $ identifyForm FIDAvsCreateUser $ \html ->
|
((crUsrRes, crUsrWgt), crUsrEnctype) <- runFormPost $ identifyForm FIDAvsCreateUser $ \html ->
|
||||||
flip (renderAForm FormStandard) html $ areq textField (fslI MsgAvsCardNo) Nothing
|
flip (renderAForm FormStandard) html $ areq textField (fslI MsgAvsCardNo) Nothing
|
||||||
let procFormCrUsr fr = do
|
let procFormCrUsr fr = do
|
||||||
|
addMessage Info $ text2Html $ "Query: " <> tshow (toJSON fr)
|
||||||
res <- try $ upsertAvsUser fr
|
res <- try $ upsertAvsUser fr
|
||||||
case res of
|
case res of
|
||||||
(Right (Just uid)) -> do
|
(Right (Just uid)) -> do
|
||||||
@ -125,6 +129,7 @@ postAdminAvsR = do
|
|||||||
((getLicRes, getLicWgt), getLicEnctype) <- runFormPost $ identifyForm FIDAvsQueryLicence $ \html ->
|
((getLicRes, getLicWgt), getLicEnctype) <- runFormPost $ identifyForm FIDAvsQueryLicence $ \html ->
|
||||||
flip (renderAForm FormStandard) html $ areq intField (fslI MsgAvsPersonId) Nothing
|
flip (renderAForm FormStandard) html $ areq intField (fslI MsgAvsPersonId) Nothing
|
||||||
let procFormGetLic fr = do
|
let procFormGetLic fr = do
|
||||||
|
addMessage Info $ text2Html $ "Query: " <> tshow (toJSON (AvsPersonId fr))
|
||||||
res <- try $ getLicenceByAvsId $ AvsPersonId fr
|
res <- try $ getLicenceByAvsId $ AvsPersonId fr
|
||||||
case res of
|
case res of
|
||||||
(Right (Just lic)) ->
|
(Right (Just lic)) ->
|
||||||
|
|||||||
Reference in New Issue
Block a user