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/Model | |
parent | cc6a51b5ca03ee1a3b5de7c32dd1324e1053f42a (diff) |
Payment frequence choice between either punctual or monthly, UI only
Diffstat (limited to 'src/client/Model')
-rw-r--r-- | src/client/Model/View/Payment/Add.elm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/client/Model/View/Payment/Add.elm b/src/client/Model/View/Payment/Add.elm index 5ab7a40..da5d0f2 100644 --- a/src/client/Model/View/Payment/Add.elm +++ b/src/client/Model/View/Payment/Add.elm @@ -1,5 +1,6 @@ module Model.View.Payment.Add ( AddPayment + , Frequency(..) , initAddPayment , validateName , validateCost @@ -16,6 +17,7 @@ type alias AddPayment = , nameError : Maybe String , cost : String , costError : Maybe String + , frequency : Frequency } initAddPayment : AddPayment @@ -24,6 +26,7 @@ initAddPayment = , nameError = Nothing , cost = "" , costError = Nothing + , frequency = Punctual } validateName : String -> Translations -> Result String String @@ -36,3 +39,5 @@ validateCost cost translations = cost |> validateNonEmpty (getMessage "CostRequired" translations) |> flip Result.andThen (validateNumber (getMessage "CostMustBeNumber" translations) (\number -> number >= 0)) + +type Frequency = Punctual | Monthly |