Files
sure/app/views/transactions/_transaction_category.html.erb
Pieter 8f56aa2877 Fix duplicate category menu IDs for mobile/desktop
Mobile and desktop transaction category menus now use
variant-specific DOM IDs and the turbo stream response
updates both targets. This prevents duplicate IDs that
caused the menu not to close on first click on desktop.
2026-01-12 22:08:59 +01:00

15 lines
615 B
Plaintext

<%# locals: (transaction:, variant:) %>
<div id="<%= dom_id(transaction, "category_menu_#{variant}") %>">
<% if transaction.transfer&.categorizable? || transaction.transfer.nil? %>
<%= render "categories/menu", transaction: transaction %>
<% else %>
<div class="hidden lg:flex">
<%= render "categories/badge", category: transaction.transfer&.payment? ? payment_category : transfer_category %>
</div>
<div class="flex lg:hidden">
<%= render "categories/badge_mobile", category: transaction.transfer&.payment? ? payment_category : transfer_category %>
</div>
<% end %>
</div>