2024-06-24 11:58:39 -04:00
|
|
|
<%= turbo_frame_tag dom_id(@account, "transactions") do %>
|
|
|
|
<div class="bg-white space-y-4 p-5 border border-alpha-black-25 rounded-xl shadow-xs">
|
|
|
|
<div class="flex justify-between items-center">
|
|
|
|
<h3 class="font-medium text-lg"><%= t(".transactions") %></h3>
|
2024-11-27 16:01:50 -05:00
|
|
|
<%= link_to new_account_transaction_path(account_id: @account),
|
2024-06-24 11:58:39 -04:00
|
|
|
class: "flex gap-1 font-medium items-center bg-gray-50 text-gray-900 p-2 rounded-lg",
|
2024-08-09 11:22:57 -04:00
|
|
|
data: { turbo_frame: :modal } do %>
|
2024-06-24 11:58:39 -04:00
|
|
|
<%= lucide_icon("plus", class: "w-5 h-5 text-gray-900") %>
|
|
|
|
<span class="text-sm"><%= t(".new") %></span>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="transactions" data-controller="bulk-select" data-bulk-select-resource-value="<%= t(".transaction") %>">
|
2024-10-28 11:29:52 -04:00
|
|
|
<div id="transaction-selection-bar" data-bulk-select-target="selectionBar" class="flex justify-center hidden">
|
2024-08-09 11:22:57 -04:00
|
|
|
<%= render "selection_bar" %>
|
2024-06-24 11:58:39 -04:00
|
|
|
</div>
|
|
|
|
|
2024-08-09 11:22:57 -04:00
|
|
|
<% if @entries.empty? %>
|
2024-06-24 11:58:39 -04:00
|
|
|
<p class="text-gray-500 py-4"><%= t(".no_transactions") %></p>
|
|
|
|
<% else %>
|
|
|
|
<div class="space-y-6">
|
2024-08-09 11:22:57 -04:00
|
|
|
<%= entries_by_date(@entries) do |entries| %>
|
|
|
|
<%= render entries %>
|
2024-06-24 11:58:39 -04:00
|
|
|
<% end %>
|
|
|
|
</div>
|
2024-08-16 15:00:05 +02:00
|
|
|
<div class="pt-4">
|
|
|
|
<%= render "pagination", pagy: @pagy %>
|
|
|
|
</div>
|
2024-06-24 11:58:39 -04:00
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|