diff options
author | Joris | 2016-06-23 23:43:23 +0200 |
---|---|---|
committer | Joris | 2016-06-23 23:43:23 +0200 |
commit | 4ce4de89a5400b0d8b9cddaa2922901a081fdaaa (patch) | |
tree | b65e9ef809c2ec7608101563eb3378eaeeddf12b /src/client/elm/LoggedIn/Home/Update.elm | |
parent | 36a90770ebeb9bd99e136bfe035fdda5dfabc304 (diff) |
Use a dialog to add a payment
Diffstat (limited to 'src/client/elm/LoggedIn/Home/Update.elm')
-rw-r--r-- | src/client/elm/LoggedIn/Home/Update.elm | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/client/elm/LoggedIn/Home/Update.elm b/src/client/elm/LoggedIn/Home/Update.elm index af3504a..562cd20 100644 --- a/src/client/elm/LoggedIn/Home/Update.elm +++ b/src/client/elm/LoggedIn/Home/Update.elm @@ -9,19 +9,12 @@ import LoggedData exposing (LoggedData) import LoggedIn.Home.Msg as HomeMsg import LoggedIn.Home.Model as HomeModel -import LoggedIn.Home.AddPayment.Update as AddPaymentUpdate - update : LoggedData -> HomeMsg.Msg -> HomeModel.Model -> (HomeModel.Model, Cmd HomeMsg.Msg) update loggedData msg homeModel = case msg of HomeMsg.NoOp -> (homeModel, Cmd.none) - HomeMsg.UpdateAdd addPaymentMsg -> - ( { homeModel | add = AddPaymentUpdate.update addPaymentMsg homeModel.add } - , Cmd.none - ) - HomeMsg.ToggleEdit id -> ( { homeModel | paymentEdition = if homeModel.paymentEdition == Just id then Nothing else Just id } , Cmd.none @@ -52,3 +45,10 @@ update loggedData msg homeModel = } , Cmd.none ) + + HomeMsg.AddPaymentMsg formMsg -> + ( { homeModel + | addPayment = Form.update formMsg homeModel.addPayment + } + , Cmd.none + ) |