diff options
author | Joris | 2016-06-03 20:27:16 +0200 |
---|---|---|
committer | Joris | 2016-06-03 20:27:16 +0200 |
commit | 8e3a7bf1cb83bbb6e3dcd54308eefa52a29cd679 (patch) | |
tree | d6ba0985a534a0e2e317b1edb0d4c999119d87ff /src/client/elm/LoggedIn/Home/Update.elm | |
parent | 3a88115d118f8256f3ff034dc359df42a9e4051c (diff) |
Migrate to elm 0.17
Diffstat (limited to 'src/client/elm/LoggedIn/Home/Update.elm')
-rw-r--r-- | src/client/elm/LoggedIn/Home/Update.elm | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/src/client/elm/LoggedIn/Home/Update.elm b/src/client/elm/LoggedIn/Home/Update.elm index cebdc70..6de341d 100644 --- a/src/client/elm/LoggedIn/Home/Update.elm +++ b/src/client/elm/LoggedIn/Home/Update.elm @@ -1,43 +1,41 @@ -module LoggedIn.Home.Update +module LoggedIn.Home.Update exposing ( update - ) where - -import Effects exposing (Effects) + ) import LoggedData exposing (LoggedData) -import LoggedIn.Home.Action as HomeAction +import LoggedIn.Home.Msg as HomeMsg import LoggedIn.Home.Model as HomeModel import LoggedIn.Home.AddPayment.Update as AddPaymentUpdate -update : LoggedData -> HomeAction.Action -> HomeModel.Model -> (HomeModel.Model, Effects HomeAction.Action) +update : LoggedData -> HomeMsg.Msg -> HomeModel.Model -> (HomeModel.Model, Cmd HomeMsg.Msg) update loggedData action homeModel = case action of - HomeAction.NoOp -> (homeModel, Effects.none) + HomeMsg.NoOp -> (homeModel, Cmd.none) - HomeAction.UpdateAdd addPaymentAction -> - ( { homeModel | add = AddPaymentUpdate.update addPaymentAction homeModel.add } - , Effects.none + HomeMsg.UpdateAdd addPaymentMsg -> + ( { homeModel | add = AddPaymentUpdate.update addPaymentMsg homeModel.add } + , Cmd.none ) - HomeAction.ToggleEdit id -> + HomeMsg.ToggleEdit id -> ( { homeModel | paymentEdition = if homeModel.paymentEdition == Just id then Nothing else Just id } - , Effects.none + , Cmd.none ) - HomeAction.UpdatePage page -> + HomeMsg.UpdatePage page -> ( { homeModel | currentPage = page } - , Effects.none + , Cmd.none ) - HomeAction.ShowMonthlyDetail -> + HomeMsg.ShowMonthlyDetail -> ( { homeModel | monthlyDetail = True } - , Effects.none + , Cmd.none ) - HomeAction.ToggleMonthlyDetail -> + HomeMsg.ToggleMonthlyDetail -> ( { homeModel | monthlyDetail = not homeModel.monthlyDetail } - , Effects.none + , Cmd.none ) |