mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-20 01:34:24 +08:00
code refactor
This commit is contained in:
@@ -627,6 +627,16 @@ function getAllTransactionEditScopeTypes(translateFn) {
|
|||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getEnableDisableOptions(translateFn) {
|
||||||
|
return [{
|
||||||
|
value: true,
|
||||||
|
displayName: translateFn('Enable')
|
||||||
|
},{
|
||||||
|
value: false,
|
||||||
|
displayName: translateFn('Disable')
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
function getDisplayCurrency(value, currencyCode, options, translateFn) {
|
function getDisplayCurrency(value, currencyCode, options, translateFn) {
|
||||||
if (!isNumber(value) && !isString(value)) {
|
if (!isNumber(value) && !isString(value)) {
|
||||||
return value;
|
return value;
|
||||||
@@ -896,6 +906,7 @@ export function i18nFunctions(i18nGlobal) {
|
|||||||
getAllStatisticsChartDataTypes: () => getAllStatisticsChartDataTypes(i18nGlobal.t),
|
getAllStatisticsChartDataTypes: () => getAllStatisticsChartDataTypes(i18nGlobal.t),
|
||||||
getAllStatisticsSortingTypes: () => getAllStatisticsSortingTypes(i18nGlobal.t),
|
getAllStatisticsSortingTypes: () => getAllStatisticsSortingTypes(i18nGlobal.t),
|
||||||
getAllTransactionEditScopeTypes: () => getAllTransactionEditScopeTypes(i18nGlobal.t),
|
getAllTransactionEditScopeTypes: () => getAllTransactionEditScopeTypes(i18nGlobal.t),
|
||||||
|
getEnableDisableOptions: () => getEnableDisableOptions(i18nGlobal.t),
|
||||||
getDisplayCurrency: (value, currencyCode, options) => getDisplayCurrency(value, currencyCode, options, i18nGlobal.t),
|
getDisplayCurrency: (value, currencyCode, options) => getDisplayCurrency(value, currencyCode, options, i18nGlobal.t),
|
||||||
setLanguage: (locale, force) => setLanguage(i18nGlobal, locale, force),
|
setLanguage: (locale, force) => setLanguage(i18nGlobal, locale, force),
|
||||||
initLocale: (lastUserLanguage, timezone) => initLocale(i18nGlobal, lastUserLanguage, timezone)
|
initLocale: (lastUserLanguage, timezone) => initLocale(i18nGlobal, lastUserLanguage, timezone)
|
||||||
|
|||||||
@@ -176,13 +176,7 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
...mapStores(useRootStore, useSettingsStore, useUserStore, useExchangeRatesStore),
|
...mapStores(useRootStore, useSettingsStore, useUserStore, useExchangeRatesStore),
|
||||||
enableDisableOptions() {
|
enableDisableOptions() {
|
||||||
return [{
|
return this.$locale.getEnableDisableOptions();
|
||||||
value: true,
|
|
||||||
displayName: this.$t('Enable')
|
|
||||||
},{
|
|
||||||
value: false,
|
|
||||||
displayName: this.$t('Disable')
|
|
||||||
}];
|
|
||||||
},
|
},
|
||||||
allTimezones() {
|
allTimezones() {
|
||||||
return this.$locale.getAllTimezones(true);
|
return this.$locale.getAllTimezones(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user