money: archived accounts (accounts.archived) — closed banks stay in history, net worth and charts but leave the quick balances, quick add and account pickers; archived section in the accounts panel; quick add defaults to Revolut
All checks were successful
Deploy production / deploy (push) Successful in 1m7s

This commit is contained in:
2026-10-25 15:42:40 +00:00
parent 968ec34ac5
commit 9114b5433b
9 changed files with 27157 additions and 49 deletions

View File

@@ -52,7 +52,9 @@
const remembered =
typeof localStorage === 'undefined' ? null : localStorage.getItem(storageKey);
accountId = String(
accounts.find((account) => String(account.id) === remembered)?.id ?? accounts[0].id
accounts.find((account) => String(account.id) === remembered)?.id ??
accounts.find((account) => account.name.toLowerCase() === 'revolut')?.id ??
accounts[0].id
);
}
});

View File

@@ -27,6 +27,10 @@ export const moneyAccounts = moneySchema.table(
// False for money tracked but not owned (e.g. a savings account parents controlled):
// still listed with its own balance, left out of net worth and the total wealth chart.
includeInTotal: boolean('include_in_total').notNull().default(true),
// Closed or no longer used accounts (old banks, Trading 212 once emptied): kept for history,
// transactions and the wealth chart, but left out of the quick balances and account pickers.
// Their balance still counts in net worth (include_in_total) until it reaches zero.
archived: boolean('archived').notNull().default(false),
color: text('color'),
// Household scope: Stan's own money vs. the joint account with Juhee.
scope: text('scope').notNull().default('personal'),