mirror of
https://github.com/we-promise/sure.git
synced 2026-04-09 15:24:48 +00:00
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.
15 lines
615 B
Plaintext
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>
|