docspell/modules/webapp/src/main/elm/Page/UserSettings/Update.elm

24 lines
652 B
Elm
Raw Normal View History

module Page.UserSettings.Update exposing (update)
import Comp.ChangePasswordForm
2019-12-29 20:55:12 +00:00
import Data.Flags exposing (Flags)
import Page.UserSettings.Data exposing (..)
2019-12-29 20:55:12 +00:00
update : Flags -> Msg -> Model -> ( Model, Cmd Msg )
update flags msg model =
case msg of
SetTab t ->
let
2019-12-29 20:55:12 +00:00
m =
{ model | currentTab = Just t }
in
2019-12-29 20:55:12 +00:00
( m, Cmd.none )
ChangePassMsg m ->
let
2019-12-29 20:55:12 +00:00
( m2, c2 ) =
Comp.ChangePasswordForm.update flags m model.changePassModel
in
2019-12-29 20:55:12 +00:00
( { model | changePassModel = m2 }, Cmd.map ChangePassMsg c2 )