aboutsummaryrefslogtreecommitdiff
path: root/src/client/View/LoggedIn/Table.elm
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/View/LoggedIn/Table.elm')
-rw-r--r--src/client/View/LoggedIn/Table.elm14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/client/View/LoggedIn/Table.elm b/src/client/View/LoggedIn/Table.elm
index 0c65e50..d98cee6 100644
--- a/src/client/View/LoggedIn/Table.elm
+++ b/src/client/View/LoggedIn/Table.elm
@@ -25,6 +25,7 @@ import Update.LoggedIn exposing (..)
import View.Icon exposing (renderIcon)
import View.Date exposing (..)
+import View.Price exposing (price)
paymentsTable : Model -> LoggedInView -> Html
paymentsTable model loggedInView =
@@ -53,13 +54,20 @@ paymentLines model loggedInView =
paymentLine : Model -> LoggedInView -> Payment -> Html
paymentLine model loggedInView payment =
a
- [ class ("row" ++ (if loggedInView.paymentEdition == Just payment.id then " edition" else ""))
+ [ classList
+ [ ("row", True)
+ , ("edition", loggedInView.paymentEdition == Just payment.id)
+ ]
, onClick actions.address (UpdateLoggedIn (ToggleEdit payment.id))
]
[ div [ class "cell category" ] [ text payment.name ]
, div
- [ class ("cell cost" ++ if payment.cost < 0 then " refund" else "") ]
- [ text ((toString payment.cost) ++ " " ++ (getMessage "MoneySymbol" model.translations)) ]
+ [ classList
+ [ ("cell cost", True)
+ , ("refund", payment.cost < 0)
+ ]
+ ]
+ [ text (price model payment.cost) ]
, div
[ class "cell user" ]
[ payment.userId