diff options
author | Joris | 2016-03-28 17:51:14 +0200 |
---|---|---|
committer | Joris | 2016-03-28 17:51:14 +0200 |
commit | 166cd04e4b28770ede854dafc9ae30eae64102fe (patch) | |
tree | 2245a31243a165acc6f7355534da44cfd17e6038 /src/client/elm/LoggedIn/Home/Model.elm | |
parent | b0d80a5458d7ba4546e5f01f5b6398ea6d23f981 (diff) |
Create an empty but reachable user page
Diffstat (limited to 'src/client/elm/LoggedIn/Home/Model.elm')
-rw-r--r-- | src/client/elm/LoggedIn/Home/Model.elm | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/client/elm/LoggedIn/Home/Model.elm b/src/client/elm/LoggedIn/Home/Model.elm new file mode 100644 index 0000000..14ab86c --- /dev/null +++ b/src/client/elm/LoggedIn/Home/Model.elm @@ -0,0 +1,37 @@ +module LoggedIn.Home.Model + ( Model + , init + ) where + +import LoggedIn.Home.Model.Payer exposing (Payers) + +import Model.User exposing (Users, UserId) +import Model.Payment exposing (PaymentId, Payments, PaymentFrequency(..)) +import Model.Init exposing (..) + +import LoggedIn.Home.Account.Model as AccountModel +import LoggedIn.Home.AddPayment.Model as AddPaymentModel +import LoggedIn.Home.Monthly.Model as MonthlyModel + +type alias Model = + { users : Users + , add : AddPaymentModel.Model + , monthly : MonthlyModel.Model + , account : AccountModel.Model + , payments : Payments + , paymentsCount : Int + , paymentEdition : Maybe PaymentId + , currentPage : Int + } + +init : Init -> Model +init initData = + { users = initData.users + , add = AddPaymentModel.init Punctual + , monthly = MonthlyModel.init initData.monthlyPayments + , account = AccountModel.init initData.me initData.incomes + , payments = initData.payments + , paymentsCount = initData.paymentsCount + , paymentEdition = Nothing + , currentPage = 1 + } |