aboutsummaryrefslogtreecommitdiff
path: root/src/client/Update
diff options
context:
space:
mode:
authorJoris2015-09-05 19:03:12 +0200
committerJoris2015-09-05 19:03:12 +0200
commiteb5ecba59887a5d1e74bf6287fabdf8a2979f44c (patch)
tree0e3b61002173fb012ad9ddae18632d391330cb50 /src/client/Update
parentcc6a51b5ca03ee1a3b5de7c32dd1324e1053f42a (diff)
Payment frequence choice between either punctual or monthly, UI only
Diffstat (limited to 'src/client/Update')
-rw-r--r--src/client/Update/Payment/Add.elm7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/client/Update/Payment/Add.elm b/src/client/Update/Payment/Add.elm
index 3ccce73..27f2af0 100644
--- a/src/client/Update/Payment/Add.elm
+++ b/src/client/Update/Payment/Add.elm
@@ -3,12 +3,13 @@ module Update.Payment.Add
, updateAddPayment
) where
-import Model.View.Payment.Add exposing (AddPayment)
+import Model.View.Payment.Add exposing (..)
type AddPaymentAction =
UpdateName String
| UpdateCost String
| AddError (Maybe String) (Maybe String)
+ | ToggleFrequency
updateAddPayment : AddPaymentAction -> AddPayment -> AddPayment
updateAddPayment action addPayment =
@@ -22,3 +23,7 @@ updateAddPayment action addPayment =
| nameError <- nameError
, costError <- costError
}
+ ToggleFrequency ->
+ { addPayment
+ | frequency <- if addPayment.frequency == Punctual then Monthly else Punctual
+ }