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/View/LoggedIn/AddPayment.elm | 1 + src/client/elm/View/LoggedIn/Monthly.elm | 4 ++-- src/client/elm/View/LoggedIn/Table.elm | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src/client/elm/View') diff --git a/src/client/elm/View/LoggedIn/AddPayment.elm b/src/client/elm/View/LoggedIn/AddPayment.elm index cbc93a1..5739a95 100644 --- a/src/client/elm/View/LoggedIn/AddPayment.elm +++ b/src/client/elm/View/LoggedIn/AddPayment.elm @@ -11,6 +11,7 @@ import Html.Attributes exposing (..) import Html.Events exposing (..) import Model exposing (Model) +import Model.Payment exposing (PaymentFrequency(..)) import Model.Translations exposing (getMessage) import Model.Action exposing (..) import Model.Action.LoggedInAction exposing (..) diff --git a/src/client/elm/View/LoggedIn/Monthly.elm b/src/client/elm/View/LoggedIn/Monthly.elm index 2c11993..c0294d7 100644 --- a/src/client/elm/View/LoggedIn/Monthly.elm +++ b/src/client/elm/View/LoggedIn/Monthly.elm @@ -10,7 +10,7 @@ import Html.Attributes exposing (..) import Html.Events exposing (..) import Model exposing (Model) -import Model.Payment exposing (Payments, Payment) +import Model.Payment as Payment exposing (Payments, Payment) import Model.Translations exposing (getMessage, getParamMessage) import Model.Action exposing (..) import Model.Action.LoggedInAction exposing (..) @@ -81,7 +81,7 @@ paymentLine address model loggedInView payment = [ text (price model payment.cost) ] , div [ class "cell delete" - , onClick address (ServerCommunication <| Communication.DeleteMonthlyPayment payment.id) + , onClick address (ServerCommunication <| Communication.DeletePayment payment Payment.Monthly) ] [ button [] [ renderIcon "times" ] ] diff --git a/src/client/elm/View/LoggedIn/Table.elm b/src/client/elm/View/LoggedIn/Table.elm index 8590dc5..cb3969b 100644 --- a/src/client/elm/View/LoggedIn/Table.elm +++ b/src/client/elm/View/LoggedIn/Table.elm @@ -88,7 +88,7 @@ paymentLine address model loggedInView payment = div [ class "cell delete" ] [ button - [ onClick address (ServerCommunication <| Communication.DeletePayment payment loggedInView.currentPage) ] + [ onClick address (ServerCommunication <| Communication.DeletePayment payment Punctual)] [ renderIcon "times" ] ] else -- cgit v1.2.3