diff options
author | Joris | 2015-09-12 23:57:16 +0200 |
---|---|---|
committer | Joris | 2015-09-12 23:57:16 +0200 |
commit | a48e79e2f7c1ab1ffb52b86ef9e900c75c5d023b (patch) | |
tree | 05a613aef2d338f10bcdd394e520450656ed8f1c /src/client/View/LoggedIn/Table.elm | |
parent | d87dbd1360c14df83552fd757438c23e5d7b9f9c (diff) |
Adding UI income read-only
Diffstat (limited to 'src/client/View/LoggedIn/Table.elm')
-rw-r--r-- | src/client/View/LoggedIn/Table.elm | 14 |
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 |