-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrate transaction category preset page to composition API and types…
…cript
- Loading branch information
Showing
5 changed files
with
195 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.