Adição da opção de baixar a planilha preenchida para o cliente

This commit is contained in:
2026-07-13 18:33:17 -03:00
parent 75d82227c9
commit 1d4bed785d
8 changed files with 337 additions and 15 deletions

View File

@@ -4,7 +4,7 @@
são server-side; o restante da URL (modo/operação/período/cross-filters)
é preservado nos links e no form. %>
<% pg_path = ->(n) { operacoes_dashboard_path(request.query_parameters.merge('pg' => n)) } %>
<% pg_path = ->(n) { operacoes_planilha_path(request.query_parameters.merge('pg' => n)) } %>
<% resultado_badge = ->(status) {
if status == 'completed'
['Entregue', 'bg-green-500/10 text-green-400 border-green-500/30']
@@ -22,7 +22,7 @@
<p class="text-gray-400 text-sm">Espelho por NF — pesquise por nota, motorista, unidade, ocorrência, veículo...</p>
</div>
<form method="get" action="<%= operacoes_dashboard_path %>" data-turbo="false" class="flex flex-wrap items-center gap-2">
<form method="get" action="<%= operacoes_planilha_path %>" data-turbo="false" class="flex flex-wrap items-center gap-2">
<% request.query_parameters.except('q', 'pg').each do |k, v| %>
<input type="hidden" name="<%= k %>" value="<%= v %>">
<% end %>
@@ -37,7 +37,7 @@
Buscar
</button>
<% if @busca.present? %>
<%= link_to '✕ Limpar', operacoes_dashboard_path(request.query_parameters.except('q', 'pg')),
<%= link_to '✕ Limpar', operacoes_planilha_path(request.query_parameters.except('q', 'pg')),
data: { turbo: false }, class: 'text-xs text-orange-400 hover:text-orange-300 whitespace-nowrap' %>
<% end %>
</form>