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.elm12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/client/elm/Model/Payment.elm b/src/client/elm/Model/Payment.elm
index e792c6c..27d5bed 100644
--- a/src/client/elm/Model/Payment.elm
+++ b/src/client/elm/Model/Payment.elm
@@ -8,8 +8,8 @@ module Model.Payment
, paymentIdDecoder
, deletePayment
, totalPayments
- , punctualPayments
- , monthlyPayments
+ , punctual
+ , monthly
) where
import Date exposing (..)
@@ -76,8 +76,8 @@ totalPayments paymentFilter userId payments =
|> List.map .cost
|> List.sum
-punctualPayments : Payments -> Payments
-punctualPayments = List.filter ((==) Punctual << .frequency)
+punctual : Payments -> Payments
+punctual = List.filter ((==) Punctual << .frequency)
-monthlyPayments : Payments -> Payments
-monthlyPayments = List.filter ((==) Monthly << .frequency)
+monthly : UserId -> Payments -> Payments
+monthly userId = List.filter (\p -> p.frequency == Monthly && p.userId == userId)