aboutsummaryrefslogtreecommitdiff
path: root/client/src/View/Income/Add.hs
diff options
context:
space:
mode:
authorJoris2019-10-22 22:26:38 +0200
committerJoris2019-10-22 22:26:38 +0200
commit613ffccac4b3ab25c6d4c631fab757da0b35acf6 (patch)
tree13e448af89f4079bb62d7ce8b5a44b6a64515129 /client/src/View/Income/Add.hs
parent80f09e8b3a5c856e60922a73c9161a8c5392e4d4 (diff)
Harmonize view component code style
Diffstat (limited to 'client/src/View/Income/Add.hs')
-rw-r--r--client/src/View/Income/Add.hs19
1 files changed, 9 insertions, 10 deletions
diff --git a/client/src/View/Income/Add.hs b/client/src/View/Income/Add.hs
index 0b1bd04..f8f107f 100644
--- a/client/src/View/Income/Add.hs
+++ b/client/src/View/Income/Add.hs
@@ -13,7 +13,6 @@ import qualified Common.Util.Time as TimeUtil
import qualified Component.Modal as Modal
import qualified Util.Ajax as Ajax
import qualified Util.Reflex as ReflexUtil
-import View.Income.Form (FormIn (..), FormOut (..))
import qualified View.Income.Form as Form
view :: forall t m. MonadWidget t m => Modal.Content t m Income
@@ -22,16 +21,16 @@ view cancel = do
currentDay <- liftIO $ Time.getCurrentTime >>= TimeUtil.timeToDay
form <- R.dyn $
- return $ Form.view $ FormIn
- { _formIn_cancel = cancel
- , _formIn_headerLabel = Msg.get Msg.Income_AddLong
- , _formIn_amount = ""
- , _formIn_date = currentDay
- , _formIn_mkPayload = CreateIncomeForm
- , _formIn_ajax = Ajax.post
+ return $ Form.view $ Form.In
+ { Form._in_cancel = cancel
+ , Form._in_headerLabel = Msg.get Msg.Income_AddLong
+ , Form._in_amount = ""
+ , Form._in_date = currentDay
+ , Form._in_mkPayload = CreateIncomeForm
+ , Form._in_ajax = Ajax.post
}
- hide <- ReflexUtil.flatten (_formOut_hide <$> form)
- addIncome <- ReflexUtil.flatten (_formOut_addIncome <$> form)
+ hide <- ReflexUtil.flatten (Form._out_hide <$> form)
+ addIncome <- ReflexUtil.flatten (Form._out_addIncome <$> form)
return (hide, addIncome)