From fc9a3ca6a5226f78a3a0ec51af3d8d287ccb2e1b Mon Sep 17 00:00:00 2001
From: Joris
Date: Sat, 2 Jan 2016 22:45:20 +0100
Subject: Merge deletePayment with deleteMonthlyPayment

---
 src/client/elm/Model/View/LoggedIn/AddPayment.elm | 8 +++-----
 src/client/elm/Model/View/LoggedInView.elm        | 2 +-
 2 files changed, 4 insertions(+), 6 deletions(-)

(limited to 'src/client/elm/Model/View')

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 (..)
-- 
cgit v1.2.3