diff options
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/View/Payments.elm | 2 | ||||
-rw-r--r-- | src/client/View/Payments/Add.elm | 2 | ||||
-rw-r--r-- | src/client/View/Payments/ExceedingPayer.elm | 14 | ||||
-rw-r--r-- | src/client/View/Payments/Table.elm | 5 |
4 files changed, 13 insertions, 10 deletions
diff --git a/src/client/View/Payments.elm b/src/client/View/Payments.elm index 03886f8..c38cc18 100644 --- a/src/client/View/Payments.elm +++ b/src/client/View/Payments.elm @@ -17,7 +17,7 @@ renderPayments : Model -> PaymentView -> Html renderPayments model paymentView = div [ class "payments" ] - [ exceedingPayers paymentView + [ exceedingPayers model paymentView , addPayment model paymentView.add , paymentsTable model paymentView ] diff --git a/src/client/View/Payments/Add.elm b/src/client/View/Payments/Add.elm index ce4738b..c022d01 100644 --- a/src/client/View/Payments/Add.elm +++ b/src/client/View/Payments/Add.elm @@ -61,7 +61,7 @@ addPayment model addPayment = [] , label [ for "costInput" ] - [ renderIcon "euro" ] + [ text (getMessage "MoneySymbol" model.translations) ] , case addPayment.costError of Just error -> div [ class "errorMessage" ] [ text error ] diff --git a/src/client/View/Payments/ExceedingPayer.elm b/src/client/View/Payments/ExceedingPayer.elm index cea8d66..903ad5b 100644 --- a/src/client/View/Payments/ExceedingPayer.elm +++ b/src/client/View/Payments/ExceedingPayer.elm @@ -6,19 +6,21 @@ 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 : PaymentView -> Html -exceedingPayers paymentView = +exceedingPayers : Model -> PaymentView -> Html +exceedingPayers model paymentView = div [ class "exceedingPayers" ] - (List.map exceedingPayer (getOrderedExceedingPayers paymentView.payers)) + (List.map (exceedingPayer model) (getOrderedExceedingPayers paymentView.payers)) -exceedingPayer : ExceedingPayer -> Html -exceedingPayer payer = +exceedingPayer : Model -> ExceedingPayer -> Html +exceedingPayer model payer = div [ class "exceedingPayer" ] [ span [ class "userName" ] [ text payer.userName ] - , span [ class "amount" ] [ text ("+ " ++ (toString payer.amount)) ] + , span [ class "amount" ] [ text ("+ " ++ (toString payer.amount) ++ " " ++ (getMessage "MoneySymbol" model.translations)) ] ] diff --git a/src/client/View/Payments/Table.elm b/src/client/View/Payments/Table.elm index 50dd151..a180315 100644 --- a/src/client/View/Payments/Table.elm +++ b/src/client/View/Payments/Table.elm @@ -15,6 +15,7 @@ import String exposing (append) import Model exposing (Model) import Model.Payment exposing (..) import Model.View.PaymentView exposing (PaymentView) +import Model.Translations exposing (getMessage) import ServerCommunication as SC exposing (serverCommunications) @@ -31,7 +32,7 @@ paymentsTable model paymentView = ([ div [ class "header" ] [ div [ class "cell category" ] [ renderIcon "shopping-cart" ] - , div [ class "cell cost" ] [ renderIcon "euro" ] + , div [ class "cell cost" ] [ text (getMessage "MoneySymbol" model.translations) ] , div [ class "cell user" ] [ renderIcon "user" ] , div [ class "cell date" ] [ renderIcon "calendar" ] , div [ class "cell" ] [] @@ -53,7 +54,7 @@ paymentLine model paymentView (id, payment) = , onClick actions.address (UpdatePayment (ToggleEdit id)) ] [ div [ class "cell" ] [ text payment.name ] - , div [ class "cell" ] [ text ((toString payment.cost) ++ " €") ] + , div [ class "cell" ] [ text ((toString payment.cost) ++ " " ++ (getMessage "MoneySymbol" model.translations)) ] , div [ class "cell" ] [ text payment.userName ] , div [ class "cell" ] [ text (renderDate payment.creation model.translations) ] , if paymentView.userName == payment.userName |