aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/View/LoggedIn/Paging.elm
diff options
context:
space:
mode:
authorJoris2015-12-31 19:34:29 +0100
committerJoris2015-12-31 19:34:29 +0100
commitb73ba24f3440b81698c9d5c370739d03f958f059 (patch)
tree72caa19d605d9e9af2d43a6f62c177ddb3d0f3b3 /src/client/elm/View/LoggedIn/Paging.elm
parent5bfd349bedb9c395cbeb38bb888e379ba36d5d35 (diff)
downloadbudget-b73ba24f3440b81698c9d5c370739d03f958f059.tar.gz
budget-b73ba24f3440b81698c9d5c370739d03f958f059.tar.bz2
budget-b73ba24f3440b81698c9d5c370739d03f958f059.zip
Fetch all the payments, do the paging only in the UI
Diffstat (limited to 'src/client/elm/View/LoggedIn/Paging.elm')
-rw-r--r--src/client/elm/View/LoggedIn/Paging.elm14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/client/elm/View/LoggedIn/Paging.elm b/src/client/elm/View/LoggedIn/Paging.elm
index 608113b..e40c5aa 100644
--- a/src/client/elm/View/LoggedIn/Paging.elm
+++ b/src/client/elm/View/LoggedIn/Paging.elm
@@ -9,8 +9,6 @@ import Html.Events exposing (..)
import Model.View.LoggedInView exposing (..)
import Model.Payment exposing (perPage)
-import ServerCommunication as SC exposing (serverCommunications)
-
import Update exposing (..)
import Update.LoggedIn exposing (..)
@@ -58,7 +56,7 @@ firstPage : Html
firstPage =
button
[ class "page"
- , onClick serverCommunications.address (SC.UpdatePage 1)
+ , onClick actions.address (UpdateLoggedIn (UpdatePage 1))
]
[ renderIcon "fast-backward" ]
@@ -66,7 +64,7 @@ previousPage : LoggedInView -> Html
previousPage loggedInView =
button
[ class "page"
- , onClick serverCommunications.address (SC.UpdatePage (loggedInView.currentPage - 1))
+ , onClick actions.address (UpdateLoggedIn (UpdatePage (loggedInView.currentPage - 1)))
]
[ renderIcon "backward" ]
@@ -74,7 +72,7 @@ nextPage : LoggedInView -> Html
nextPage loggedInView =
button
[ class "page"
- , onClick serverCommunications.address (SC.UpdatePage (loggedInView.currentPage + 1))
+ , onClick actions.address (UpdateLoggedIn (UpdatePage (loggedInView.currentPage + 1)))
]
[ renderIcon "forward" ]
@@ -82,7 +80,7 @@ lastPage : Int -> Html
lastPage maxPage =
button
[ class "page"
- , onClick serverCommunications.address (SC.UpdatePage maxPage)
+ , onClick actions.address (UpdateLoggedIn (UpdatePage maxPage))
]
[ renderIcon "fast-forward" ]
@@ -94,7 +92,7 @@ paymentsPage loggedInView page =
[ ("page", True)
, ("current", onCurrentPage)
]
- , onClick serverCommunications.address <|
- if onCurrentPage then SC.NoCommunication else SC.UpdatePage page
+ , onClick actions.address <|
+ if onCurrentPage then NoOp else UpdateLoggedIn (UpdatePage page)
]
[ text (toString page) ]