From 36a90770ebeb9bd99e136bfe035fdda5dfabc304 Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 19 Jun 2016 21:18:56 +0200 Subject: Add a dialog to confirm income deletion --- src/client/elm/Update.elm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/client/elm/Update.elm') 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 -- cgit v1.2.3