mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-19 17:24:26 +08:00
support set user default account
This commit is contained in:
@@ -236,6 +236,7 @@ export function updateUserProfile(context, { profile, currentPassword }) {
|
||||
email: profile.email,
|
||||
nickname: profile.nickname,
|
||||
defaultCurrency: profile.defaultCurrency,
|
||||
defaultAccountId: profile.defaultAccountId,
|
||||
firstDayOfWeek: profile.firstDayOfWeek,
|
||||
transactionEditScope: profile.transactionEditScope
|
||||
}).then(response => {
|
||||
@@ -346,6 +347,11 @@ export function currentUserDefaultCurrency(state) {
|
||||
return userInfo.defaultCurrency || state.defaultSetting.currency;
|
||||
}
|
||||
|
||||
export function currentUserDefaultAccountId(state) {
|
||||
const userInfo = state.currentUserInfo || {};
|
||||
return userInfo.defaultAccountId || '';
|
||||
}
|
||||
|
||||
export function currentUserFirstDayOfWeek(state) {
|
||||
const userInfo = state.currentUserInfo || {};
|
||||
return utils.isNumber(userInfo.firstDayOfWeek) ? userInfo.firstDayOfWeek : state.defaultSetting.firstDayOfWeek;
|
||||
|
||||
Reference in New Issue
Block a user