add search box in transaction category page / dialog

This commit is contained in:
MaysWind
2025-12-14 01:05:42 +08:00
parent a12038e40c
commit b1cefa5a34
14 changed files with 279 additions and 298 deletions
+14 -10
View File
@@ -81,6 +81,20 @@ export class TransactionCategory implements TransactionCategoryInfoResponse {
this.visible = other.visible;
}
public clone(): TransactionCategory {
return new TransactionCategory(
this.id,
this.name,
this.parentId,
this.type,
this.icon,
this.color,
this.comment,
this.displayOrder,
this.visible
);
}
public toCreateRequest(clientSessionId: string): TransactionCategoryCreateRequest {
return {
name: this.name,
@@ -217,13 +231,3 @@ export interface TransactionCategoryInfoResponse {
readonly hidden: boolean;
readonly subCategories?: TransactionCategoryInfoResponse[];
}
export interface TransactionCategoriesWithVisibleCount {
readonly type: number;
readonly allCategories: TransactionCategory[];
readonly allVisibleCategoryCount: number;
readonly firstVisibleCategoryIndex: number;
readonly allSubCategories: Record<string, TransactionCategory[]>;
readonly allVisibleSubCategoryCounts: Record<string, number>;
readonly allFirstVisibleSubCategoryIndexes: Record<string, number>;
}