mirror of
https://github.com/we-promise/sure.git
synced 2026-04-25 06:54:07 +00:00
* Add institution management * Allow user to select institution on create or edit * Improve redirect behavior * Final cleanup * i18n normalization
18 lines
613 B
Plaintext
18 lines
613 B
Plaintext
<%# locals: (accounts:) %>
|
|
|
|
<% accounts.group_by(&:accountable_type).each do |group, accounts| %>
|
|
<div class="bg-gray-25 p-1 rounded-xl">
|
|
<div class="flex items-center px-4 py-2 text-xs font-medium text-gray-500">
|
|
<p><%= to_accountable_title(Accountable.from_type(group)) %></p>
|
|
<span class="text-gray-400 mx-2">·</span>
|
|
<p><%= accounts.count %></p>
|
|
<p class="ml-auto"><%= format_money accounts.sum(&:balance_money) %></p>
|
|
</div>
|
|
<div class="bg-white">
|
|
<% accounts.each do |account| %>
|
|
<%= render account %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
<% end %>
|