feat(savings_goals): drop Accounts section from index

The Accounts grid duplicated the sidebar account list. Removing it gives
the Goals section more breathing room and the page a tighter narrative:
header → KPIs → Goals.

Delete Savings::AccountCardComponent, Family#savings_subtype_accounts,
the @savings_accounts / @account_goal_counts controller refs, and the
related locale keys. Sidebar still shows the savings-subtype Depository
accounts under "Cash" — no information is lost.
This commit is contained in:
Guillem Arias
2026-05-11 14:23:00 +02:00
parent 3e05ea8670
commit f51e38f4fc
6 changed files with 1 additions and 81 deletions

View File

@@ -45,15 +45,6 @@ class Family < ApplicationRecord
has_many :savings_goals, dependent: :destroy
has_many :savings_contributions, through: :savings_goals
# Depository accounts with subtype = "savings". The /savings_goals
# index hero shows the total + sparkline across just these accounts;
# checking / HSA / CD / money-market are intentionally excluded.
def savings_subtype_accounts
accounts.where(accountable_type: "Depository").visible.alphabetically.select do |account|
account.subtype == "savings"
end
end
# Sum of contribution amounts within the given date range, returned as
# a BigDecimal in the family's primary currency. Powers the savings
# goals "Contributed · last 30d" KPI.