From 8816cf758119a6a2073e561c8df297a833630986 Mon Sep 17 00:00:00 2001 From: Joris Date: Mon, 8 Aug 2016 20:58:17 +0200 Subject: Show incomes in a table and update like payments are updated --- src/client/elm/LoggedIn/Home/View/Table.elm | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'src/client/elm/LoggedIn/Home/View/Table.elm') diff --git a/src/client/elm/LoggedIn/Home/View/Table.elm b/src/client/elm/LoggedIn/Home/View/Table.elm index 429632c..6c12f31 100644 --- a/src/client/elm/LoggedIn/Home/View/Table.elm +++ b/src/client/elm/LoggedIn/Home/View/Table.elm @@ -14,8 +14,8 @@ import Html.Attributes exposing (..) import Html.Events exposing (..) import Dialog -import Dialog.Model as DialogModel -import Dialog.AddPaymentButton.View as AddPaymentButton +import Dialog.AddPayment.Model as AddPayment +import Dialog.AddPayment.View as AddPayment import Tooltip @@ -25,8 +25,7 @@ import LoggedData exposing (LoggedData) import LoggedIn.Msg as LoggedInMsg -import LoggedIn.Home.Msg as HomeMsg -import LoggedIn.Home.Model as HomeModel +import LoggedIn.Home.Model as Home import View.Date as Date import LoggedIn.View.Format as Format @@ -34,7 +33,7 @@ import Model.User exposing (getUserName) import Model.Payment as Payment exposing (..) import Model.Translations exposing (getMessage) -view : LoggedData -> HomeModel.Model -> Payments -> Frequency -> Html Msg +view : LoggedData -> Home.Model -> Payments -> Frequency -> Html Msg view loggedData homeModel payments frequency = let visiblePayments = payments @@ -48,7 +47,7 @@ view loggedData homeModel payments frequency = , if List.isEmpty visiblePayments then div - [ class "noPayment" ] + [ class "emptyTableMsg" ] [ text <| getMessage "NoPayment" loggedData.translations ] else text "" @@ -69,7 +68,7 @@ headerLine loggedData frequency = , div [ class "cell" ] [] ] -paymentLine : LoggedData -> HomeModel.Model -> Frequency -> Payment -> Html Msg +paymentLine : LoggedData -> Home.Model -> Frequency -> Payment -> Html Msg paymentLine loggedData homeModel frequency payment = div [ class "row" ] @@ -104,9 +103,9 @@ paymentLine loggedData homeModel frequency payment = , div [ class "cell button" ] [ let currentDate = Date.fromTime loggedData.currentTime - in AddPaymentButton.view + in AddPayment.button loggedData - (DialogModel.clonePaymentInitial loggedData.translations currentDate payment) + (AddPayment.initialClone loggedData.translations currentDate payment) "ClonePayment" (FontAwesome.clone Color.chestnutRose 18) (Just (getMessage "Clone" loggedData.translations)) @@ -117,11 +116,11 @@ paymentLine loggedData homeModel frequency payment = then text "" else - AddPaymentButton.view + AddPayment.button loggedData - (DialogModel.editPaymentInitial loggedData.translations payment) + (AddPayment.initialEdit loggedData.translations payment) "EditPayment" - (FontAwesome.edit Color.chestnutRose 18) + (FontAwesome.pencil Color.chestnutRose 18) (Just (getMessage "Edit" loggedData.translations)) ] , div -- cgit v1.2.3