2024-02-23 21:34:33 -05:00
|
|
|
<div class="space-y-4">
|
2024-05-17 09:09:32 -04:00
|
|
|
|
2024-05-30 20:55:18 -04:00
|
|
|
<%= render "header" %>
|
2024-05-17 09:09:32 -04:00
|
|
|
|
2024-05-30 20:55:18 -04:00
|
|
|
<%= render partial: "transactions/summary", locals: { totals: @totals } %>
|
2024-05-17 09:09:32 -04:00
|
|
|
|
2024-05-30 20:55:18 -04:00
|
|
|
<div id="transactions" class="bg-white rounded-xl border border-alpha-black-25 shadow-xs p-4 space-y-4">
|
2024-05-02 07:24:31 -06:00
|
|
|
|
2024-05-30 20:55:18 -04:00
|
|
|
<%= render partial: "transactions/searches/search", locals: { transactions: @transactions } %>
|
|
|
|
|
|
|
|
<% if @transactions.present? %>
|
|
|
|
<div class="grid grid-cols-12 bg-gray-25 rounded-xl px-5 py-3 text-xs uppercase font-medium text-gray-500 items-center mb-4">
|
|
|
|
<p class="col-span-4">transaction</p>
|
|
|
|
<p class="col-span-3 pl-4">category</p>
|
|
|
|
<p class="col-span-3">account</p>
|
|
|
|
<p class="col-span-2 justify-self-end">amount</p>
|
|
|
|
</div>
|
|
|
|
<div class="space-y-6">
|
|
|
|
<% @transactions.group_by(&:date).each do |date, transactions| %>
|
|
|
|
<%= transactions_group(date, transactions) %>
|
2024-02-23 21:34:33 -05:00
|
|
|
<% end %>
|
|
|
|
</div>
|
2024-05-30 20:55:18 -04:00
|
|
|
<% else %>
|
|
|
|
<%= render "empty" %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% if @pagy.pages > 1 %>
|
|
|
|
<%= render "pagination", pagy: @pagy %>
|
|
|
|
<% end %>
|
|
|
|
|
2024-02-23 21:34:33 -05:00
|
|
|
</div>
|
|
|
|
</div>
|