mirror of
https://github.com/we-promise/sure.git
synced 2026-05-30 07:49: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:
@@ -1,16 +0,0 @@
|
||||
<div class="bg-container rounded-xl shadow-border-xs p-6">
|
||||
<div class="flex items-center gap-3 mb-3">
|
||||
<span class="inline-flex items-center justify-center w-9 h-9 rounded-full text-inverse text-sm font-semibold"
|
||||
style="background-color: var(--color-blue-500);">
|
||||
<%= initial %>
|
||||
</span>
|
||||
<div class="min-w-0 flex-1">
|
||||
<p class="text-sm font-medium text-primary truncate"><%= account.name %></p>
|
||||
<p class="text-xs text-secondary"><%= subtype_label %></p>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-2xl font-medium text-primary tabular-nums privacy-sensitive">
|
||||
<%= Money.new(account.balance, account.currency).format %>
|
||||
</p>
|
||||
<p class="text-xs text-subdued mt-1"><%= funds_label %></p>
|
||||
</div>
|
||||
@@ -1,20 +0,0 @@
|
||||
class Savings::AccountCardComponent < ApplicationComponent
|
||||
def initialize(account:, goals_count: 0)
|
||||
@account = account
|
||||
@goals_count = goals_count
|
||||
end
|
||||
|
||||
attr_reader :account, :goals_count
|
||||
|
||||
def initial
|
||||
account.name.to_s.strip.first&.upcase || "?"
|
||||
end
|
||||
|
||||
def subtype_label
|
||||
(account.subtype || "savings").to_s.titleize
|
||||
end
|
||||
|
||||
def funds_label
|
||||
I18n.t("savings_goals.index.account_card.funds", count: goals_count)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user