From bb316286b0859b5648c61f44c88399f4c1aad9cd Mon Sep 17 00:00:00 2001 From: Joris Date: Sat, 2 Jan 2016 19:07:19 +0100 Subject: Use start-app for elm --- src/client/elm/Model/Action/AccountAction.elm | 15 +++++++++++++++ src/client/elm/Model/Action/AddPaymentAction.elm | 9 +++++++++ src/client/elm/Model/Action/LoggedInAction.elm | 19 +++++++++++++++++++ src/client/elm/Model/Action/MonthlyAction.elm | 10 ++++++++++ src/client/elm/Model/Action/SignInAction.elm | 6 ++++++ 5 files changed, 59 insertions(+) create mode 100644 src/client/elm/Model/Action/AccountAction.elm create mode 100644 src/client/elm/Model/Action/AddPaymentAction.elm create mode 100644 src/client/elm/Model/Action/LoggedInAction.elm create mode 100644 src/client/elm/Model/Action/MonthlyAction.elm create mode 100644 src/client/elm/Model/Action/SignInAction.elm (limited to 'src/client/elm/Model/Action') diff --git a/src/client/elm/Model/Action/AccountAction.elm b/src/client/elm/Model/Action/AccountAction.elm new file mode 100644 index 0000000..feddbea --- /dev/null +++ b/src/client/elm/Model/Action/AccountAction.elm @@ -0,0 +1,15 @@ +module Model.Action.AccountAction + ( AccountAction(..) + ) where + +import Time exposing (Time) + +import Model.User exposing (UserId) + +type AccountAction = + ToggleDetail + | UpdatePayer UserId Time Int + | ToggleIncomeEdition + | UpdateIncomeEdition String + | UpdateEditionError String + | UpdateIncome Time Int diff --git a/src/client/elm/Model/Action/AddPaymentAction.elm b/src/client/elm/Model/Action/AddPaymentAction.elm new file mode 100644 index 0000000..172f35f --- /dev/null +++ b/src/client/elm/Model/Action/AddPaymentAction.elm @@ -0,0 +1,9 @@ +module Model.Action.AddPaymentAction + ( AddPaymentAction(..) + ) where + +type AddPaymentAction = + UpdateName String + | UpdateCost String + | AddError (Maybe String) (Maybe String) + | ToggleFrequency diff --git a/src/client/elm/Model/Action/LoggedInAction.elm b/src/client/elm/Model/Action/LoggedInAction.elm new file mode 100644 index 0000000..22a7d3d --- /dev/null +++ b/src/client/elm/Model/Action/LoggedInAction.elm @@ -0,0 +1,19 @@ +module Model.Action.LoggedInAction + ( LoggedInAction(..) + ) where + +import Model.Payment exposing (Payments, Payment, PaymentId) +import Model.Action.MonthlyAction exposing (MonthlyAction) +import Model.Action.AccountAction exposing (AccountAction) +import Model.Action.AddPaymentAction exposing (AddPaymentAction) + +type LoggedInAction = + UpdateAdd AddPaymentAction + | UpdatePayments Payments + | AddPayment PaymentId String Int + | AddMonthlyPayment PaymentId String Int + | ToggleEdit PaymentId + | DeletePayment Payment + | UpdatePage Int + | UpdateMonthly MonthlyAction + | UpdateAccount AccountAction diff --git a/src/client/elm/Model/Action/MonthlyAction.elm b/src/client/elm/Model/Action/MonthlyAction.elm new file mode 100644 index 0000000..d985ccc --- /dev/null +++ b/src/client/elm/Model/Action/MonthlyAction.elm @@ -0,0 +1,10 @@ +module Model.Action.MonthlyAction + ( MonthlyAction(..) + ) where + +import Model.Payment exposing (Payment, PaymentId) + +type MonthlyAction = + ToggleDetail + | AddPayment Payment + | DeletePayment PaymentId diff --git a/src/client/elm/Model/Action/SignInAction.elm b/src/client/elm/Model/Action/SignInAction.elm new file mode 100644 index 0000000..6673c11 --- /dev/null +++ b/src/client/elm/Model/Action/SignInAction.elm @@ -0,0 +1,6 @@ +module Model.Action.SignInAction + ( SignInAction(..) + ) where + +type SignInAction = + ErrorLogin String -- cgit v1.2.3