diff options
Diffstat (limited to 'src/client/Update')
-rw-r--r-- | src/client/Update/Payment.elm | 5 |
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 } |