diff options
author | Joris | 2016-06-12 23:54:17 +0200 |
---|---|---|
committer | Joris | 2016-06-12 23:54:17 +0200 |
commit | 6a0c5087f716ed6c876a666db6573491bfd3e094 (patch) | |
tree | bf439109143c7a1749c2661fc8b805b83a993027 /src/client/elm/LoggedIn/Update.elm | |
parent | 38896af4281d2e191cbde15836a23e4c0274fff6 (diff) |
Design income form
Diffstat (limited to 'src/client/elm/LoggedIn/Update.elm')
-rw-r--r-- | src/client/elm/LoggedIn/Update.elm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/client/elm/LoggedIn/Update.elm b/src/client/elm/LoggedIn/Update.elm index 564d6fc..6d8869a 100644 --- a/src/client/elm/LoggedIn/Update.elm +++ b/src/client/elm/LoggedIn/Update.elm @@ -106,16 +106,16 @@ update model action loggedIn = , Cmd.none ) - LoggedInMsg.AddIncome creation amount -> + LoggedInMsg.AddIncome time amount -> ( loggedIn - , Server.addIncome creation amount + , Server.addIncome time amount |> Task.perform (always LoggedInMsg.NoOp) - (\incomeId -> (LoggedInMsg.ValidateAddIncome incomeId creation amount)) + (\incomeId -> (LoggedInMsg.ValidateAddIncome incomeId time amount)) ) - LoggedInMsg.ValidateAddIncome incomeId creation amount -> - let newIncome = { userId = loggedIn.me, creation = (Date.toTime creation), amount = amount } + LoggedInMsg.ValidateAddIncome incomeId time amount -> + let newIncome = { userId = loggedIn.me, time = time, amount = amount } in ( { loggedIn | incomes = Dict.insert incomeId newIncome loggedIn.incomes } , Cmd.none ) |