diff options
author | Joris | 2017-04-02 17:51:12 +0200 |
---|---|---|
committer | Joris | 2017-04-02 21:07:08 +0200 |
commit | 5c110716cfda6e616a795edd12f2012b132dca9f (patch) | |
tree | 71c3d04780302edf0648bec1cd914757cdbb2883 /src/client/LoggedIn/Model.elm | |
parent | 64ff4707fdcd81c27c6be9903c3c82bc543ef016 (diff) |
Add a chart on payments by month by categories
Diffstat (limited to 'src/client/LoggedIn/Model.elm')
-rw-r--r-- | src/client/LoggedIn/Model.elm | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/src/client/LoggedIn/Model.elm b/src/client/LoggedIn/Model.elm index 6c858a6..f4fad94 100644 --- a/src/client/LoggedIn/Model.elm +++ b/src/client/LoggedIn/Model.elm @@ -5,17 +5,18 @@ module LoggedIn.Model exposing import Time exposing (Time) +import LoggedIn.Home.Model as Home +import LoggedIn.Stat.Model as Stat +import Model.Category exposing (Categories) +import Model.Income exposing (Incomes) import Model.Init 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.Home.Model as Home +import Model.User exposing (Users, UserId) type alias Model = { home : Home.Model + , stat : Stat.Model , users : Users , me : UserId , payments : Payments @@ -24,13 +25,14 @@ type alias Model = , paymentCategories : PaymentCategories } -init : Init -> Model -init initData = +init : Time -> Init -> Model +init time { users, me, payments, incomes, categories, paymentCategories } = { home = Home.init - , users = initData.users - , me = initData.me - , payments = initData.payments - , incomes = initData.incomes - , categories = initData.categories - , paymentCategories = initData.paymentCategories + , stat = Stat.init time paymentCategories payments + , users = users + , me = me + , payments = payments + , incomes = incomes + , categories = categories + , paymentCategories = paymentCategories } |