diff options
author | Joris | 2015-10-04 20:48:32 +0200 |
---|---|---|
committer | Joris | 2015-10-04 20:48:32 +0200 |
commit | 8c24464a4bd0a486cd0ddf846d3b5a323a7aaa9a (patch) | |
tree | cdd1bb79846b3d8865d833a122152528b03a4746 /src/client/View/LoggedIn/Monthly.elm | |
parent | 303dfd66c6434e19ba226a133a35a74a557b3e93 (diff) |
Using incomes to compute a fair computation to designate the payer
Diffstat (limited to 'src/client/View/LoggedIn/Monthly.elm')
-rw-r--r-- | src/client/View/LoggedIn/Monthly.elm | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/client/View/LoggedIn/Monthly.elm b/src/client/View/LoggedIn/Monthly.elm index 9195479..a274015 100644 --- a/src/client/View/LoggedIn/Monthly.elm +++ b/src/client/View/LoggedIn/Monthly.elm @@ -27,15 +27,19 @@ import View.Price exposing (price) monthlyPayments : Model -> LoggedInView -> Html monthlyPayments model loggedInView = let monthly = loggedInView.monthly - in div - [ classList - [ ("monthlyPayments", True) - , ("detail", monthly.visibleDetail) + in if List.length monthly.payments == 0 + then + text "" + else + div + [ classList + [ ("monthlyPayments", True) + , ("detail", monthly.visibleDetail) + ] + ] + [ monthlyCount model monthly + , if monthly.visibleDetail then paymentsTable model loggedInView monthly else text "" ] - ] - [ monthlyCount model monthly - , if monthly.visibleDetail then paymentsTable model loggedInView monthly else text "" - ] monthlyCount : Model -> Monthly -> Html monthlyCount model monthly = |