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

import Time exposing (Time)

import Msg exposing (Msg)

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
  }