module LoggedIn.Home.View exposing ( view ) import Html exposing (..) import Html.Attributes exposing (..) import Date import Form import Utils.Form as Form import Msg exposing (Msg) import LoggedData exposing (LoggedData) import Model.Payment as Payment exposing (Frequency(..)) import LoggedIn.Home.Model as Home import LoggedIn.Home.Header.View as Header import LoggedIn.Home.View.Table as Table import LoggedIn.Home.View.Paging as Paging view : LoggedData -> Home.Model -> Html Msg view loggedData home = let (name, frequency) = case Form.getOutput home.search of Just data -> (Maybe.withDefault "" data.name, data.frequency) Nothing -> ("", Punctual) payments = Payment.search name frequency loggedData.payments in div [ class "home" ] [ Header.view loggedData home payments frequency , Table.view loggedData home payments frequency , Paging.view home payments ]