mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-21 02:04:26 +08:00
add insights & explore page
This commit is contained in:
@@ -143,6 +143,11 @@ import {
|
||||
ChartDateAggregationType
|
||||
} from '@/core/statistics.ts';
|
||||
|
||||
import {
|
||||
TransactionExploreConditionField,
|
||||
TransactionExploreConditionOperator
|
||||
} from '@/core/explore.ts';
|
||||
|
||||
import {
|
||||
type LocalizedImportFileCategoryAndTypes,
|
||||
type LocalizedImportFileType,
|
||||
@@ -553,6 +558,19 @@ export function useI18n() {
|
||||
return ret;
|
||||
}
|
||||
|
||||
function getLocalizedNameValue(nameValues: NameValue[]): NameValue[] {
|
||||
const ret: NameValue[] = [];
|
||||
|
||||
for (const nameValue of nameValues) {
|
||||
ret.push({
|
||||
name: t(nameValue.name),
|
||||
value: nameValue.value
|
||||
});
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
function getLocalizedDisplayNameAndTypeWithSystemDefault(typeAndNames: TypeAndName[], defaultValue: number, defaultType: TypeAndName): TypeAndDisplayName[] {
|
||||
const ret: TypeAndDisplayName[] = [];
|
||||
|
||||
@@ -2366,6 +2384,8 @@ export function useI18n() {
|
||||
getAllTransactionDefaultCategories,
|
||||
getAllDisplayExchangeRates,
|
||||
getAllSupportedImportFileCagtegoryAndTypes,
|
||||
getAllTransactionExploreConditionFields: () => getLocalizedNameValue(TransactionExploreConditionField.values()),
|
||||
getAllTransactionExploreConditionOperators: (operators?: TransactionExploreConditionOperator[]) => getLocalizedNameValue(operators ?? TransactionExploreConditionOperator.values()),
|
||||
// get localized info
|
||||
getLanguageInfo,
|
||||
getMonthShortName,
|
||||
|
||||
Reference in New Issue
Block a user