diff options
author | Joris | 2016-01-02 22:45:20 +0100 |
---|---|---|
committer | Joris | 2016-01-02 22:45:20 +0100 |
commit | fc9a3ca6a5226f78a3a0ec51af3d8d287ccb2e1b (patch) | |
tree | e05a710b30f749048bb668db1501d2369fa4e666 /src/client/elm/Model/View | |
parent | 25d15aacb940c2a19cae3b2e3d8d3ebd1972be02 (diff) |
Merge deletePayment with deleteMonthlyPayment
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 (..) |