From 64ff4707fdcd81c27c6be9903c3c82bc543ef016 Mon Sep 17 00:00:00 2001 From: Joris Date: Mon, 27 Mar 2017 10:18:40 +0200 Subject: Modelize punctual and monthly payment pages --- src/client/LoggedIn/Home/Model.elm | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/client/LoggedIn/Home/Model.elm') 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) -- cgit v1.2.3