mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-16 16:07:33 +08:00
update text content
This commit is contained in:
@@ -677,7 +677,7 @@ export const useAccountsStore = defineStore('accounts', {
|
||||
const data = response.data;
|
||||
|
||||
if (!data || !data.success || !data.result) {
|
||||
reject({ message: 'Unable to get account list' });
|
||||
reject({ message: 'Unable to retrieve account list' });
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -703,7 +703,7 @@ export const useAccountsStore = defineStore('accounts', {
|
||||
if (error.response && error.response.data && error.response.data.errorMessage) {
|
||||
reject({ error: error.response.data });
|
||||
} else if (!error.processed) {
|
||||
reject({ message: 'Unable to get account list' });
|
||||
reject({ message: 'Unable to retrieve account list' });
|
||||
} else {
|
||||
reject(error);
|
||||
}
|
||||
@@ -718,7 +718,7 @@ export const useAccountsStore = defineStore('accounts', {
|
||||
const data = response.data;
|
||||
|
||||
if (!data || !data.success || !data.result) {
|
||||
reject({ message: 'Unable to get account' });
|
||||
reject({ message: 'Unable to retrieve account' });
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -729,7 +729,7 @@ export const useAccountsStore = defineStore('accounts', {
|
||||
if (error.response && error.response.data && error.response.data.errorMessage) {
|
||||
reject({ error: error.response.data });
|
||||
} else if (!error.processed) {
|
||||
reject({ message: 'Unable to get account' });
|
||||
reject({ message: 'Unable to retrieve account' });
|
||||
} else {
|
||||
reject(error);
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ export const useExchangeRatesStore = defineStore('exchangeRates', {
|
||||
const data = response.data;
|
||||
|
||||
if (!data || !data.success || !data.result) {
|
||||
reject({ message: 'Unable to get exchange rates data' });
|
||||
reject({ message: 'Unable to retrieve exchange rates data' });
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -94,14 +94,14 @@ export const useExchangeRatesStore = defineStore('exchangeRates', {
|
||||
|
||||
resolve(data.result);
|
||||
}).catch(error => {
|
||||
logger.error('failed to get latest exchange rates data', error);
|
||||
logger.error('failed to retrieve latest exchange rates data', error);
|
||||
|
||||
if (error && error.processed) {
|
||||
reject(error);
|
||||
} else if (error.response && error.response.data && error.response.data.errorMessage) {
|
||||
reject({ error: error.response.data });
|
||||
} else {
|
||||
reject({ message: 'Unable to get exchange rates data' });
|
||||
reject({ message: 'Unable to retrieve exchange rates data' });
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
+7
-7
@@ -57,7 +57,7 @@ export const useRootStore = defineStore('root', {
|
||||
const data = response.data;
|
||||
|
||||
if (!data || !data.success || !data.result || !data.result.token) {
|
||||
reject({ message: 'Unable to login' });
|
||||
reject({ message: 'Unable to log in' });
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ export const useRootStore = defineStore('root', {
|
||||
} else if (error.response && error.response.data && error.response.data.errorMessage) {
|
||||
reject({ error: error.response.data });
|
||||
} else {
|
||||
reject({ message: 'Unable to login' });
|
||||
reject({ message: 'Unable to log in' });
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -115,7 +115,7 @@ export const useRootStore = defineStore('root', {
|
||||
token: token
|
||||
});
|
||||
} else {
|
||||
reject({ message: 'An error has occurred' });
|
||||
reject({ message: 'An error occurred' });
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -293,7 +293,7 @@ export const useRootStore = defineStore('root', {
|
||||
const data = response.data;
|
||||
|
||||
if (!data || !data.success || !data.result) {
|
||||
reject({ message: 'Unable to resend verify email' });
|
||||
reject({ message: 'Unable to resend validation email' });
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -306,7 +306,7 @@ export const useRootStore = defineStore('root', {
|
||||
} else if (error.response && error.response.data && error.response.data.errorMessage) {
|
||||
reject({ error: error.response.data });
|
||||
} else {
|
||||
reject({ message: 'Unable to resend verify email' });
|
||||
reject({ message: 'Unable to resend validation email' });
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -433,7 +433,7 @@ export const useRootStore = defineStore('root', {
|
||||
const data = response.data;
|
||||
|
||||
if (!data || !data.success || !data.result) {
|
||||
reject({ message: 'Unable to resend verify email' });
|
||||
reject({ message: 'Unable to resend validation email' });
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -446,7 +446,7 @@ export const useRootStore = defineStore('root', {
|
||||
} else if (error.response && error.response.data && error.response.data.errorMessage) {
|
||||
reject({ error: error.response.data });
|
||||
} else {
|
||||
reject({ message: 'Unable to resend verify email' });
|
||||
reject({ message: 'Unable to resend validation email' });
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -264,7 +264,7 @@ export const useOverviewStore = defineStore('overview', {
|
||||
const data = response.data;
|
||||
|
||||
if (!data || !data.success || !data.result) {
|
||||
reject({ message: 'Unable to get transaction overview' });
|
||||
reject({ message: 'Unable to retrieve transaction overview' });
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -291,7 +291,7 @@ export const useOverviewStore = defineStore('overview', {
|
||||
if (error.response && error.response.data && error.response.data.errorMessage) {
|
||||
reject({ error: error.response.data });
|
||||
} else if (!error.processed) {
|
||||
reject({ message: 'Unable to get transaction overview' });
|
||||
reject({ message: 'Unable to retrieve transaction overview' });
|
||||
} else {
|
||||
reject(error);
|
||||
}
|
||||
|
||||
@@ -589,7 +589,7 @@ export const useStatisticsStore = defineStore('statistics', {
|
||||
const data = response.data;
|
||||
|
||||
if (!data || !data.success || !data.result) {
|
||||
reject({ message: 'Unable to get transaction statistics' });
|
||||
reject({ message: 'Unable to retrieve transaction statistics' });
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -606,12 +606,12 @@ export const useStatisticsStore = defineStore('statistics', {
|
||||
|
||||
resolve(data.result);
|
||||
}).catch(error => {
|
||||
logger.error('failed to get transaction statistics', error);
|
||||
logger.error('failed to retrieve transaction statistics', error);
|
||||
|
||||
if (error.response && error.response.data && error.response.data.errorMessage) {
|
||||
reject({ error: error.response.data });
|
||||
} else if (!error.processed) {
|
||||
reject({ message: 'Unable to get transaction statistics' });
|
||||
reject({ message: 'Unable to retrieve transaction statistics' });
|
||||
} else {
|
||||
reject(error);
|
||||
}
|
||||
|
||||
+2
-2
@@ -15,7 +15,7 @@ export const useTokensStore = defineStore('tokens', {
|
||||
const data = response.data;
|
||||
|
||||
if (!data || !data.success || !data.result) {
|
||||
reject({ message: 'Unable to get session list' });
|
||||
reject({ message: 'Unable to retrieve session list' });
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ export const useTokensStore = defineStore('tokens', {
|
||||
if (error.response && error.response.data && error.response.data.errorMessage) {
|
||||
reject({ error: error.response.data });
|
||||
} else if (!error.processed) {
|
||||
reject({ message: 'Unable to get session list' });
|
||||
reject({ message: 'Unable to retrieve session list' });
|
||||
} else {
|
||||
reject(error);
|
||||
}
|
||||
|
||||
@@ -515,7 +515,7 @@ export const useTransactionsStore = defineStore('transactions', {
|
||||
}
|
||||
}
|
||||
|
||||
reject({ message: 'Unable to get transaction list' });
|
||||
reject({ message: 'Unable to retrieve transaction list' });
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -552,7 +552,7 @@ export const useTransactionsStore = defineStore('transactions', {
|
||||
if (error.response && error.response.data && error.response.data.errorMessage) {
|
||||
reject({ error: error.response.data });
|
||||
} else if (!error.processed) {
|
||||
reject({ message: 'Unable to get transaction list' });
|
||||
reject({ message: 'Unable to retrieve transaction list' });
|
||||
} else {
|
||||
reject(error);
|
||||
}
|
||||
@@ -587,7 +587,7 @@ export const useTransactionsStore = defineStore('transactions', {
|
||||
self.updateTransactionListInvalidState(true);
|
||||
}
|
||||
|
||||
reject({ message: 'Unable to get transaction list' });
|
||||
reject({ message: 'Unable to retrieve transaction list' });
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -620,7 +620,7 @@ export const useTransactionsStore = defineStore('transactions', {
|
||||
if (error.response && error.response.data && error.response.data.errorMessage) {
|
||||
reject({ error: error.response.data });
|
||||
} else if (!error.processed) {
|
||||
reject({ message: 'Unable to get transaction list' });
|
||||
reject({ message: 'Unable to retrieve transaction list' });
|
||||
} else {
|
||||
reject(error);
|
||||
}
|
||||
@@ -635,7 +635,7 @@ export const useTransactionsStore = defineStore('transactions', {
|
||||
const data = response.data;
|
||||
|
||||
if (!data || !data.success || !data.result) {
|
||||
reject({ message: 'Unable to get transaction' });
|
||||
reject({ message: 'Unable to retrieve transaction' });
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -646,7 +646,7 @@ export const useTransactionsStore = defineStore('transactions', {
|
||||
if (error.response && error.response.data && error.response.data.errorMessage) {
|
||||
reject({ error: error.response.data });
|
||||
} else if (!error.processed) {
|
||||
reject({ message: 'Unable to get transaction' });
|
||||
reject({ message: 'Unable to retrieve transaction' });
|
||||
} else {
|
||||
reject(error);
|
||||
}
|
||||
@@ -681,7 +681,7 @@ export const useTransactionsStore = defineStore('transactions', {
|
||||
submitTransaction.destinationAccountId = transaction.destinationAccountId;
|
||||
submitTransaction.destinationAmount = transaction.destinationAmount;
|
||||
} else {
|
||||
return Promise.reject('An error has occurred');
|
||||
return Promise.reject('An error occurred');
|
||||
}
|
||||
|
||||
if (isEdit) {
|
||||
|
||||
@@ -161,7 +161,7 @@ export const useTransactionCategoriesStore = defineStore('transactionCategories'
|
||||
const data = response.data;
|
||||
|
||||
if (!data || !data.success || !data.result) {
|
||||
reject({ message: 'Unable to get category list' });
|
||||
reject({ message: 'Unable to retrieve category list' });
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -215,7 +215,7 @@ export const useTransactionCategoriesStore = defineStore('transactionCategories'
|
||||
if (error.response && error.response.data && error.response.data.errorMessage) {
|
||||
reject({ error: error.response.data });
|
||||
} else if (!error.processed) {
|
||||
reject({ message: 'Unable to get category list' });
|
||||
reject({ message: 'Unable to retrieve category list' });
|
||||
} else {
|
||||
reject(error);
|
||||
}
|
||||
@@ -230,7 +230,7 @@ export const useTransactionCategoriesStore = defineStore('transactionCategories'
|
||||
const data = response.data;
|
||||
|
||||
if (!data || !data.success || !data.result) {
|
||||
reject({ message: 'Unable to get category' });
|
||||
reject({ message: 'Unable to retrieve category' });
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -241,7 +241,7 @@ export const useTransactionCategoriesStore = defineStore('transactionCategories'
|
||||
if (error.response && error.response.data && error.response.data.errorMessage) {
|
||||
reject({ error: error.response.data });
|
||||
} else if (!error.processed) {
|
||||
reject({ message: 'Unable to get category' });
|
||||
reject({ message: 'Unable to retrieve category' });
|
||||
} else {
|
||||
reject(error);
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ export const useTransactionTagsStore = defineStore('transactionTags', {
|
||||
const data = response.data;
|
||||
|
||||
if (!data || !data.success || !data.result) {
|
||||
reject({ message: 'Unable to get tag list' });
|
||||
reject({ message: 'Unable to retrieve tag list' });
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ export const useTransactionTagsStore = defineStore('transactionTags', {
|
||||
if (error.response && error.response.data && error.response.data.errorMessage) {
|
||||
reject({ error: error.response.data });
|
||||
} else if (!error.processed) {
|
||||
reject({ message: 'Unable to get tag list' });
|
||||
reject({ message: 'Unable to retrieve tag list' });
|
||||
} else {
|
||||
reject(error);
|
||||
}
|
||||
|
||||
+11
-11
@@ -13,18 +13,18 @@ export const useTwoFactorAuthStore = defineStore('twoFactorAuth', {
|
||||
const data = response.data;
|
||||
|
||||
if (!data || !data.success || !data.result || !isBoolean(data.result.enable)) {
|
||||
reject({ message: 'Unable to get current two factor authentication status' });
|
||||
reject({ message: 'Unable to retrieve current two-factor authentication status' });
|
||||
return;
|
||||
}
|
||||
|
||||
resolve(data.result);
|
||||
}).catch(error => {
|
||||
logger.error('failed to get 2fa status', error);
|
||||
logger.error('failed to retrieve 2fa status', error);
|
||||
|
||||
if (error.response && error.response.data && error.response.data.errorMessage) {
|
||||
reject({ error: error.response.data });
|
||||
} else if (!error.processed) {
|
||||
reject({ message: 'Unable to get current two factor authentication status' });
|
||||
reject({ message: 'Unable to retrieve current two-factor authentication status' });
|
||||
} else {
|
||||
reject(error);
|
||||
}
|
||||
@@ -37,7 +37,7 @@ export const useTwoFactorAuthStore = defineStore('twoFactorAuth', {
|
||||
const data = response.data;
|
||||
|
||||
if (!data || !data.success || !data.result || !data.result.qrcode || !data.result.secret) {
|
||||
reject({ message: 'Unable to enable two factor authentication' });
|
||||
reject({ message: 'Unable to enable two-factor authentication' });
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ export const useTwoFactorAuthStore = defineStore('twoFactorAuth', {
|
||||
if (error.response && error.response.data && error.response.data.errorMessage) {
|
||||
reject({ error: error.response.data });
|
||||
} else if (!error.processed) {
|
||||
reject({ message: 'Unable to enable two factor authentication' });
|
||||
reject({ message: 'Unable to enable two-factor authentication' });
|
||||
} else {
|
||||
reject(error);
|
||||
}
|
||||
@@ -64,7 +64,7 @@ export const useTwoFactorAuthStore = defineStore('twoFactorAuth', {
|
||||
const data = response.data;
|
||||
|
||||
if (!data || !data.success || !data.result || !data.result.token) {
|
||||
reject({ message: 'Unable to enable two factor authentication' });
|
||||
reject({ message: 'Unable to enable two-factor authentication' });
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ export const useTwoFactorAuthStore = defineStore('twoFactorAuth', {
|
||||
if (error.response && error.response.data && error.response.data.errorMessage) {
|
||||
reject({ error: error.response.data });
|
||||
} else if (!error.processed) {
|
||||
reject({ message: 'Unable to enable two factor authentication' });
|
||||
reject({ message: 'Unable to enable two-factor authentication' });
|
||||
} else {
|
||||
reject(error);
|
||||
}
|
||||
@@ -94,7 +94,7 @@ export const useTwoFactorAuthStore = defineStore('twoFactorAuth', {
|
||||
const data = response.data;
|
||||
|
||||
if (!data || !data.success || !data.result) {
|
||||
reject({ message: 'Unable to disable two factor authentication' });
|
||||
reject({ message: 'Unable to disable two-factor authentication' });
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ export const useTwoFactorAuthStore = defineStore('twoFactorAuth', {
|
||||
if (error.response && error.response.data && error.response.data.errorMessage) {
|
||||
reject({ error: error.response.data });
|
||||
} else if (!error.processed) {
|
||||
reject({ message: 'Unable to disable two factor authentication' });
|
||||
reject({ message: 'Unable to disable two-factor authentication' });
|
||||
} else {
|
||||
reject(error);
|
||||
}
|
||||
@@ -120,7 +120,7 @@ export const useTwoFactorAuthStore = defineStore('twoFactorAuth', {
|
||||
const data = response.data;
|
||||
|
||||
if (!data || !data.success || !data.result || !data.result.recoveryCodes || !data.result.recoveryCodes.length) {
|
||||
reject({ message: 'Unable to regenerate two factor authentication backup codes' });
|
||||
reject({ message: 'Unable to regenerate two-factor authentication backup codes' });
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ export const useTwoFactorAuthStore = defineStore('twoFactorAuth', {
|
||||
if (error.response && error.response.data && error.response.data.errorMessage) {
|
||||
reject({ error: error.response.data });
|
||||
} else if (!error.processed) {
|
||||
reject({ message: 'Unable to regenerate two factor authentication backup codes' });
|
||||
reject({ message: 'Unable to regenerate two-factor authentication backup codes' });
|
||||
} else {
|
||||
reject(error);
|
||||
}
|
||||
|
||||
+10
-10
@@ -89,18 +89,18 @@ export const useUserStore = defineStore('user', {
|
||||
const data = response.data;
|
||||
|
||||
if (!data || !data.success || !data.result) {
|
||||
reject({ message: 'Unable to get user profile' });
|
||||
reject({ message: 'Unable to retrieve user profile' });
|
||||
return;
|
||||
}
|
||||
|
||||
resolve(data.result);
|
||||
}).catch(error => {
|
||||
logger.error('failed to get user profile', error);
|
||||
logger.error('failed to retrieve user profile', error);
|
||||
|
||||
if (error.response && error.response.data && error.response.data.errorMessage) {
|
||||
reject({ error: error.response.data });
|
||||
} else if (!error.processed) {
|
||||
reject({ message: 'Unable to get user profile' });
|
||||
reject({ message: 'Unable to retrieve user profile' });
|
||||
} else {
|
||||
reject(error);
|
||||
}
|
||||
@@ -113,18 +113,18 @@ export const useUserStore = defineStore('user', {
|
||||
const data = response.data;
|
||||
|
||||
if (!data || !data.success || !data.result) {
|
||||
reject({ message: 'Unable to get user statistics data' });
|
||||
reject({ message: 'Unable to retrieve user statistics data' });
|
||||
return;
|
||||
}
|
||||
|
||||
resolve(data.result);
|
||||
}).catch(error => {
|
||||
logger.error('failed to get user statistics data', error);
|
||||
logger.error('failed to retrieve user statistics data', error);
|
||||
|
||||
if (error.response && error.response.data && error.response.data.errorMessage) {
|
||||
reject({ error: error.response.data });
|
||||
} else if (!error.processed) {
|
||||
reject({ message: 'Unable to get user statistics data' });
|
||||
reject({ message: 'Unable to retrieve user statistics data' });
|
||||
} else {
|
||||
reject(error);
|
||||
}
|
||||
@@ -136,10 +136,10 @@ export const useUserStore = defineStore('user', {
|
||||
services.getExportedUserData(fileType).then(response => {
|
||||
if (response && response.headers) {
|
||||
if (fileType === 'csv' && response.headers['content-type'] !== 'text/csv') {
|
||||
reject({ message: 'Unable to get exported user data' });
|
||||
reject({ message: 'Unable to retrieve exported user data' });
|
||||
return;
|
||||
} else if (fileType === 'tsv' && response.headers['content-type'] !== 'text/tab-separated-values') {
|
||||
reject({ message: 'Unable to get exported user data' });
|
||||
reject({ message: 'Unable to retrieve exported user data' });
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -147,12 +147,12 @@ export const useUserStore = defineStore('user', {
|
||||
const blob = new Blob([response.data], { type: response.headers['content-type'] });
|
||||
resolve(blob);
|
||||
}).catch(error => {
|
||||
logger.error('failed to get user statistics data', error);
|
||||
logger.error('failed to retrieve user statistics data', error);
|
||||
|
||||
if (error.response && error.response.headers['content-type'] === 'text/text' && error.response && error.response.data) {
|
||||
reject({ message: 'error.' + error.response.data });
|
||||
} else if (!error.processed) {
|
||||
reject({ message: 'Unable to get exported user data' });
|
||||
reject({ message: 'Unable to retrieve exported user data' });
|
||||
} else {
|
||||
reject(error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user