mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-19 09:14:27 +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,
|
RESET_STATE,
|
||||||
|
|
||||||
STORE_USER_INFO,
|
STORE_USER_INFO,
|
||||||
CLEAR_USER_INFO
|
CLEAR_USER_INFO,
|
||||||
|
|
||||||
|
UPDATE_ACCOUNT_LIST_INVALID_STATE,
|
||||||
|
UPDATE_TRANSACTION_OVERVIEW_INVALID_STATE
|
||||||
} from './mutations.js';
|
} from './mutations.js';
|
||||||
|
|
||||||
export function authorize(context, { loginName, password }) {
|
export function authorize(context, { loginName, password }) {
|
||||||
@@ -245,6 +248,14 @@ export function updateUserProfile(context, { profile, currentPassword }) {
|
|||||||
context.commit(STORE_USER_INFO, data.result.user);
|
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);
|
resolve(data.result);
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
logger.error('failed to save user profile', error);
|
logger.error('failed to save user profile', error);
|
||||||
|
|||||||
Reference in New Issue
Block a user