Files
sure/app/views/entries/_split_group.html.erb
T
7e26fcb478 feat(accounts): group split transactions in account activity feed (#3359)
The account activity tab rendered split transaction children as flat,
ungrouped rows, unlike /transactions which collapses them into a
parent row with indented children when "Group split transactions" is
enabled. Wire the same EntriesHelper.group_split_entries logic into
the account activity feed (UI::Account::ActivityDate, the actual
render path since the ViewComponent refactor superseded the old
accounts/show/_activity partial), sourcing split parents via the same
single-query batched lookup pattern already used by
TransactionsController#index.

Also forward view_ctx through entries/_split_group so split children
render correctly regardless of which page renders the group.

Fixes we-promise/sure#3227

Co-authored-by: Gerald <248542187+gfr-free@users.noreply.github.com>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-03 22:20:25 +02:00

11 lines
436 B
ERB

<%# locals: (split_group:, view_ctx: "global") %>
<div class="split-group">
<%= render "transactions/split_parent_row", entry: split_group.parent %>
<% split_group.children.each do |child_entry| %>
<% if child_entry.entryable.present? %>
<%= render partial: child_entry.entryable.to_partial_path,
locals: { entry: child_entry, in_split_group: true, view_ctx: view_ctx } %>
<% end %>
<% end %>
</div>