aboutsummaryrefslogtreecommitdiff
path: root/src/client/View/Payments
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/View/Payments')
-rw-r--r--src/client/View/Payments/ExceedingPayer.elm24
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)) ]
+ ]