aboutsummaryrefslogtreecommitdiff
path: root/src/client/Update/Payment/Add.elm
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/Update/Payment/Add.elm')
-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
+ }