aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/LoggedIn/Home/View
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/elm/LoggedIn/Home/View')
-rw-r--r--src/client/elm/LoggedIn/Home/View/Expand.elm29
-rw-r--r--src/client/elm/LoggedIn/Home/View/Table.elm23
2 files changed, 11 insertions, 41 deletions
diff --git a/src/client/elm/LoggedIn/Home/View/Expand.elm b/src/client/elm/LoggedIn/Home/View/Expand.elm
deleted file mode 100644
index 2bcfec1..0000000
--- a/src/client/elm/LoggedIn/Home/View/Expand.elm
+++ /dev/null
@@ -1,29 +0,0 @@
-module LoggedIn.Home.View.Expand exposing
- ( expand
- , ExpandType(..)
- )
-
-import View.Color as Color
-
-import FontAwesome
-
-import Html exposing (..)
-import Html.Attributes exposing (..)
-
-import Msg exposing (Msg)
-
-type ExpandType = ExpandUp | ExpandDown
-
-expand : ExpandType -> Bool -> Html Msg
-expand expandType isExpanded =
- div
- [ class "expand" ]
- [ (chevronIcon expandType isExpanded) Color.white 15 ]
-
-chevronIcon : ExpandType -> Bool -> (Color -> Int -> Html msg)
-chevronIcon expandType isExpanded =
- case (expandType, isExpanded) of
- (ExpandUp, True) -> FontAwesome.chevron_down
- (ExpandUp, False) -> FontAwesome.chevron_up
- (ExpandDown, True) -> FontAwesome.chevron_up
- (ExpandDown, False) -> FontAwesome.chevron_down
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