aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/LoggedIn/Home/View
diff options
context:
space:
mode:
authorJoris2016-06-27 14:36:03 +0200
committerJoris2016-06-27 14:36:03 +0200
commitf605541cbaaa3c339eef8f345547bcd653d3f721 (patch)
tree1e800df7736e482290ca138726595e067e4a5cf9 /src/client/elm/LoggedIn/Home/View
parent885dfd7708e338a3220c85b7f22a3ac267aad3f7 (diff)
Add the edit functionnality on payments
Diffstat (limited to 'src/client/elm/LoggedIn/Home/View')
-rw-r--r--src/client/elm/LoggedIn/Home/View/Table.elm14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/client/elm/LoggedIn/Home/View/Table.elm b/src/client/elm/LoggedIn/Home/View/Table.elm
index d2087bb..ebffeb9 100644
--- a/src/client/elm/LoggedIn/Home/View/Table.elm
+++ b/src/client/elm/LoggedIn/Home/View/Table.elm
@@ -64,6 +64,7 @@ headerLine loggedData frequency =
Monthly -> text ""
, div [ class "cell" ] []
, div [ class "cell" ] []
+ , div [ class "cell" ] []
]
paymentLine : LoggedData -> HomeModel.Model -> Frequency -> Payment -> Html Msg
@@ -104,6 +105,7 @@ paymentLine loggedData homeModel frequency payment =
in AddPaymentButton.view
loggedData
(DialogModel.clonePaymentInitial loggedData.translations currentDate payment)
+ "ClonePayment"
(FontAwesome.clone Color.chestnutRose 18)
]
, div
@@ -112,6 +114,18 @@ paymentLine loggedData homeModel frequency payment =
then
text ""
else
+ AddPaymentButton.view
+ loggedData
+ (DialogModel.editPaymentInitial loggedData.translations payment)
+ "EditPayment"
+ (FontAwesome.edit Color.chestnutRose 18)
+ ]
+ , div
+ [ class "cell button" ]
+ [ if loggedData.me /= payment.userId
+ then
+ text ""
+ else
let dialogConfig =
{ className = "paymentDialog"
, title = getMessage "ConfirmPaymentDelete" loggedData.translations