diff options
author | Joris | 2016-04-04 01:27:36 +0200 |
---|---|---|
committer | Joris | 2016-04-04 01:27:36 +0200 |
commit | 8cd63a64abafe21378c35c2489d49f24c9ece3c9 (patch) | |
tree | 541145481d1492f3e388002d931cb3f8fec0acb2 /src/client/elm/LoggedIn/User/Update.elm | |
parent | 01e4ce0fa7c369996ec4ef3a033d16d6fa0eb715 (diff) |
Add income list CRUD in user page
Diffstat (limited to 'src/client/elm/LoggedIn/User/Update.elm')
-rw-r--r-- | src/client/elm/LoggedIn/User/Update.elm | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/client/elm/LoggedIn/User/Update.elm b/src/client/elm/LoggedIn/User/Update.elm new file mode 100644 index 0000000..f44fee4 --- /dev/null +++ b/src/client/elm/LoggedIn/User/Update.elm @@ -0,0 +1,25 @@ +module LoggedIn.User.Update + ( update + ) where + +import Effects exposing (Effects) +import Form exposing (Form) + +import LoggedData exposing (LoggedData) + +import LoggedIn.User.Model as UserModel +import LoggedIn.User.Action as UserAction + +update : LoggedData -> UserAction.Action -> UserModel.Model -> (UserModel.Model, Effects UserAction.Action) +update loggedData action model = + case action of + + UserAction.NoOp -> + ( model + , Effects.none + ) + + UserAction.AddIncomeAction formAction -> + ( { model | addIncome = Form.update formAction model.addIncome } + , Effects.none + ) |