add "debit_card" as a new AccountType (#16)

This commit is contained in:
whaley
2026-09-08 20:03:13 +03:00
committed by GitHub
parent ae89311a8e
commit 12c3a7d79c
10 changed files with 69 additions and 6 deletions

View File

@@ -12,7 +12,7 @@ interface AccountFormModalProps {
account?: Account | null;
}
const ACCOUNT_TYPES: AccountType[] = ["checking", "savings", "credit_card", "cash", "investment", "other"];
const ACCOUNT_TYPES: AccountType[] = ["checking", "debit_card", "savings", "credit_card", "cash", "investment", "other"];
const EMPTY_FORM = { name: "", type: "checking" as AccountType };

View File

@@ -12,6 +12,7 @@ interface AccountListProps {
const TYPE_ICONS: Record<AccountType, LucideIcon> = {
checking: Wallet,
debit_card: CreditCard,
savings: PiggyBank,
credit_card: CreditCard,
cash: Banknote,

View File

@@ -424,6 +424,7 @@ const ru = {
"account.confirmDelete":
"Удалить счёт «{{name}}»?\n\nЭто безвозвратно удалит и ВСЕ транзакции по этому счёту. Если хотите сохранить историю, заархивируйте счёт вместо удаления.",
"account.type.checking": "Текущий счёт",
"account.type.debit_card": "Дебетовая карта",
"account.type.savings": "Накопительный счёт",
"account.type.credit_card": "Кредитная карта",
"account.type.cash": "Наличные",
@@ -918,6 +919,7 @@ const en: Record<keyof typeof ru, string> = {
"account.confirmDelete":
"Delete the account “{{name}}”?\n\nThis will permanently delete ALL transactions on this account too. If you want to keep the history, archive the account instead of deleting it.",
"account.type.checking": "Checking",
"account.type.debit_card": "Debit card",
"account.type.savings": "Savings",
"account.type.credit_card": "Credit card",
"account.type.cash": "Cash",

View File

@@ -1,4 +1,4 @@
export type AccountType = "checking" | "savings" | "credit_card" | "cash" | "investment" | "other";
export type AccountType = "checking" | "debit_card" | "savings" | "credit_card" | "cash" | "investment" | "other";
export type CategoryKind = "income" | "expense";
export type TransactionType = "income" | "expense" | "transfer";
export type RecurringFrequency = "weekly" | "monthly" | "yearly";