blob: 8fa47fc18652210b990f238cf164bbfda0d0967b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
module LoggedIn.Income.Update exposing
( update
)
import Form exposing (Form)
import LoggedData exposing (LoggedData)
import LoggedIn.Income.Model as IncomeModel
import LoggedIn.Income.Msg as IncomeMsg
update : LoggedData -> IncomeMsg.Msg -> IncomeModel.Model -> (IncomeModel.Model, Cmd IncomeMsg.Msg)
update loggedData msg model =
case msg of
IncomeMsg.NoOp ->
( model
, Cmd.none
)
IncomeMsg.AddIncomeMsg formMsg ->
( { model | addIncome = Form.update formMsg model.addIncome }
, Cmd.none
)
IncomeMsg.ToggleTest ->
( { model | test = not model.test }
, Cmd.none
)
|