diff options
author | Joris | 2016-01-02 19:07:19 +0100 |
---|---|---|
committer | Joris | 2016-01-02 19:07:19 +0100 |
commit | bb316286b0859b5648c61f44c88399f4c1aad9cd (patch) | |
tree | ecbe401c1ff657987b6609997a69775969a317f7 /src/client/elm/Model/Action | |
parent | 0d0c99fd28b782c7daf02fb5cc48d3eb252e705d (diff) |
Use start-app for elm
Diffstat (limited to 'src/client/elm/Model/Action')
-rw-r--r-- | src/client/elm/Model/Action/AccountAction.elm | 15 | ||||
-rw-r--r-- | src/client/elm/Model/Action/AddPaymentAction.elm | 9 | ||||
-rw-r--r-- | src/client/elm/Model/Action/LoggedInAction.elm | 19 | ||||
-rw-r--r-- | src/client/elm/Model/Action/MonthlyAction.elm | 10 | ||||
-rw-r--r-- | src/client/elm/Model/Action/SignInAction.elm | 6 |
5 files changed, 59 insertions, 0 deletions
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 |