From 5f3d75406ef36924616e3289342647f4939d5004 Mon Sep 17 00:00:00 2001 From: Joris Date: Fri, 1 Jan 2016 13:00:51 +0100 Subject: Fix add and delete payment --- src/client/elm/Model/Payment.elm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/client/elm/Model') diff --git a/src/client/elm/Model/Payment.elm b/src/client/elm/Model/Payment.elm index c4a8963..cabdd43 100644 --- a/src/client/elm/Model/Payment.elm +++ b/src/client/elm/Model/Payment.elm @@ -5,6 +5,7 @@ module Model.Payment , PaymentId , paymentsDecoder , paymentIdDecoder + , deletePayment ) where import Date exposing (..) @@ -42,3 +43,6 @@ paymentDecoder = paymentIdDecoder : Json.Decoder PaymentId paymentIdDecoder = Json.int + +deletePayment : PaymentId -> Payments -> Payments +deletePayment paymentId = List.filter (((/=) paymentId) << .id) -- cgit v1.2.3