blob: 2e42a7369c74b7e2d1ffe0f8c5053bb57a4bad16 (
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
|
module LoggedIn.View exposing
( view
)
import Html exposing (..)
import Html.Attributes exposing (..)
import Page
import Msg exposing (Msg)
import Model exposing (Model)
import Model.Translations exposing (getMessage)
import LoggedData
import LoggedIn.Model as LoggedInModel
import LoggedIn.Home.View as Home
import LoggedIn.Income.View as Income
import LoggedIn.Category.View as Categories
import LoggedIn.Stat.View as Stat
view : Model -> LoggedInModel.Model -> Html Msg
view model loggedIn =
div
[ class "loggedIn" ]
[ let loggedData = LoggedData.build model loggedIn
in case model.page of
Page.Home -> Home.view loggedData loggedIn.home
Page.Income -> Income.view loggedData loggedIn.income
Page.Categories -> Categories.view loggedData loggedIn.category
Page.Statistics -> Stat.view loggedData
Page.NotFound -> div [] [ text (getMessage model.translations "PageNotFound") ]
]
|