aboutsummaryrefslogtreecommitdiff
path: root/src/client/Update
diff options
context:
space:
mode:
authorJoris Guyonvarch2015-08-14 10:29:43 +0200
committerJoris Guyonvarch2015-08-14 10:31:01 +0200
commit006d54bf4ac4dd9e05d62d0007759f28740fd77a (patch)
tree77b06a10c5a747777327811bafc91bc1560eea9f /src/client/Update
parentd25b857d8317d729995d6aa25db7a83fe92a07ef (diff)
One payment is clickable and set to orange for the moment
Diffstat (limited to 'src/client/Update')
-rw-r--r--src/client/Update/Payment.elm5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/Update/Payment.elm b/src/client/Update/Payment.elm
index 7826098..817a3f0 100644
--- a/src/client/Update/Payment.elm
+++ b/src/client/Update/Payment.elm
@@ -15,7 +15,8 @@ import Update.Payment.Add exposing (..)
type PaymentAction =
UpdateAdd AddPaymentAction
| UpdatePayments Payments
- | AddPayment String String Int
+ | AddPayment PaymentId String Int
+ | ToggleEdit PaymentId
updatePayment : Model -> PaymentAction -> PaymentView -> PaymentView
updatePayment model action paymentView =
@@ -36,3 +37,5 @@ updatePayment model action paymentView =
| payments <- payment :: paymentView.payments
, add <- initAddPayment
}
+ ToggleEdit id ->
+ { paymentView | edition <- if paymentView.edition == Just id then Nothing else Just id }