From fb5629d7f705b7e80dcf1852da58d2864c2b0d25 Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 19 Jun 2016 01:00:53 +0200 Subject: Show payment count and sum right after search --- src/client/elm/LoggedIn/Home/View/Monthly.elm | 2 +- src/client/elm/LoggedIn/Home/View/Paging.elm | 4 ++-- src/client/elm/LoggedIn/Home/View/Search.elm | 26 -------------------------- 3 files changed, 3 insertions(+), 29 deletions(-) delete mode 100644 src/client/elm/LoggedIn/Home/View/Search.elm (limited to 'src/client/elm/LoggedIn/Home/View') diff --git a/src/client/elm/LoggedIn/Home/View/Monthly.elm b/src/client/elm/LoggedIn/Home/View/Monthly.elm index 398059c..20dda19 100644 --- a/src/client/elm/LoggedIn/Home/View/Monthly.elm +++ b/src/client/elm/LoggedIn/Home/View/Monthly.elm @@ -33,7 +33,7 @@ view loggedData homeModel = else div [ classList - [ ("monthlyPayments", True) + [ ("monthly", True) , ("detail", homeModel.monthlyDetail) ] ] diff --git a/src/client/elm/LoggedIn/Home/View/Paging.elm b/src/client/elm/LoggedIn/Home/View/Paging.elm index fb78810..da69232 100644 --- a/src/client/elm/LoggedIn/Home/View/Paging.elm +++ b/src/client/elm/LoggedIn/Home/View/Paging.elm @@ -22,8 +22,8 @@ import Model.Payment as Payment exposing (Payments, perPage) showedPages : Int showedPages = 5 -paymentsPaging : Payments -> HomeModel.Model -> Html Msg -paymentsPaging payments homeModel = +paymentsPaging : HomeModel.Model -> Payments -> Html Msg +paymentsPaging homeModel payments = let maxPage = ceiling (toFloat (List.length payments) / toFloat perPage) pages = truncatePages homeModel.currentPage [1..maxPage] in if maxPage == 1 diff --git a/src/client/elm/LoggedIn/Home/View/Search.elm b/src/client/elm/LoggedIn/Home/View/Search.elm deleted file mode 100644 index 62db1b2..0000000 --- a/src/client/elm/LoggedIn/Home/View/Search.elm +++ /dev/null @@ -1,26 +0,0 @@ -module LoggedIn.Home.View.Search exposing - ( paymentsSearch - ) - -import Html exposing (..) -import Html.Attributes exposing (..) -import Html.Events exposing (..) -import Html.App as Html - -import Form exposing (Form) -import View.Form as Form - -import Msg exposing (Msg) -import LoggedIn.Msg as LoggedInMsg -import LoggedIn.Home.Msg as HomeMsg - -import LoggedData exposing (LoggedData) -import LoggedIn.Home.Model as HomeModel -import Model.Translations exposing (getMessage) - -paymentsSearch : LoggedData -> HomeModel.Model -> Html Msg -paymentsSearch loggedData { search } = - let htmlMap = Html.map (Msg.UpdateLoggedIn << LoggedInMsg.HomeMsg << HomeMsg.SearchMsg) - in Html.div - [ class "search" ] - [ Form.textInput loggedData.translations search htmlMap "searchText" ] -- cgit v1.2.3