Accounts

<%= link_to new_account_path, class: "flex text-white text-sm font-medium items-center gap-1 bg-gray-900 rounded-lg p-2", data: { turbo_frame: "modal" } do %> <%= lucide_icon("plus", class: "w-5 h-5") %> <%= t('.new_account') %> <% end %>
<% if Current.family.accounts.empty? %>

No accounts yet

Add an account either via connection, importing or entering manually.

<%= link_to new_account_path, class: "w-fit flex text-white text-sm font-medium items-center gap-1 bg-gray-900 rounded-lg p-2", data: { turbo_frame: "modal" } do %> <%= lucide_icon("plus", class: "w-5 h-5") %> <%= t('.new_account') %> <% end %>
<% else %>
<% Current.family.accounts.by_provider.each do |item| %>
<%= lucide_icon("chevron-down", class: "hidden group-open:block w-5 h-5 text-gray-500") %> <%= lucide_icon("chevron-right", class: "group-open:hidden w-5 h-5 text-gray-500") %> <% if item[:name] == "Manual accounts" %>
<%= lucide_icon("folder-pen", class: "w-5 h-5 text-gray-500") %>
<% end %> <%= item[:name] %>
<% item[:accounts].each do |group, accounts| %>

<%= to_accountable_title(Accountable.from_type(group)) %>

·

<%= accounts.count %>

<%= format_money accounts.sum(&:balance_money) %>

<% accounts.each do |account| %> <%= render account %> <% end %>
<% end %>
<% end %>
<% end %>