From 76f8b85eb9f796d6df861a04f702ef5f48630795 Mon Sep 17 00:00:00 2001 From: Joris Date: Tue, 29 Mar 2016 23:46:47 +0200 Subject: Move logged data to LoggedIn component --- src/client/elm/LoggedData.elm | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/client/elm/LoggedData.elm (limited to 'src/client/elm/LoggedData.elm') 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 + } -- cgit v1.2.3