1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-05 05:25:24 +02:00

Fix transaction filters when transfers are present (#1986)
Some checks failed
Publish Docker image / ci (push) Has been cancelled
Publish Docker image / Build docker image (push) Has been cancelled

* Proper filtering of transfers in search

* Fix transaction search
This commit is contained in:
Zach Gollwitzer 2025-03-11 15:38:45 -04:00 committed by GitHub
parent ed55ef624b
commit dd75cadebc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 96 additions and 45 deletions

View file

@ -1,4 +1,4 @@
<div class="space-y-4 h-fit max-h-full flex flex-col" data-controller="focus-record" data-focus-record-id-value="<%= @focused_record ? dom_id(@focused_record) : nil %>">
<div class="space-y-4 pb-20 flex flex-col" data-controller="focus-record" data-focus-record-id-value="<%= @focused_record ? dom_id(@focused_record) : nil %>">
<%= render "header" %>
<%= render "summary", totals: @totals %>
@ -7,7 +7,7 @@
data-controller="bulk-select"
data-bulk-select-singular-label-value="<%= t(".transaction") %>"
data-bulk-select-plural-label-value="<%= t(".transactions") %>"
class="overflow-y-auto flex flex-col bg-white rounded-xl shadow-border-xs p-4">
class="flex flex-col bg-white rounded-xl shadow-border-xs p-4">
<%= render "transactions/searches/search" %>
<div id="entry-selection-bar" data-bulk-select-target="selectionBar" class="flex justify-center hidden">
@ -29,8 +29,7 @@
</div>
<div class="space-y-6">
<%= entries_by_date(@transactions.map(&:entry), totals: true) do |entries| %>
<%# Only render the outflow side of transfers to avoid duplicate entries %>
<%= render partial: "account/entries/entry", collection: entries.reject { |e| e.entryable.transfer_as_inflow.present? } %>
<%= render entries %>
<% end %>
</div>
</div>