aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/LoggedIn/Income/View.elm
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/elm/LoggedIn/Income/View.elm')
-rw-r--r--src/client/elm/LoggedIn/Income/View.elm33
1 files changed, 17 insertions, 16 deletions
diff --git a/src/client/elm/LoggedIn/Income/View.elm b/src/client/elm/LoggedIn/Income/View.elm
index 2c5bcaf..00a1646 100644
--- a/src/client/elm/LoggedIn/Income/View.elm
+++ b/src/client/elm/LoggedIn/Income/View.elm
@@ -12,7 +12,6 @@ import FontAwesome
import Html exposing (..)
import Html.Events exposing (..)
import Html.Attributes exposing (..)
-import Html.App as Html
import Form exposing (Form)
import View.Form as Form
@@ -45,19 +44,21 @@ view : LoggedData -> Income.Model -> Html Msg
view loggedData incomeModel =
div
[ class "income" ]
- [ case useIncomesFrom loggedData.users loggedData.incomes loggedData.payments of
- Just since -> cumulativeIncomesView loggedData since
- Nothing -> text ""
- , div
- [ class "textual monthlyNetIncomes" ]
- [ h1 [] [ text <| getMessage loggedData.translations "MonthlyNetIncomes" ]
- , AddIncome.button
- "addIncome"
- loggedData
- (AddIncome.initialAdd loggedData.translations (Date.fromTime loggedData.currentTime))
- "AddIncome"
- (text (getMessage loggedData.translations "AddIncome"))
- Nothing
+ [ div
+ [ class "withMargin" ]
+ [ case useIncomesFrom loggedData.users loggedData.incomes loggedData.payments of
+ Just since -> cumulativeIncomesView loggedData since
+ Nothing -> text ""
+ , div
+ [ class "titleButton" ]
+ [ h1 [] [ text <| getMessage loggedData.translations "MonthlyNetIncomes" ]
+ , AddIncome.button
+ loggedData
+ (AddIncome.initialAdd loggedData.translations (Date.fromTime loggedData.currentTime))
+ "AddIncome"
+ (text (getMessage loggedData.translations "AddIncome"))
+ Nothing
+ ]
]
, Table.view loggedData incomeModel
]
@@ -66,7 +67,7 @@ cumulativeIncomesView : LoggedData -> Time -> Html Msg
cumulativeIncomesView loggedData since =
let longDate = Date.longView (Date.fromTime since) loggedData.translations
in div
- [ class "textual" ]
+ []
[ h1 [] [ text <| getParamMessage [longDate] loggedData.translations "CumulativeIncomesSince" ]
, ul
[]
@@ -74,7 +75,7 @@ cumulativeIncomesView loggedData since =
|> List.map (\(userId, user) ->
(user.name, userCumulativeIncomeSince loggedData.currentTime since loggedData.incomes userId)
)
- |> List.sortBy snd
+ |> List.sortBy Tuple.second
|> List.map (\(userName, cumulativeIncome) ->
li
[]