aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/LoggedData.elm
blob: a3cbec6973919faac1e7c360643b7d3b71f7d60d (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 LoggedData
  ( LoggedData
  , build
  ) where

import Time exposing (Time)

import Action exposing (Action)

import Model exposing (Model)
import Model.Translations exposing (..)
import Model.Conf exposing (..)
import Model.Payment exposing (Payments)
import Model.User exposing (Users, UserId)
import Model.Income exposing (Incomes)

import LoggedIn.Model as LoggedInModel

type alias LoggedData =
  { currentTime : Time
  , translations : Translations
  , conf : Conf
  , users : Users
  , me : UserId
  , payments : Payments
  , incomes : Incomes
  }

build : Model -> LoggedInModel.Model -> LoggedData
build model loggedIn =
  { currentTime = model.currentTime
  , translations = model.translations
  , conf = model.conf
  , users = loggedIn.users
  , me = loggedIn.me
  , payments = loggedIn.payments
  , incomes = loggedIn.incomes
  }