aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/View/LoggedIn/AddPayment.elm
diff options
context:
space:
mode:
authorJoris2016-01-02 22:19:40 +0100
committerJoris2016-01-02 22:19:40 +0100
commit25d15aacb940c2a19cae3b2e3d8d3ebd1972be02 (patch)
tree6a418a7a31b713a1d39bdb2da1f798ca07266fe1 /src/client/elm/View/LoggedIn/AddPayment.elm
parent35493d8ec353f90a6ca67e2aedb702684e0abafa (diff)
downloadbudget-25d15aacb940c2a19cae3b2e3d8d3ebd1972be02.tar.gz
budget-25d15aacb940c2a19cae3b2e3d8d3ebd1972be02.tar.bz2
budget-25d15aacb940c2a19cae3b2e3d8d3ebd1972be02.zip
Merge AddPayment and AddMonthlyPayment
Diffstat (limited to 'src/client/elm/View/LoggedIn/AddPayment.elm')
-rw-r--r--src/client/elm/View/LoggedIn/AddPayment.elm6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/client/elm/View/LoggedIn/AddPayment.elm b/src/client/elm/View/LoggedIn/AddPayment.elm
index 0fbe28e..cbc93a1 100644
--- a/src/client/elm/View/LoggedIn/AddPayment.elm
+++ b/src/client/elm/View/LoggedIn/AddPayment.elm
@@ -31,11 +31,7 @@ addPayment address model loggedInView =
H.form
[ case (validateName loggedInView.add.name model.translations, validateCost loggedInView.add.cost model.translations) of
(Ok name, Ok cost) ->
- let action =
- case loggedInView.add.frequency of
- Punctual -> Communication.AddPayment name cost
- Monthly -> Communication.AddMonthlyPayment name cost
- in onSubmitPrevDefault address (ServerCommunication action)
+ onSubmitPrevDefault address (ServerCommunication (Communication.AddPayment name cost loggedInView.add.frequency))
(resName, resCost) ->
onSubmitPrevDefault address (UpdateLoggedIn <| UpdateAdd <| AddError (toMaybeError resName) (toMaybeError resCost))
, class "addPayment"