blob: 903ad5bc9b98dd26831e2ec399bf768abf644ca1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
module View.Payments.ExceedingPayer
( exceedingPayers
) where
import Html exposing (..)
import Html.Attributes exposing (..)
import List
import Model exposing (Model)
import Model.Payers exposing (..)
import Model.View.PaymentView exposing (PaymentView)
import Model.Translations exposing (getMessage)
exceedingPayers : Model -> PaymentView -> Html
exceedingPayers model paymentView =
div
[ class "exceedingPayers" ]
(List.map (exceedingPayer model) (getOrderedExceedingPayers paymentView.payers))
exceedingPayer : Model -> ExceedingPayer -> Html
exceedingPayer model payer =
div
[ class "exceedingPayer" ]
[ span [ class "userName" ] [ text payer.userName ]
, span [ class "amount" ] [ text ("+ " ++ (toString payer.amount) ++ " " ++ (getMessage "MoneySymbol" model.translations)) ]
]
|