diff options
author | Joris | 2016-01-02 22:45:20 +0100 |
---|---|---|
committer | Joris | 2016-01-02 22:45:20 +0100 |
commit | fc9a3ca6a5226f78a3a0ec51af3d8d287ccb2e1b (patch) | |
tree | e05a710b30f749048bb668db1501d2369fa4e666 /src/client/elm/Update/LoggedIn | |
parent | 25d15aacb940c2a19cae3b2e3d8d3ebd1972be02 (diff) |
Merge deletePayment with deleteMonthlyPayment
Diffstat (limited to 'src/client/elm/Update/LoggedIn')
-rw-r--r-- | src/client/elm/Update/LoggedIn/AddPayment.elm | 1 | ||||
-rw-r--r-- | src/client/elm/Update/LoggedIn/Monthly.elm | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/client/elm/Update/LoggedIn/AddPayment.elm b/src/client/elm/Update/LoggedIn/AddPayment.elm index 62eda85..978980d 100644 --- a/src/client/elm/Update/LoggedIn/AddPayment.elm +++ b/src/client/elm/Update/LoggedIn/AddPayment.elm @@ -4,6 +4,7 @@ module Update.LoggedIn.AddPayment import Model.Action.AddPaymentAction exposing (..) import Model.View.LoggedIn.AddPayment exposing (..) +import Model.Payment exposing (PaymentFrequency(..)) updateAddPayment : AddPaymentAction -> AddPayment -> AddPayment updateAddPayment action addPayment = diff --git a/src/client/elm/Update/LoggedIn/Monthly.elm b/src/client/elm/Update/LoggedIn/Monthly.elm index 2505091..3741e1f 100644 --- a/src/client/elm/Update/LoggedIn/Monthly.elm +++ b/src/client/elm/Update/LoggedIn/Monthly.elm @@ -15,7 +15,7 @@ updateMonthly action monthly = | payments = payment :: monthly.payments , visibleDetail = True } - DeletePayment id -> + DeletePayment payment -> { monthly - | payments = List.filter (\payment -> payment.id /= id) monthly.payments + | payments = List.filter (((/=) payment.id) << .id) monthly.payments } |