diff options
author | Joris | 2015-09-05 19:03:12 +0200 |
---|---|---|
committer | Joris | 2015-09-05 19:03:12 +0200 |
commit | eb5ecba59887a5d1e74bf6287fabdf8a2979f44c (patch) | |
tree | 0e3b61002173fb012ad9ddae18632d391330cb50 /src/client/Update | |
parent | cc6a51b5ca03ee1a3b5de7c32dd1324e1053f42a (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.elm | 7 |
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 + } |