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/Update/LoggedIn | |
parent | 0d0c99fd28b782c7daf02fb5cc48d3eb252e705d (diff) |
Use start-app for elm
Diffstat (limited to 'src/client/elm/Update/LoggedIn')
-rw-r--r-- | src/client/elm/Update/LoggedIn/Account.elm | 16 | ||||
-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.elm | 10 |
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 |