<%= turbo_frame_tag "category_dropdown" do %>
" autocomplete="nope" type="search" class="bg-container placeholder:text-sm placeholder:text-secondary font-normal h-10 relative pl-10 w-full border-none rounded-lg focus:outline-hidden focus:ring-0" data-list-filter-target="input" data-action="list-filter#filter"> <%= icon("search", class: "absolute inset-0 ml-2 transform top-1/2 -translate-y-1/2") %>
<% if @categories.any? %> <% Category::Group.for(@categories).each do |group| %> <%= render "category/dropdowns/row", category: group.category %> <% group.subcategories.each do |category| %> <%= render "category/dropdowns/row", category: category %> <% end %> <% end %> <% else %>

<%= t(".empty") %>

<%= render ButtonComponent.new( text: t(".bootstrap"), variant: "outline", href: bootstrap_categories_path, method: :post, data: { turbo_frame: :_top }) %>
<% end %>
<%= render "shared/ruler", classes: "my-2" %>
<% if @transaction.category %> <%= button_to transaction_path(@transaction.entry), method: :patch, data: { turbo_frame: dom_id(@transaction.entry) }, params: { entry: { entryable_type: "Transaction", entryable_attributes: { id: @transaction.id, category_id: nil } } }, class: "flex text-sm font-medium items-center gap-2 text-secondary w-full rounded-lg p-2 hover:bg-container-inset-hover" do %> <%= icon("minus") %> <%= t(".clear") %> <% end %> <% end %> <% unless @transaction.transfer? %> <%= link_to new_transaction_transfer_match_path(@transaction.entry), class: "flex text-sm font-medium items-center gap-2 text-secondary w-full rounded-lg p-2 hover:bg-container-inset-hover", data: { turbo_frame: "modal" } do %> <%= icon("refresh-cw") %>

Match transfer/payment

<% end %> <% end %>
<%= form_with url: transaction_path(@transaction.entry), method: :patch, data: { controller: "auto-submit-form" } do |f| %> <%= f.hidden_field "entry[excluded]", value: !@transaction.entry.excluded %> <%= f.check_box "entry[excluded]", checked: @transaction.entry.excluded, class: "checkbox checkbox--light", data: { auto_submit_form_target: "auto", autosubmit_trigger_event: "change" } %> <% end %>

One-time <%= @transaction.entry.amount.negative? ? "income" : "expense" %>

<%= icon("asterisk", color: "current") %>
<% end %>