aboutsummaryrefslogtreecommitdiff
path: root/client/src/View/Income/Form.hs
diff options
context:
space:
mode:
authorJoris2019-11-06 19:44:15 +0100
committerJoris2019-11-06 19:44:15 +0100
commitf4f24158a46d8c0975f1b8813bbdbbeebad8c108 (patch)
treed0aeaa3a920caaff7408a1f6cd12b45f21cb2620 /client/src/View/Income/Form.hs
parent58f6c4e25f5f20f1b608242c83786e2f13947804 (diff)
downloadbudget-f4f24158a46d8c0975f1b8813bbdbbeebad8c108.tar.gz
budget-f4f24158a46d8c0975f1b8813bbdbbeebad8c108.tar.bz2
budget-f4f24158a46d8c0975f1b8813bbdbbeebad8c108.zip
Show the payment table with server side paging
Diffstat (limited to 'client/src/View/Income/Form.hs')
-rw-r--r--client/src/View/Income/Form.hs18
1 files changed, 9 insertions, 9 deletions
diff --git a/client/src/View/Income/Form.hs b/client/src/View/Income/Form.hs
index a4f7de8..ff6e55e 100644
--- a/client/src/View/Income/Form.hs
+++ b/client/src/View/Income/Form.hs
@@ -27,7 +27,7 @@ import qualified Component.Modal as Modal
import qualified Component.ModalForm as ModalForm
import qualified Util.Ajax as Ajax
-data In t = In
+data In = In
{ _in_operation :: Operation
}
@@ -36,7 +36,7 @@ data Operation
| Clone Income
| Edit Income
-view :: forall t m a. MonadWidget t m => In t -> Modal.Content t m Income
+view :: forall t m a. MonadWidget t m => In -> Modal.Content t m Income
view input cancel = do
rec
@@ -94,14 +94,14 @@ view input cancel = do
amount =
case op of
- New -> ""
- Clone income -> T.pack . show . _income_amount $ income
- Edit income -> T.pack . show . _income_amount $ income
+ New -> ""
+ Clone i -> T.pack . show . _income_amount $ i
+ Edit i -> T.pack . show . _income_amount $ i
date currentDay =
case op of
- Edit income -> _income_date income
- _ -> currentDay
+ Edit i -> _income_date i
+ _ -> currentDay
ajax =
case op of
@@ -115,5 +115,5 @@ view input cancel = do
mkPayload =
case op of
- Edit income -> \a b -> Aeson.toJSON $ EditIncomeForm (_income_id income) a b
- _ -> \a b -> Aeson.toJSON $ CreateIncomeForm a b
+ Edit i -> \a b -> Aeson.toJSON $ EditIncomeForm (_income_id i) a b
+ _ -> \a b -> Aeson.toJSON $ CreateIncomeForm a b