2024-06-21 21:34:40 +05:30
|
|
|
<div class="space-y-4 h-full flex flex-col overflow-y-auto">
|
2024-05-30 20:55:18 -04:00
|
|
|
<%= render "header" %>
|
2024-05-17 09:09:32 -04:00
|
|
|
|
2024-06-24 11:58:39 -04:00
|
|
|
<%= render "summary", totals: @totals %>
|
2024-05-17 09:09:32 -04:00
|
|
|
|
2024-07-01 10:49:43 -04:00
|
|
|
<div id="transactions"
|
|
|
|
data-controller="bulk-select"
|
|
|
|
data-bulk-select-resource-value="<%= t(".transaction") %>"
|
|
|
|
class="overflow-y-auto flex flex-col bg-white rounded-xl border border-alpha-black-25 shadow-xs p-4">
|
|
|
|
<%= render "transactions/searches/search" %>
|
2024-05-30 20:55:18 -04:00
|
|
|
|
2024-07-01 10:49:43 -04:00
|
|
|
<% if @transaction_entries.present? %>
|
2024-10-28 13:02:49 +01:00
|
|
|
<div id="entry-selection-bar" data-bulk-select-target="selectionBar" class="flex justify-center hidden">
|
2024-08-09 11:22:57 -04:00
|
|
|
<%= render "account/transactions/selection_bar" %>
|
2024-06-07 12:44:06 -04:00
|
|
|
</div>
|
2024-07-01 10:49:43 -04:00
|
|
|
<div class="grow overflow-y-auto">
|
2024-06-21 21:34:40 +05:30
|
|
|
<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">
|
|
|
|
<div class="pl-0.5 col-span-4 flex items-center gap-4">
|
2024-07-01 10:49:43 -04:00
|
|
|
<%= check_box_tag "selection_entry",
|
2024-06-21 21:34:40 +05:30
|
|
|
class: "maybe-checkbox maybe-checkbox--light",
|
|
|
|
data: { action: "bulk-select#togglePageSelection" } %>
|
|
|
|
<p class="col-span-4">transaction</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<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>
|
2024-06-07 12:44:06 -04:00
|
|
|
</div>
|
2024-06-21 21:34:40 +05:30
|
|
|
<div class="space-y-6">
|
2024-08-09 11:22:57 -04:00
|
|
|
<%= entries_by_date(@transaction_entries) do |entries| %>
|
|
|
|
<%= render entries.reject { |e| e.transfer_id.present? }, selectable: true %>
|
|
|
|
<%= render transfer_entries(entries), selectable: false %>
|
2024-06-24 11:58:39 -04:00
|
|
|
<% end %>
|
2024-06-21 21:34:40 +05:30
|
|
|
</div>
|
2024-02-23 21:34:33 -05:00
|
|
|
</div>
|
2024-05-30 20:55:18 -04:00
|
|
|
<% else %>
|
2024-07-01 10:49:43 -04:00
|
|
|
<%= render "account/entries/empty" %>
|
2024-05-30 20:55:18 -04:00
|
|
|
<% end %>
|
|
|
|
|
2024-07-01 10:49:43 -04:00
|
|
|
<div class="pt-4">
|
|
|
|
<%= render "pagination", pagy: @pagy %>
|
2024-06-21 21:34:40 +05:30
|
|
|
</div>
|
2024-02-23 21:34:33 -05:00
|
|
|
</div>
|
|
|
|
</div>
|