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)) ] ]