aboutsummaryrefslogtreecommitdiff
path: root/src/client/View/LoggedIn
diff options
context:
space:
mode:
authorJoris2015-09-06 16:50:44 +0200
committerJoris2015-09-06 16:50:44 +0200
commitae6fddcbf400ca5ed0f0c5671f9422f910f4a401 (patch)
tree697f8276c13674efd3d854dce5608bf48d47f508 /src/client/View/LoggedIn
parent3853811450d4fe801da996eb48825049c3541030 (diff)
Sorting monthly payments by name
Diffstat (limited to 'src/client/View/LoggedIn')
-rw-r--r--src/client/View/LoggedIn/Monthly.elm7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/client/View/LoggedIn/Monthly.elm b/src/client/View/LoggedIn/Monthly.elm
index 14c3de7..715288b 100644
--- a/src/client/View/LoggedIn/Monthly.elm
+++ b/src/client/View/LoggedIn/Monthly.elm
@@ -2,6 +2,8 @@ module View.LoggedIn.Monthly
( monthlyPayments
) where
+import String
+
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
@@ -54,7 +56,10 @@ paymentsTable : Model -> LoggedInView -> Monthly -> Html
paymentsTable model loggedInView monthly =
div
[ class "table" ]
- ( List.map (paymentLine model loggedInView) monthly.payments )
+ ( monthly.payments
+ |> List.sortBy (String.toLower << .name)
+ |> List.map (paymentLine model loggedInView)
+ )
paymentLine : Model -> LoggedInView -> Payment -> Html
paymentLine model loggedInView payment =