From 006d54bf4ac4dd9e05d62d0007759f28740fd77a Mon Sep 17 00:00:00 2001 From: Joris Guyonvarch Date: Fri, 14 Aug 2015 10:29:43 +0200 Subject: One payment is clickable and set to orange for the moment --- src/client/Update/Payment.elm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/client/Update/Payment.elm') 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 } -- cgit v1.2.3