diff options
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 + } |