diff --git a/src/store/user.js b/src/store/user.js index 197b32e4..39306937 100644 --- a/src/store/user.js +++ b/src/store/user.js @@ -8,7 +8,10 @@ import { RESET_STATE, STORE_USER_INFO, - CLEAR_USER_INFO + CLEAR_USER_INFO, + + UPDATE_ACCOUNT_LIST_INVALID_STATE, + UPDATE_TRANSACTION_OVERVIEW_INVALID_STATE } from './mutations.js'; export function authorize(context, { loginName, password }) { @@ -245,6 +248,14 @@ export function updateUserProfile(context, { profile, currentPassword }) { context.commit(STORE_USER_INFO, data.result.user); } + if (!context.state.accountListStateInvalid) { + context.commit(UPDATE_ACCOUNT_LIST_INVALID_STATE, true); + } + + if (!context.state.transactionOverviewStateInvalid) { + context.commit(UPDATE_TRANSACTION_OVERVIEW_INVALID_STATE, true); + } + resolve(data.result); }).catch(error => { logger.error('failed to save user profile', error);