diff options
author | Joris | 2016-03-29 23:46:47 +0200 |
---|---|---|
committer | Joris | 2016-03-29 23:46:47 +0200 |
commit | 76f8b85eb9f796d6df861a04f702ef5f48630795 (patch) | |
tree | c8b975df9854994cbbefff15908ad9bb728264bc /src/client/elm/LoggedData.elm | |
parent | cc58377a48d13ef85cedb5ec0e19eb8b879dd497 (diff) |
Move logged data to LoggedIn component
Diffstat (limited to 'src/client/elm/LoggedData.elm')
-rw-r--r-- | src/client/elm/LoggedData.elm | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/client/elm/LoggedData.elm b/src/client/elm/LoggedData.elm new file mode 100644 index 0000000..02e7908 --- /dev/null +++ b/src/client/elm/LoggedData.elm @@ -0,0 +1,40 @@ +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 + , monthlyPayments : 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 + , monthlyPayments = loggedIn.monthlyPayments + , incomes = loggedIn.incomes + } |