aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/LoggedIn/Home/View/Table.elm
diff options
context:
space:
mode:
authorJoris2016-08-08 20:58:17 +0200
committerJoris2016-08-08 20:58:17 +0200
commit8816cf758119a6a2073e561c8df297a833630986 (patch)
tree20e63f3c0de15945b818a6d7a78359f9134b5e82 /src/client/elm/LoggedIn/Home/View/Table.elm
parentb54d8e45fc8784d8fa6eaa03f58536b7a19cf70b (diff)
downloadbudget-8816cf758119a6a2073e561c8df297a833630986.tar.gz
budget-8816cf758119a6a2073e561c8df297a833630986.tar.bz2
budget-8816cf758119a6a2073e561c8df297a833630986.zip
Show incomes in a table and update like payments are updated
Diffstat (limited to 'src/client/elm/LoggedIn/Home/View/Table.elm')
-rw-r--r--src/client/elm/LoggedIn/Home/View/Table.elm23
1 files changed, 11 insertions, 12 deletions
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