diff options
Diffstat (limited to 'src/client/elm/LoggedIn/Home/View/Monthly.elm')
-rw-r--r-- | src/client/elm/LoggedIn/Home/View/Monthly.elm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/client/elm/LoggedIn/Home/View/Monthly.elm b/src/client/elm/LoggedIn/Home/View/Monthly.elm index 487c05d..c1f3b51 100644 --- a/src/client/elm/LoggedIn/Home/View/Monthly.elm +++ b/src/client/elm/LoggedIn/Home/View/Monthly.elm @@ -15,7 +15,7 @@ import LoggedIn.Home.Model as HomeModel import LoggedIn.Home.View.Price exposing (price) import LoggedIn.Home.View.Expand exposing (..) -import Model.Payment as Payment exposing (Payment) +import Model.Payment as Payment exposing (Payment, monthlyPayments) import Model.Translations exposing (getMessage, getParamMessage) import LoggedData exposing (LoggedData) @@ -26,7 +26,7 @@ import View.Icon exposing (renderIcon) view : LoggedData -> HomeModel.Model -> Html view loggedData homeModel = - if List.length loggedData.monthlyPayments == 0 + if List.length (monthlyPayments loggedData.payments) == 0 then text "" else @@ -44,8 +44,8 @@ view loggedData homeModel = monthlyCount : LoggedData -> HomeModel.Model -> Html monthlyCount loggedData homeModel = - let count = List.length loggedData.monthlyPayments - total = List.sum << List.map .cost <| loggedData.monthlyPayments + let count = List.length (monthlyPayments loggedData.payments) + total = List.sum << List.map .cost <| (monthlyPayments loggedData.payments) key = if count > 1 then "PluralMonthlyCount" else "SingularMonthlyCount" in button [ class "header" @@ -59,7 +59,7 @@ paymentsTable : LoggedData -> HomeModel.Model -> Html paymentsTable loggedData homeModel = div [ class "table" ] - ( loggedData.monthlyPayments + ( (monthlyPayments loggedData.payments) |> List.sortBy (String.toLower << .name) |> List.map (paymentLine loggedData homeModel) ) |