mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-06 14:05:20 +02:00
* Consolidate modal form structure into partial + helper * Scaffold out trade transaction form * Normalize translations * Add buy and sell trade form with tests * Move entryable lists to dedicated controllers * Delegate entry group contents rendering * More cleanup * Extract transaction and valuation update logic from entries controller * Delegate edit and show actions to entryables * Trade builder * Update paths for transaction updates
44 lines
1.7 KiB
Text
44 lines
1.7 KiB
Text
<div class="space-y-4 h-full flex flex-col overflow-y-auto">
|
|
<%= render "header" %>
|
|
|
|
<%= render "summary", totals: @totals %>
|
|
|
|
<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" %>
|
|
|
|
<% if @transaction_entries.present? %>
|
|
<div hidden id="entry-selection-bar" data-bulk-select-target="selectionBar">
|
|
<%= render "account/transactions/selection_bar" %>
|
|
</div>
|
|
<div class="grow overflow-y-auto">
|
|
<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">
|
|
<%= check_box_tag "selection_entry",
|
|
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>
|
|
</div>
|
|
<div class="space-y-6">
|
|
<%= entries_by_date(@transaction_entries) do |entries| %>
|
|
<%= render entries.reject { |e| e.transfer_id.present? }, selectable: true %>
|
|
<%= render transfer_entries(entries), selectable: false %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
<% else %>
|
|
<%= render "account/entries/empty" %>
|
|
<% end %>
|
|
|
|
<div class="pt-4">
|
|
<%= render "pagination", pagy: @pagy %>
|
|
</div>
|
|
</div>
|
|
</div>
|