diff options
Diffstat (limited to 'src/client/Model/Income.elm')
-rw-r--r-- | src/client/Model/Income.elm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/Model/Income.elm b/src/client/Model/Income.elm index ce30772..97a5652 100644 --- a/src/client/Model/Income.elm +++ b/src/client/Model/Income.elm @@ -25,9 +25,9 @@ incomeDecoder = ("creation" := timeDecoder) ("amount" := Json.int) -incomeDefinedForAll : List (UserId, List Income) -> Maybe Time +incomeDefinedForAll : List (List Income) -> Maybe Time incomeDefinedForAll usersIncomes = - let firstIncomes = map (head << sortBy .creation << snd) usersIncomes + let firstIncomes = map (head << sortBy .creation) usersIncomes in if all isJust firstIncomes then head << reverse << List.sort << map .creation << catMaybes <| firstIncomes else Nothing |