aboutsummaryrefslogtreecommitdiff
path: root/src/client/Model/View/Payment
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/Model/View/Payment')
-rw-r--r--src/client/Model/View/Payment/Add.elm5
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