commence implementing cash checks
This commit is contained in:
parent
35b4b2eb52
commit
096f287ce1
5 changed files with 17 additions and 0 deletions
|
@ -65,6 +65,8 @@ type UserAPI =
|
||||||
:> Post '[HTML] CashBuyConfirmPage
|
:> Post '[HTML] CashBuyConfirmPage
|
||||||
:<|> "journal" :> QueryParam "page" Word
|
:<|> "journal" :> QueryParam "page" Word
|
||||||
:> Get '[HTML] JournalPage
|
:> Get '[HTML] JournalPage
|
||||||
|
:<|> "journal" :> "check"
|
||||||
|
:> Get '[HTML] JournalCheckPage
|
||||||
:<|> "auth"
|
:<|> "auth"
|
||||||
:> QueryParam "destination" T.Text
|
:> QueryParam "destination" T.Text
|
||||||
:> Get '[HTML]
|
:> Get '[HTML]
|
||||||
|
@ -95,6 +97,7 @@ type UserAPI =
|
||||||
cashBuyLink :<|>
|
cashBuyLink :<|>
|
||||||
cashBuyPostLink :<|>
|
cashBuyPostLink :<|>
|
||||||
journalLink :<|>
|
journalLink :<|>
|
||||||
|
journalCheckLink :<|>
|
||||||
authLink :<|>
|
authLink :<|>
|
||||||
authPostLink :<|>
|
authPostLink :<|>
|
||||||
authLogoutLink
|
authLogoutLink
|
||||||
|
|
|
@ -66,3 +66,8 @@ journalControl mcookie mpage = do
|
||||||
throwError $
|
throwError $
|
||||||
addMessage (fromString $ show othererr) $
|
addMessage (fromString $ show othererr) $
|
||||||
redirect303 userSelectLink
|
redirect303 userSelectLink
|
||||||
|
|
||||||
|
journalCheckControl
|
||||||
|
:: Maybe T.Text
|
||||||
|
-> UserHandler JournalCheckPage
|
||||||
|
ournalCheckControl
|
||||||
|
|
|
@ -83,6 +83,7 @@ userApp initState = serveWithContext userApi EmptyContext $
|
||||||
:<|> cashBuyOverviewControl mcookie
|
:<|> cashBuyOverviewControl mcookie
|
||||||
:<|> cashBuyPurchaseControl mcookie
|
:<|> cashBuyPurchaseControl mcookie
|
||||||
:<|> journalControl mcookie
|
:<|> journalControl mcookie
|
||||||
|
:<|> journalCheckControl mcookie
|
||||||
:<|> authControl mcookie
|
:<|> authControl mcookie
|
||||||
:<|> authPostControl mcookie
|
:<|> authPostControl mcookie
|
||||||
:<|> authLogoutControl mcookie
|
:<|> authLogoutControl mcookie
|
||||||
|
|
|
@ -20,6 +20,8 @@ type BuyConfirmPage = H.Html
|
||||||
|
|
||||||
type JournalPage = H.Html
|
type JournalPage = H.Html
|
||||||
|
|
||||||
|
type JournalCheckPage = H.Html
|
||||||
|
|
||||||
type CashBuyOverviewPage = H.Html
|
type CashBuyOverviewPage = H.Html
|
||||||
|
|
||||||
type CashBuyConfirmPage = H.Html
|
type CashBuyConfirmPage = H.Html
|
||||||
|
|
|
@ -77,5 +77,11 @@ journalPage l10n loc mcookie mpage entries =
|
||||||
(show $ linkURI (journalLink (Just $ page + 1)))
|
(show $ linkURI (journalLink (Just $ page + 1)))
|
||||||
)
|
)
|
||||||
$ H.toHtml $ translate "Next Page"
|
$ H.toHtml $ translate "Next Page"
|
||||||
|
H.button
|
||||||
|
H.! HA.type_ "submit"
|
||||||
|
H.! HA.formmethod "get"
|
||||||
|
H.! HA.formaction
|
||||||
|
("/" <> fromString (show $ linkURI $ journalCheckLink)
|
||||||
|
$ H.toHtml $ translate "Perform cash check"
|
||||||
where
|
where
|
||||||
translate = localize l10n loc . gettext
|
translate = localize l10n loc . gettext
|
||||||
|
|
Loading…
Reference in a new issue