2024-05-30 20:55:18 -04:00
|
|
|
<div
|
|
|
|
id="transaction-filters-menu"
|
|
|
|
data-menu-target="content"
|
|
|
|
data-controller="tabs"
|
|
|
|
data-tabs-active-class="bg-gray-25 text-gray-900"
|
|
|
|
data-tabs-default-tab-value="<%= get_default_transaction_search_filter[:key] %>"
|
2024-09-13 15:43:16 -04:00
|
|
|
class="hidden absolute flex z-10 h-80 w-[540px] top-12 right-0 border border-alpha-black-100 bg-white rounded-lg shadow-xs">
|
|
|
|
<div class="flex w-44 flex-col items-start p-3 text-sm font-medium text-gray-500 border-r border-r-alpha-black-100">
|
2024-05-30 20:55:18 -04:00
|
|
|
<% transaction_search_filters.each do |filter| %>
|
|
|
|
<button
|
|
|
|
class="flex text-gray-500 hover:bg-gray-25 items-center gap-2 px-3 rounded-md py-2 w-full"
|
|
|
|
type="button"
|
|
|
|
data-id="<%= filter[:key] %>"
|
|
|
|
data-tabs-target="btn"
|
|
|
|
data-action="tabs#select">
|
|
|
|
<%= lucide_icon(filter[:icon], class: "w-5 h-5") %>
|
|
|
|
<span class="text-sm font-medium"><%= filter[:name] %></span>
|
|
|
|
</button>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="flex flex-col grow">
|
2024-09-13 15:43:16 -04:00
|
|
|
<div class="grow p-2 border-b border-b-alpha-black-100 overflow-y-auto">
|
2024-05-30 20:55:18 -04:00
|
|
|
<% transaction_search_filters.each do |filter| %>
|
|
|
|
<div id="<%= filter[:key] %>" data-tabs-target="tab">
|
|
|
|
<%= render partial: get_transaction_search_filter_partial_path(filter), locals: { form: form } %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<div class="flex justify-end items-center gap-2 bg-white p-3">
|
|
|
|
<%= button_tag type: "reset", data: { action: "menu#close" }, class: "py-2 px-3 bg-gray-50 rounded-lg text-sm text-gray-900 font-medium" do %>
|
|
|
|
Cancel
|
|
|
|
<% end %>
|
2024-06-24 12:49:08 +02:00
|
|
|
<%= form.submit "Apply", name: nil, class: "py-2 px-3 bg-gray-900 hover:bg-gray-700 rounded-lg text-sm text-white font-medium cursor-pointer" %>
|
2024-05-30 20:55:18 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|