aboutsummaryrefslogtreecommitdiff
path: root/src/client/View/LoggedIn/Monthly.elm
diff options
context:
space:
mode:
authorJoris2015-09-13 10:27:47 +0200
committerJoris2015-09-13 10:27:47 +0200
commite56aaedad92f8585a70277edce8ed8ad065d681c (patch)
tree3a51730f6f4d9a0e69569a551731b39128a70cda /src/client/View/LoggedIn/Monthly.elm
parenta48e79e2f7c1ab1ffb52b86ef9e900c75c5d023b (diff)
downloadbudget-e56aaedad92f8585a70277edce8ed8ad065d681c.tar.gz
budget-e56aaedad92f8585a70277edce8ed8ad065d681c.tar.bz2
budget-e56aaedad92f8585a70277edce8ed8ad065d681c.zip
Using flexbox for the add payment form
Diffstat (limited to 'src/client/View/LoggedIn/Monthly.elm')
-rw-r--r--src/client/View/LoggedIn/Monthly.elm20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/client/View/LoggedIn/Monthly.elm b/src/client/View/LoggedIn/Monthly.elm
index 518724b..9195479 100644
--- a/src/client/View/LoggedIn/Monthly.elm
+++ b/src/client/View/LoggedIn/Monthly.elm
@@ -42,19 +42,13 @@ 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 if count == 0
- then
- div
- [ class "count" ]
- [ text (getMessage "NoMonthlyPayment" model.translations) ]
- else
- button
- [ class "count"
- , onClick actions.address (UpdateLoggedIn << UpdateMonthly <| ToggleDetail)
- ]
- [ text (getParamMessage [toString count, price model total] key model.translations)
- , expand ExpandDown monthly.visibleDetail
- ]
+ in button
+ [ class "header"
+ , onClick actions.address (UpdateLoggedIn << UpdateMonthly <| ToggleDetail)
+ ]
+ [ text (getParamMessage [toString count, price model total] key model.translations)
+ , expand ExpandDown monthly.visibleDetail
+ ]
paymentsTable : Model -> LoggedInView -> Monthly -> Html
paymentsTable model loggedInView monthly =