aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/LoggedIn/Home/Search/View.elm
diff options
context:
space:
mode:
authorJoris2016-06-23 23:43:23 +0200
committerJoris2016-06-23 23:43:23 +0200
commit4ce4de89a5400b0d8b9cddaa2922901a081fdaaa (patch)
treeb65e9ef809c2ec7608101563eb3378eaeeddf12b /src/client/elm/LoggedIn/Home/Search/View.elm
parent36a90770ebeb9bd99e136bfe035fdda5dfabc304 (diff)
downloadbudget-4ce4de89a5400b0d8b9cddaa2922901a081fdaaa.tar.gz
budget-4ce4de89a5400b0d8b9cddaa2922901a081fdaaa.tar.bz2
budget-4ce4de89a5400b0d8b9cddaa2922901a081fdaaa.zip
Use a dialog to add a payment
Diffstat (limited to 'src/client/elm/LoggedIn/Home/Search/View.elm')
-rw-r--r--src/client/elm/LoggedIn/Home/Search/View.elm8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/client/elm/LoggedIn/Home/Search/View.elm b/src/client/elm/LoggedIn/Home/Search/View.elm
index f06377d..99eec95 100644
--- a/src/client/elm/LoggedIn/Home/Search/View.elm
+++ b/src/client/elm/LoggedIn/Home/Search/View.elm
@@ -19,6 +19,9 @@ 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)
@@ -29,6 +32,7 @@ view loggedData { search } payments =
[ class "search" ]
[ searchForm loggedData search
, paymentsStat loggedData payments
+ , AddPayment.view loggedData
]
searchForm : LoggedData -> Form String HomeModel.Search -> Html Msg
@@ -40,7 +44,9 @@ paymentsStat : LoggedData -> Payments -> Html Msg
paymentsStat loggedData payments =
let count = plural loggedData.translations (List.length payments) "Payment" "Payments"
sum = paymentsSum loggedData.conf payments
- in text <| getParamMessage [ count, sum ] "Worth" loggedData.translations
+ in span
+ [ class "stat" ]
+ [ text <| getParamMessage [ count, sum ] "Worth" loggedData.translations ]
paymentsSum : Conf -> Payments -> String
paymentsSum conf payments =