aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/Update/LoggedIn
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/elm/Update/LoggedIn')
-rw-r--r--src/client/elm/Update/LoggedIn/Account.elm16
-rw-r--r--src/client/elm/Update/LoggedIn/AddPayment.elm (renamed from src/client/elm/Update/LoggedIn/Add.elm)14
-rw-r--r--src/client/elm/Update/LoggedIn/Monthly.elm10
3 files changed, 9 insertions, 31 deletions
diff --git a/src/client/elm/Update/LoggedIn/Account.elm b/src/client/elm/Update/LoggedIn/Account.elm
index c7a66dd..496fab1 100644
--- a/src/client/elm/Update/LoggedIn/Account.elm
+++ b/src/client/elm/Update/LoggedIn/Account.elm
@@ -1,26 +1,16 @@
module Update.LoggedIn.Account
- ( AccountAction(..)
- , updateAccount
+ ( updateAccount
) where
import Maybe
-import Time exposing (Time)
import Dict
-import Model.User exposing (UserId)
-import Model.Payer exposing (..)
+import Model.Payer exposing (updatePayers)
+import Model.Action.AccountAction exposing (..)
import Model.View.LoggedIn.Account exposing (..)
import Utils.Maybe exposing (isJust)
-type AccountAction =
- ToggleDetail
- | UpdatePayer UserId Time Int
- | ToggleIncomeEdition
- | UpdateIncomeEdition String
- | UpdateEditionError String
- | UpdateIncome Time Int
-
updateAccount : AccountAction -> Account -> Account
updateAccount action account =
case action of
diff --git a/src/client/elm/Update/LoggedIn/Add.elm b/src/client/elm/Update/LoggedIn/AddPayment.elm
index 92bdb7e..62eda85 100644
--- a/src/client/elm/Update/LoggedIn/Add.elm
+++ b/src/client/elm/Update/LoggedIn/AddPayment.elm
@@ -1,15 +1,9 @@
-module Update.LoggedIn.Add
- ( AddPaymentAction(..)
- , updateAddPayment
+module Update.LoggedIn.AddPayment
+ ( updateAddPayment
) where
-import Model.View.LoggedIn.Add exposing (..)
-
-type AddPaymentAction =
- UpdateName String
- | UpdateCost String
- | AddError (Maybe String) (Maybe String)
- | ToggleFrequency
+import Model.Action.AddPaymentAction exposing (..)
+import Model.View.LoggedIn.AddPayment exposing (..)
updateAddPayment : AddPaymentAction -> AddPayment -> AddPayment
updateAddPayment action addPayment =
diff --git a/src/client/elm/Update/LoggedIn/Monthly.elm b/src/client/elm/Update/LoggedIn/Monthly.elm
index 275b3e8..2505091 100644
--- a/src/client/elm/Update/LoggedIn/Monthly.elm
+++ b/src/client/elm/Update/LoggedIn/Monthly.elm
@@ -1,16 +1,10 @@
module Update.LoggedIn.Monthly
- ( MonthlyAction(..)
- , updateMonthly
+ ( updateMonthly
) where
-import Model.Payment exposing (Payment, PaymentId)
+import Model.Action.MonthlyAction exposing (..)
import Model.View.LoggedIn.Monthly exposing (..)
-type MonthlyAction =
- ToggleDetail
- | AddPayment Payment
- | DeletePayment PaymentId
-
updateMonthly : MonthlyAction -> Monthly -> Monthly
updateMonthly action monthly =
case action of