diff options
author | Joris | 2016-06-19 21:18:56 +0200 |
---|---|---|
committer | Joris | 2016-06-21 12:49:51 +0200 |
commit | 36a90770ebeb9bd99e136bfe035fdda5dfabc304 (patch) | |
tree | 42b605108f4b8b731fecd65b028006aa41399f40 /src/client/elm/Update.elm | |
parent | fb5629d7f705b7e80dcf1852da58d2864c2b0d25 (diff) |
Add a dialog to confirm income deletion
Diffstat (limited to 'src/client/elm/Update.elm')
-rw-r--r-- | src/client/elm/Update.elm | 12 |
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 |