diff options
author | Joris | 2015-08-29 13:30:09 +0200 |
---|---|---|
committer | Joris | 2015-08-29 13:30:09 +0200 |
commit | 6b466f616035c2fc03359d182c074f096d6b7f17 (patch) | |
tree | 47708f2e96614d71059f98c757d6a3fe88c8b923 /src/client/View/Payments | |
parent | aa7f70d172be9ef322f9a0d19d1d9d9489f9fa75 (diff) |
Showing exceeding payers
Diffstat (limited to 'src/client/View/Payments')
-rw-r--r-- | src/client/View/Payments/ExceedingPayer.elm | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/client/View/Payments/ExceedingPayer.elm b/src/client/View/Payments/ExceedingPayer.elm new file mode 100644 index 0000000..cea8d66 --- /dev/null +++ b/src/client/View/Payments/ExceedingPayer.elm @@ -0,0 +1,24 @@ +module View.Payments.ExceedingPayer + ( exceedingPayers + ) where + +import Html exposing (..) +import Html.Attributes exposing (..) +import List + +import Model.Payers exposing (..) +import Model.View.PaymentView exposing (PaymentView) + +exceedingPayers : PaymentView -> Html +exceedingPayers paymentView = + div + [ class "exceedingPayers" ] + (List.map exceedingPayer (getOrderedExceedingPayers paymentView.payers)) + +exceedingPayer : ExceedingPayer -> Html +exceedingPayer payer = + div + [ class "exceedingPayer" ] + [ span [ class "userName" ] [ text payer.userName ] + , span [ class "amount" ] [ text ("+ " ++ (toString payer.amount)) ] + ] |