diff options
author | Joris | 2017-03-27 10:18:40 +0200 |
---|---|---|
committer | Joris | 2017-03-27 10:18:40 +0200 |
commit | 64ff4707fdcd81c27c6be9903c3c82bc543ef016 (patch) | |
tree | fa0c3a9112f4f7c8bd383ad3e597041ab7d5a503 /src/client/LoggedIn/Home/Model.elm | |
parent | 40273c30166877b3341125ad5248793b2f2fcc64 (diff) |
Modelize punctual and monthly payment pages
Diffstat (limited to 'src/client/LoggedIn/Home/Model.elm')
-rw-r--r-- | src/client/LoggedIn/Home/Model.elm | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/client/LoggedIn/Home/Model.elm b/src/client/LoggedIn/Home/Model.elm index ace1593..e5381f6 100644 --- a/src/client/LoggedIn/Home/Model.elm +++ b/src/client/LoggedIn/Home/Model.elm @@ -7,15 +7,18 @@ module LoggedIn.Home.Model exposing ) import Form exposing (Form) -import Form.Validate as Validate exposing (Validation) import Form.Field as Field exposing (Field) +import Form.Validate as Validate exposing (Validation) -import Model.User exposing (Users, UserId) -import Model.Payment as Payment exposing (PaymentId, Payments, Frequency(..)) +import Model.Frequency as Frequency import Model.Payer exposing (Payers) +import Model.Payment as Payment exposing (PaymentId, Payments) +import Model.Frequency exposing (Frequency(..)) +import Model.User exposing (Users, UserId) type alias Model = - { currentPage : Int + { punctualPage : Int + , monthlyPage : Int , search : Form String Search } @@ -26,7 +29,8 @@ type alias Search = init : Model init = - { currentPage = 1 + { punctualPage = 1 + , monthlyPage = 1 , search = Form.initial (searchInitial Punctual) validation } @@ -37,4 +41,4 @@ validation : Validation String Search validation = Validate.map2 Search (Validate.field "name" (Validate.maybe Validate.string)) - (Validate.field "frequency" Payment.validateFrequency) + (Validate.field "frequency" Frequency.validate) |