aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/Model/View/LoggedIn/AddPayment.elm
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/elm/Model/View/LoggedIn/AddPayment.elm')
-rw-r--r--src/client/elm/Model/View/LoggedIn/AddPayment.elm8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/client/elm/Model/View/LoggedIn/AddPayment.elm b/src/client/elm/Model/View/LoggedIn/AddPayment.elm
index b70b0c6..fc4d3a0 100644
--- a/src/client/elm/Model/View/LoggedIn/AddPayment.elm
+++ b/src/client/elm/Model/View/LoggedIn/AddPayment.elm
@@ -1,6 +1,5 @@
module Model.View.LoggedIn.AddPayment
( AddPayment
- , Frequency(..)
, initAddPayment
, validateName
, validateCost
@@ -11,16 +10,17 @@ import Result as Result exposing (Result(..))
import Utils.Validation exposing (..)
import Model.Translations exposing (..)
+import Model.Payment exposing (PaymentFrequency(..))
type alias AddPayment =
{ name : String
, nameError : Maybe String
, cost : String
, costError : Maybe String
- , frequency : Frequency
+ , frequency : PaymentFrequency
}
-initAddPayment : Frequency -> AddPayment
+initAddPayment : PaymentFrequency -> AddPayment
initAddPayment frequency =
{ name = ""
, nameError = Nothing
@@ -39,5 +39,3 @@ validateCost cost translations =
cost
|> validateNonEmpty (getMessage "CostRequired" translations)
|> flip Result.andThen (validateNumber (getMessage "CostRequired" translations) ((/=) 0))
-
-type Frequency = Punctual | Monthly