aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/Model
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/elm/Model')
-rw-r--r--src/client/elm/Model/Payment.elm4
1 files changed, 4 insertions, 0 deletions
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)