fix the wrong display order of savings accounts and certificate of deposit accounts

This commit is contained in:
MaysWind
2025-02-09 23:41:44 +08:00
parent 1658d0758c
commit a0e3a269a0
6 changed files with 63 additions and 27 deletions
+12 -10
View File
@@ -25,24 +25,26 @@ export class AccountCategory implements TypeAndName {
private static readonly allInstances: AccountCategory[] = [];
private static readonly allInstancesByType: Record<number, AccountCategory> = {};
public static readonly Cash = new AccountCategory(1, 'Cash', '1');
public static readonly CheckingAccount = new AccountCategory(2, 'Checking Account', '100');
public static readonly SavingsAccount = new AccountCategory(8, 'Savings Account', '100');
public static readonly CreditCard = new AccountCategory(3, 'Credit Card', '100');
public static readonly VirtualAccount = new AccountCategory(4, 'Virtual Account', '500');
public static readonly DebtAccount = new AccountCategory(5, 'Debt Account', '600');
public static readonly Receivables = new AccountCategory(6, 'Receivables', '700');
public static readonly CertificateOfDeposit = new AccountCategory(9, 'Certificate of Deposit', '110');
public static readonly InvestmentAccount = new AccountCategory(7, 'Investment Account', '800');
public static readonly Cash = new AccountCategory(1, 1, 'Cash', '1');
public static readonly CheckingAccount = new AccountCategory(2, 2, 'Checking Account', '100');
public static readonly SavingsAccount = new AccountCategory(8, 3, 'Savings Account', '100');
public static readonly CreditCard = new AccountCategory(3, 4, 'Credit Card', '100');
public static readonly VirtualAccount = new AccountCategory(4, 5, 'Virtual Account', '500');
public static readonly DebtAccount = new AccountCategory(5, 6, 'Debt Account', '600');
public static readonly Receivables = new AccountCategory(6, 7, 'Receivables', '700');
public static readonly CertificateOfDeposit = new AccountCategory(9, 8, 'Certificate of Deposit', '110');
public static readonly InvestmentAccount = new AccountCategory(7, 9, 'Investment Account', '800');
public static readonly Default = AccountCategory.Cash;
public readonly type: number;
public readonly displayOrder: number;
public readonly name: string;
public readonly defaultAccountIconId: string;
private constructor(type: number, name: string, defaultAccountIconId: string) {
private constructor(type: number, displayOrder: number, name: string, defaultAccountIconId: string) {
this.type = type;
this.displayOrder = displayOrder;
this.name = name;
this.defaultAccountIconId = defaultAccountIconId;