diff options
author | Joris | 2015-09-06 19:29:07 +0200 |
---|---|---|
committer | Joris | 2015-09-06 19:29:07 +0200 |
commit | dab9e42dae6e5287935e5dfc418fcb2adf036b9a (patch) | |
tree | 1caa783df89c38a3d527c259824da4709311620d /src/client/View | |
parent | 082faae086433440b76c533d1a5afd22e7baafe1 (diff) |
Showing the total amount of monthly payments
Diffstat (limited to 'src/client/View')
-rw-r--r-- | src/client/View/LoggedIn/Monthly.elm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/View/LoggedIn/Monthly.elm b/src/client/View/LoggedIn/Monthly.elm index 715288b..6d30e4a 100644 --- a/src/client/View/LoggedIn/Monthly.elm +++ b/src/client/View/LoggedIn/Monthly.elm @@ -38,12 +38,13 @@ monthlyPayments model loggedInView = monthlyCount : Model -> Monthly -> Html monthlyCount model monthly = let count = List.length monthly.payments + total = List.sum << List.map .cost <| monthly.payments key = if count > 1 then "PluralMonthlyCount" else "SingularMonthlyCount" in button [ class "count" , onClick actions.address (UpdateLoggedIn << UpdateMonthly <| ToggleDetail) ] - [ text (getParamMessage [toString count] key model.translations) + [ text (getParamMessage [toString count, toString total] key model.translations) , div [ class "expand" ] [ if monthly.visibleDetail |