diff options
author | Joris | 2016-04-06 14:44:18 +0200 |
---|---|---|
committer | Joris | 2016-04-06 14:44:18 +0200 |
commit | f101c20c9da59c8c644d3cb6fa0b1d08f63e40e4 (patch) | |
tree | 3d946095e1ed5cf78b660f93da0d0fc99fb355d8 /src/client/elm/LoggedIn/Stat | |
parent | ac8a7c6210e2f430a3015e8004ff0726ef24d63b (diff) |
Use translated month in stat page
Diffstat (limited to 'src/client/elm/LoggedIn/Stat')
-rw-r--r-- | src/client/elm/LoggedIn/Stat/View.elm | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/client/elm/LoggedIn/Stat/View.elm b/src/client/elm/LoggedIn/Stat/View.elm index a289002..f4bc56c 100644 --- a/src/client/elm/LoggedIn/Stat/View.elm +++ b/src/client/elm/LoggedIn/Stat/View.elm @@ -2,6 +2,8 @@ module LoggedIn.Stat.View ( view ) where +import Date exposing (Month) + import Html exposing (..) import Html.Attributes exposing (..) @@ -12,6 +14,7 @@ import Model.Conf exposing (Conf) import Model.Translations exposing (getMessage) import LoggedIn.View.Format as Format +import LoggedIn.View.Date as Date import View.Plural exposing (plural) @@ -46,18 +49,18 @@ monthsDetail loggedData = [] ( Payment.punctual loggedData.payments |> Payment.groupAndSortByMonth - |> List.map (monthDetail loggedData.conf) + |> List.map (monthDetail loggedData) ) -monthDetail : Conf -> ((Int, Int), Payments) -> Html -monthDetail conf ((year, month), payments) = +monthDetail : LoggedData -> ((Month, Int), Payments) -> Html +monthDetail loggedData ((month, year), payments) = li [] - [ text (toString month) - , text "/" + [ text (Date.renderMonth loggedData.translations month) + , text " " , text (toString year) , text " − " - , text (paymentsSum conf payments) + , text (paymentsSum loggedData.conf payments) ] paymentsSum : Conf -> Payments -> String |