diff options
author | Joris | 2016-01-01 13:00:51 +0100 |
---|---|---|
committer | Joris | 2016-01-01 13:00:51 +0100 |
commit | 5f3d75406ef36924616e3289342647f4939d5004 (patch) | |
tree | e19bfce420ef53ee93548f2e0ee1e248b7630e89 /src/client/elm/Model | |
parent | b73ba24f3440b81698c9d5c370739d03f958f059 (diff) |
Fix add and delete payment
Diffstat (limited to 'src/client/elm/Model')
-rw-r--r-- | src/client/elm/Model/Payment.elm | 4 |
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) |