mirror of
https://github.com/we-promise/sure.git
synced 2026-04-26 23:44:12 +00:00
* [claudesquad] update from 'component-namespacing' on 18 Jul 25 07:23 EDT * [claudesquad] update from 'component-namespacing' on 18 Jul 25 07:30 EDT * Update stimulus controller references to use namespace * Fix remaining tests
35 lines
1.2 KiB
Plaintext
35 lines
1.2 KiB
Plaintext
<%= form_with url: transactions_path,
|
|
id: "transactions-search",
|
|
scope: :q,
|
|
method: :get,
|
|
data: { controller: "auto-submit-form" } do |form| %>
|
|
<%= hidden_field_tag :per_page, params[:per_page] %>
|
|
|
|
<div class="flex gap-2 mb-4">
|
|
<div class="grow">
|
|
<div class="flex items-center px-3 py-2 gap-2 border border-secondary rounded-lg focus-within:ring-secondary focus-within:border-secondary">
|
|
<%= icon("search") %>
|
|
<%= form.text_field :search,
|
|
placeholder: "Search transactions ...",
|
|
value: @q[:search],
|
|
class: "form-field__input placeholder:text-sm placeholder:text-secondary",
|
|
"data-auto-submit-form-target": "auto" %>
|
|
</div>
|
|
</div>
|
|
|
|
<%= render DS::Menu.new(variant: "button", no_padding: true) do |menu| %>
|
|
<% menu.with_button(
|
|
id: "transaction-filters-button",
|
|
type: "button",
|
|
text: "Filter",
|
|
variant: "outline",
|
|
icon: "list-filter"
|
|
) %>
|
|
|
|
<% menu.with_custom_content do %>
|
|
<%= render "transactions/searches/menu", form: form %>
|
|
<% end %>
|
|
<% end %>
|
|
</div>
|
|
<% end %>
|