blob: 5ed54b972eb1a8126d13552454834eed8f7ae2fc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
module LoggedIn.Home.View exposing
( view
)
import Html exposing (..)
import Html.Attributes exposing (..)
import Date
import Form
import Msg exposing (Msg)
import LoggedData exposing (LoggedData)
import Model.Payment as Payment
import LoggedIn.Home.Model as LoggedInModel
import LoggedIn.Home.Account.View as AccountView
import LoggedIn.Home.AddPayment.View as AddPaymentView
import LoggedIn.Home.View.Monthly as MonthlyView
import LoggedIn.Home.View.Search exposing (paymentsSearch)
import LoggedIn.Home.View.Table exposing (paymentsTable)
import LoggedIn.Home.View.Paging exposing (paymentsPaging)
view : LoggedData -> LoggedInModel.Model -> Html Msg
view loggedData loggedIn =
let searchText =
Form.getFieldAsString "searchText" loggedIn.search
|> .value
|> Maybe.withDefault ""
punctualPayments = Payment.sortedFiltredPunctual searchText loggedData.payments
in div
[ class "home" ]
[ AddPaymentView.view loggedData loggedIn
, div
[ class "expandables" ]
[ AccountView.view loggedData loggedIn
, MonthlyView.view loggedData loggedIn
]
, paymentsSearch loggedData loggedIn
, paymentsTable loggedData loggedIn punctualPayments
, paymentsPaging punctualPayments loggedIn
]
|