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

import Time exposing (Time)

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

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

init : Time -> Init -> Model
init time { users, me, payments, incomes, categories, paymentCategories } =
  { home = Home.init
  , stat = Stat.init time paymentCategories payments
  , users = users
  , me = me
  , payments = payments
  , incomes = incomes
  , categories = categories
  , paymentCategories = paymentCategories
  }