Adição de Mata com os pontos da onde foi entreque e corrige o filtro ao vivo

This commit is contained in:
2026-06-29 21:06:08 -03:00
parent 6b899ebafa
commit 7d6c79f878
5 changed files with 144 additions and 27 deletions

View File

@@ -25,11 +25,13 @@
<% celulas.each_with_index do |cel, i| %>
<td class="py-2 align-top <%= i.zero? ? 'pr-3 text-gray-300' : 'pl-4 text-right whitespace-nowrap font-semibold text-white' %>">
<% if i.zero? && filtro %>
<%= link_to cel,
operacoes_dashboard_path(base.merge(filtro => cel.to_s)),
<% destino = ativo ? base.except(filtro) : base.merge(filtro => cel.to_s) %>
<%= link_to operacoes_dashboard_path(destino),
data: { turbo: false },
title: "Filtrar por #{cel}",
class: "inline-flex items-center gap-1 hover:text-orange-400 #{'text-orange-400 font-semibold' if ativo}" %>
title: (ativo ? 'Clique para remover o filtro' : "Filtrar por #{cel}"),
class: "inline-flex items-center gap-1 hover:text-orange-400 #{'text-orange-400 font-semibold' if ativo}" do %>
<%= cel %><% if ativo %> <span aria-hidden="true">✕</span><% end %>
<% end %>
<% else %>
<%= cel %>
<% end %>