aboutsummaryrefslogtreecommitdiff
path: root/src/client/View/Payments
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/View/Payments')
-rw-r--r--src/client/View/Payments/Add.elm8
-rw-r--r--src/client/View/Payments/Table.elm18
2 files changed, 18 insertions, 8 deletions
diff --git a/src/client/View/Payments/Add.elm b/src/client/View/Payments/Add.elm
index c022d01..941f6b8 100644
--- a/src/client/View/Payments/Add.elm
+++ b/src/client/View/Payments/Add.elm
@@ -40,6 +40,7 @@ addPayment model addPayment =
[ id "nameInput"
, value addPayment.name
, on "input" targetValue (Signal.message actions.address << UpdatePayment << UpdateAdd << UpdateName)
+ , maxlength 20
]
[]
, label
@@ -57,6 +58,7 @@ addPayment model addPayment =
[ id "costInput"
, value addPayment.cost
, on "input" targetValue (Signal.message actions.address << UpdatePayment << UpdateAdd << UpdateCost)
+ , maxlength 7
]
[]
, label
@@ -67,8 +69,8 @@ addPayment model addPayment =
div [ class "errorMessage" ] [ text error ]
Nothing ->
text ""
- , button
- [ type' "submit" ]
- [ text (getMessage "Add" model.translations)]
]
+ , button
+ [ type' "submit" ]
+ [ text (getMessage "Add" model.translations)]
]
diff --git a/src/client/View/Payments/Table.elm b/src/client/View/Payments/Table.elm
index a180315..12b1a46 100644
--- a/src/client/View/Payments/Table.elm
+++ b/src/client/View/Payments/Table.elm
@@ -23,7 +23,7 @@ import Update exposing (..)
import Update.Payment exposing (..)
import View.Icon exposing (renderIcon)
-import View.Date exposing (renderDate)
+import View.Date exposing (..)
paymentsTable : Model -> PaymentView -> Html
paymentsTable model paymentView =
@@ -53,10 +53,18 @@ paymentLine model paymentView (id, payment) =
[ class ("row " ++ (if paymentView.edition == Just id then "edition" else ""))
, onClick actions.address (UpdatePayment (ToggleEdit id))
]
- [ div [ class "cell" ] [ text payment.name ]
- , 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) ]
+ [ div [ class "cell category" ] [ text payment.name ]
+ , div [ class "cell cost" ] [ text ((toString payment.cost) ++ " " ++ (getMessage "MoneySymbol" model.translations)) ]
+ , div [ class "cell user" ] [ text payment.userName ]
+ , div
+ [ class "cell date" ]
+ [ span
+ [ class "shortDate" ]
+ [ text (renderShortDate payment.creation model.translations) ]
+ , span
+ [ class "longDate" ]
+ [ text (renderLongDate payment.creation model.translations) ]
+ ]
, if paymentView.userName == payment.userName
then
div