diff options
Diffstat (limited to 'src/client/elm/LoggedIn/Update.elm')
-rw-r--r-- | src/client/elm/LoggedIn/Update.elm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/client/elm/LoggedIn/Update.elm b/src/client/elm/LoggedIn/Update.elm index 6d8869a..23f242d 100644 --- a/src/client/elm/LoggedIn/Update.elm +++ b/src/client/elm/LoggedIn/Update.elm @@ -29,6 +29,8 @@ import LoggedIn.Income.Update as IncomeUpdate import LoggedIn.Home.AddPayment.Msg as AddPaymentMsg import LoggedIn.Home.AddPayment.Update as AddPaymentUpdate +import LoggedIn.Income.Model as IncomeModel + import Utils.Tuple as Tuple import Utils.Cmd exposing ((:>)) @@ -116,7 +118,11 @@ update model action loggedIn = LoggedInMsg.ValidateAddIncome incomeId time amount -> let newIncome = { userId = loggedIn.me, time = time, amount = amount } - in ( { loggedIn | incomes = Dict.insert incomeId newIncome loggedIn.incomes } + loggedInIncome = loggedIn.income + in ( { loggedIn + | incomes = Dict.insert incomeId newIncome loggedIn.incomes + , income = { loggedInIncome | addIncome = IncomeModel.initForm } + } , Cmd.none ) |