mirror of
https://github.com/we-promise/sure.git
synced 2026-06-01 00:39:01 +00:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user