aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/Update.elm
diff options
context:
space:
mode:
authorJoris2016-06-19 21:18:56 +0200
committerJoris2016-06-21 12:49:51 +0200
commit36a90770ebeb9bd99e136bfe035fdda5dfabc304 (patch)
tree42b605108f4b8b731fecd65b028006aa41399f40 /src/client/elm/Update.elm
parentfb5629d7f705b7e80dcf1852da58d2864c2b0d25 (diff)
downloadbudget-36a90770ebeb9bd99e136bfe035fdda5dfabc304.tar.gz
budget-36a90770ebeb9bd99e136bfe035fdda5dfabc304.tar.bz2
budget-36a90770ebeb9bd99e136bfe035fdda5dfabc304.zip
Add a dialog to confirm income deletion
Diffstat (limited to 'src/client/elm/Update.elm')
-rw-r--r--src/client/elm/Update.elm12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/client/elm/Update.elm b/src/client/elm/Update.elm
index bcbfb6c..db8889f 100644
--- a/src/client/elm/Update.elm
+++ b/src/client/elm/Update.elm
@@ -25,11 +25,13 @@ import SignIn.Model as SignInModel
import SignIn.Msg as SignInMsg
import SignIn.Update as SignInUpdate
+import Dialog
+
import Utils.Http exposing (errorKey)
update : Msg -> Model -> (Model, Cmd Msg)
-update action model =
- case action of
+update msg model =
+ case msg of
NoOp ->
(model, Cmd.none)
@@ -65,6 +67,12 @@ update action model =
|> Task.perform (always NoOp) (always GoSignInView)
)
+ Dialog dialogMsg ->
+ let (newDialog, command) = Dialog.update dialogMsg model.dialog
+ in ( { model | dialog = newDialog }
+ , command
+ )
+
applySignIn : Model -> SignInMsg.Msg -> Model
applySignIn model signInMsg =
case model.view of