diff options
Diffstat (limited to 'src/client/elm/Model/View')
-rw-r--r-- | src/client/elm/Model/View/LoggedIn/AddPayment.elm | 8 | ||||
-rw-r--r-- | src/client/elm/Model/View/LoggedInView.elm | 2 |
2 files changed, 4 insertions, 6 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 diff --git a/src/client/elm/Model/View/LoggedInView.elm b/src/client/elm/Model/View/LoggedInView.elm index 712ce2d..75285b1 100644 --- a/src/client/elm/Model/View/LoggedInView.elm +++ b/src/client/elm/Model/View/LoggedInView.elm @@ -4,7 +4,7 @@ module Model.View.LoggedInView ) where import Model.User exposing (Users, UserId) -import Model.Payment exposing (Payments) +import Model.Payment exposing (Payments, PaymentFrequency(..)) import Model.Payer exposing (Payers) import Model.View.LoggedIn.AddPayment exposing (..) import Model.View.LoggedIn.Edition exposing (..) |