mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-14 06:57:35 +08:00
set account list and transaction overview in store invalid after user profile modified
This commit is contained in:
+12
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user