aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/LoggedIn/Home/Search
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/elm/LoggedIn/Home/Search')
-rw-r--r--src/client/elm/LoggedIn/Home/Search/View.elm56
1 files changed, 0 insertions, 56 deletions
diff --git a/src/client/elm/LoggedIn/Home/Search/View.elm b/src/client/elm/LoggedIn/Home/Search/View.elm
deleted file mode 100644
index 99eec95..0000000
--- a/src/client/elm/LoggedIn/Home/Search/View.elm
+++ /dev/null
@@ -1,56 +0,0 @@
-module LoggedIn.Home.Search.View exposing
- ( view
- )
-
-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 (getParamMessage)
-import Model.Conf exposing (Conf)
-import Model.Payment exposing (Payments)
-import Model.Translations exposing (getMessage)
-
-import LoggedIn.Home.AddPayment.View as AddPayment
-
-import LoggedIn.View.Format as Format
-import View.Plural exposing (plural)
-
-view : LoggedData -> HomeModel.Model -> Payments -> Html Msg
-view loggedData { search } payments =
- Html.div
- [ class "search" ]
- [ searchForm loggedData search
- , paymentsStat loggedData payments
- , AddPayment.view loggedData
- ]
-
-searchForm : LoggedData -> Form String HomeModel.Search -> Html Msg
-searchForm loggedData search =
- let htmlMap = Html.map (Msg.UpdateLoggedIn << LoggedInMsg.HomeMsg << HomeMsg.SearchMsg)
- in Form.textInput loggedData.translations search htmlMap "searchText"
-
-paymentsStat : LoggedData -> Payments -> Html Msg
-paymentsStat loggedData payments =
- let count = plural loggedData.translations (List.length payments) "Payment" "Payments"
- sum = paymentsSum loggedData.conf payments
- in span
- [ class "stat" ]
- [ text <| getParamMessage [ count, sum ] "Worth" loggedData.translations ]
-
-paymentsSum : Conf -> Payments -> String
-paymentsSum conf payments =
- payments
- |> List.map .cost
- |> List.sum
- |> Format.price conf