aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/Model/Payment.elm
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/elm/Model/Payment.elm')
-rw-r--r--src/client/elm/Model/Payment.elm6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/elm/Model/Payment.elm b/src/client/elm/Model/Payment.elm
index d9a5d68..7a6c630 100644
--- a/src/client/elm/Model/Payment.elm
+++ b/src/client/elm/Model/Payment.elm
@@ -15,6 +15,7 @@ module Model.Payment exposing
)
import Date exposing (..)
+import Date.Extra.Core exposing (monthToInt, intToMonth)
import Json.Decode as Json exposing ((:=))
import String
@@ -22,7 +23,6 @@ import Model.User exposing (UserId, userIdDecoder)
import Model.Date exposing (dateDecoder)
import Utils.List as List
-import Utils.Date as Date
perPage : Int
perPage = 8
@@ -91,9 +91,9 @@ monthly userId = List.filter (\p -> p.frequency == Monthly && p.userId == userId
groupAndSortByMonth : Payments -> List ((Month, Int), Payments)
groupAndSortByMonth payments =
payments
- |> List.groupBy (\payment -> (Date.year payment.creation, Date.monthToNum << Date.month <| payment.creation))
+ |> List.groupBy (\payment -> (Date.year payment.creation, monthToInt << Date.month <| payment.creation))
|> List.sortBy fst
- |> List.map (\((year, month), payments) -> ((Date.numToMonth month, year), payments))
+ |> List.map (\((year, month), payments) -> ((intToMonth month, year), payments))
|> List.reverse
sortedFiltredPunctual : String -> Payments -> Payments