aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/Model
diff options
context:
space:
mode:
authorJoris2016-01-01 13:00:51 +0100
committerJoris2016-01-01 13:00:51 +0100
commit5f3d75406ef36924616e3289342647f4939d5004 (patch)
treee19bfce420ef53ee93548f2e0ee1e248b7630e89 /src/client/elm/Model
parentb73ba24f3440b81698c9d5c370739d03f958f059 (diff)
Fix add and delete payment
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)