From eb5ecba59887a5d1e74bf6287fabdf8a2979f44c Mon Sep 17 00:00:00 2001 From: Joris Date: Sat, 5 Sep 2015 19:03:12 +0200 Subject: Payment frequence choice between either punctual or monthly, UI only --- src/client/Model/View/Payment/Add.elm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/client/Model') 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 -- cgit v1.2.3