diff options
Diffstat (limited to 'src/client/LoggedData.elm')
-rw-r--r-- | src/client/LoggedData.elm | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/client/LoggedData.elm b/src/client/LoggedData.elm new file mode 100644 index 0000000..9bb0a7f --- /dev/null +++ b/src/client/LoggedData.elm @@ -0,0 +1,44 @@ +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 Model.Category exposing (Categories) +import Model.PaymentCategory exposing (PaymentCategories) + +import LoggedIn.Model as LoggedInModel + +type alias LoggedData = + { currentTime : Time + , translations : Translations + , conf : Conf + , users : Users + , me : UserId + , payments : Payments + , incomes : Incomes + , categories : Categories + , paymentCategories : PaymentCategories + } + +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 + , categories = loggedIn.categories + , paymentCategories = loggedIn.paymentCategories + } |