1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-02 20:15:22 +02:00

Initial sidebar listing of accounts

This commit is contained in:
Josh Pigford 2024-02-02 11:45:06 -06:00
parent 2161cce29a
commit 525fdea7da

View file

@ -53,13 +53,27 @@
</li>
</ul>
</nav>
<div class="mt-6">
<div class="flex flex-col mt-6">
<div class="flex items-center justify-between">
<span class="text-xs">Accounts</span>
<%= link_to new_account_path, class: 'block hover:bg-gray-100 p-2 text-sm font-semibold text-gray-900 flex items-center rounded' do %>
<%= inline_svg_tag('icon-add.svg', class: 'text-gray-500 fill-current') %>
<% end %>
</div>
<div>
<h2 class="text-sm font-semibold font-display">Cash</h2>
<% current_family.accounts.depository.each do |account| %>
<div class="flex items-center justify-between py-2">
<div class="flex items-center text-sm">
<%= account.name %>
</div>
<p class="text-sm text-right">
<span class="block mb-1"><%= number_to_currency account.balance %></span>
</p>
</div>
<% end %>
</div>
</div>
</div>
<main class="flex-grow py-5 pr-5">