mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-15 23:47:33 +08:00
migrate transaction category preset page to composition API and typescript
This commit is contained in:
@@ -1,5 +1,41 @@
|
||||
import type { ColorValue } from '@/core/color.ts';
|
||||
|
||||
export enum CategoryType {
|
||||
Income = 1,
|
||||
Expense = 2,
|
||||
Transfer = 3
|
||||
}
|
||||
|
||||
export const ALL_CATEGORY_TYPES: CategoryType[] = [
|
||||
CategoryType.Income,
|
||||
CategoryType.Expense,
|
||||
CategoryType.Transfer
|
||||
];
|
||||
|
||||
export interface PresetCategory {
|
||||
readonly name: string;
|
||||
readonly categoryIconId: string;
|
||||
readonly color: ColorValue;
|
||||
readonly subCategories: PresetSubCategory[];
|
||||
}
|
||||
|
||||
export interface PresetSubCategory {
|
||||
readonly name: string;
|
||||
readonly categoryIconId: string;
|
||||
readonly color: ColorValue;
|
||||
}
|
||||
|
||||
export interface LocalizedPresetCategory {
|
||||
readonly name: string;
|
||||
readonly type: CategoryType;
|
||||
readonly icon: string;
|
||||
readonly color: ColorValue;
|
||||
readonly subCategories: LocalizedPresetSubCategory[];
|
||||
}
|
||||
|
||||
export interface LocalizedPresetSubCategory {
|
||||
readonly name: string;
|
||||
readonly type: CategoryType;
|
||||
readonly icon: string;
|
||||
readonly color: ColorValue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user