2024-06-13 14:37:27 -04:00
|
|
|
<%# locals: (accounts:) %>
|
|
|
|
|
2024-11-15 13:49:37 -05:00
|
|
|
<% accounts.group_by(&:accountable_type).sort_by { |group, _| group }.each do |group, accounts| %>
|
2025-04-11 09:28:00 -05:00
|
|
|
<div class="bg-container-inset p-1 rounded-xl">
|
2025-02-13 11:31:07 -05:00
|
|
|
<div class="flex items-center px-4 py-2 text-xs font-medium text-secondary">
|
2025-02-21 11:57:59 -05:00
|
|
|
<p><%= Accountable.from_type(group).display_name %></p>
|
2025-02-13 11:31:07 -05:00
|
|
|
<span class="text-subdued mx-2">·</span>
|
2024-06-13 14:37:27 -04:00
|
|
|
<p><%= accounts.count %></p>
|
2025-05-15 10:19:56 -04:00
|
|
|
|
|
|
|
<% unless accounts.any?(&:syncing?) %>
|
|
|
|
<p class="ml-auto"><%= totals_by_currency(collection: accounts, money_method: :balance_money) %></p>
|
|
|
|
<% end %>
|
2024-06-13 14:37:27 -04:00
|
|
|
</div>
|
2025-05-15 10:19:56 -04:00
|
|
|
<div class="bg-container rounded-md">
|
2024-06-13 14:37:27 -04:00
|
|
|
<% accounts.each do |account| %>
|
|
|
|
<%= render account %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|