aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/LoggedIn/Model.elm
blob: 6bcb0b20b80006f0ed278b7f6f3b89b1bb610034 (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
module LoggedIn.Model exposing
  ( Model
  , init
  )

import Time exposing (Time)

import Model.Init exposing (..)
import Model.Payment exposing (Payments)
import Model.User exposing (Users, UserId)
import Model.Income exposing (Incomes)
import Model.Category exposing (Categories)
import Model.PaymentCategory exposing (PaymentCategories)

import LoggedIn.Home.Model as Home
import LoggedIn.Income.Model as Income
import LoggedIn.Category.Model as Categories

type alias Model =
  { home : Home.Model
  , income : Income.Model
  , category : Categories.Model
  , users : Users
  , me : UserId
  , payments : Payments
  , incomes : Incomes
  , categories : Categories
  , paymentCategories : PaymentCategories
  }

init : Init -> Model
init initData =
  { home = Home.init
  , income = Income.init
  , category = Categories.init
  , users = initData.users
  , me = initData.me
  , payments = initData.payments
  , incomes = initData.incomes
  , categories = initData.categories
  , paymentCategories = initData.paymentCategories
  }