Ateração da autura dos icones

This commit is contained in:
2026-07-20 15:59:41 -03:00
parent 42d06c50a7
commit f6ae32f485
29 changed files with 147 additions and 135 deletions

View File

@@ -57,9 +57,20 @@ module ApplicationHelper
# icone(:sucesso, cor: "text-green-400") # status verde # icone(:sucesso, cor: "text-green-400") # status verde
# icone(:fechar, cor: nil) # herda a cor do elemento pai # icone(:fechar, cor: nil) # herda a cor do elemento pai
# icone(:dashboard, titulo: "Painel") # acessível (vira role="img") # icone(:dashboard, titulo: "Painel") # acessível (vira role="img")
def icone(nome, cor: "text-brand-laranja", tamanho: "w-[1.05em] h-[1.05em]", classe: nil, titulo: nil) # icone(:fechar, espaco: false) # sem margem (ícone sozinho/centralizado)
#
# ATENÇÃO — contraste: em fundo LARANJA (bg-orange-*, bg-[#f97316]) o laranja
# padrão fica invisível. Nesses casos passe `cor: nil` (herda a cor do texto do
# container) ou `cor: "text-black"`.
#
# `espaco:` acrescenta uma margem à direita para o ícone não colar no texto.
# Desligue (`espaco: false`) quando o ícone estiver sozinho ou centralizado —
# senão a margem o tira do eixo — ou quando o container já tiver `gap-*`.
def icone(nome, cor: "text-brand-laranja", tamanho: "w-[1.25em] h-[1.25em]",
classe: nil, titulo: nil, espaco: true)
simbolo = ICONES.fetch(nome.to_sym) { nome.to_s } simbolo = ICONES.fetch(nome.to_sym) { nome.to_s }
css = ["inline-block align-[-0.125em] shrink-0", tamanho, cor, classe].compact.join(" ") css = ["inline-block align-[-0.125em] shrink-0", ("mr-1" if espaco),
tamanho, cor, classe].compact.join(" ")
tag.svg(class: css, fill: "currentColor", role: (titulo ? "img" : nil), tag.svg(class: css, fill: "currentColor", role: (titulo ? "img" : nil),
aria: { hidden: (titulo ? nil : true), label: titulo }) do aria: { hidden: (titulo ? nil : true), label: titulo }) do
@@ -75,8 +86,9 @@ module ApplicationHelper
# Atenção: NÃO serve para `f.submit` nem `button_to` sem bloco — ambos geram # Atenção: NÃO serve para `f.submit` nem `button_to` sem bloco — ambos geram
# <input type="submit">, que não aceita HTML dentro. Nesses casos use # <input type="submit">, que não aceita HTML dentro. Nesses casos use
# `button_tag`/`button_to ... do`. # `button_tag`/`button_to ... do`.
def rotulo(nome, texto, cor: "text-brand-laranja", tamanho: "w-4 h-4") def rotulo(nome, texto, cor: "text-brand-laranja", tamanho: "w-5 h-5")
safe_join([icone(nome, cor: cor, tamanho: tamanho), texto], " ") # O espaçamento vem do `mr-1` do próprio ícone (ver `icone`).
safe_join([icone(nome, cor: cor, tamanho: tamanho), texto])
end end
# Opções [label, valor] para o select de perfil de usuário (form de usuário) # Opções [label, valor] para o select de perfil de usuário (form de usuário)
@@ -96,7 +108,7 @@ module ApplicationHelper
conteudo = if icon conteudo = if icon
safe_join([icone(icon, cor: (active ? "text-black" : "text-brand-laranja"), safe_join([icone(icon, cor: (active ? "text-black" : "text-brand-laranja"),
tamanho: "w-4 h-4"), label]) tamanho: "w-5 h-5", espaco: false), label])
else else
label label
end end
@@ -135,7 +147,7 @@ module ApplicationHelper
def badge_com_icone(cfg) def badge_com_icone(cfg)
tag.span class: "inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-bold #{cfg[:cor]}" do tag.span class: "inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-bold #{cfg[:cor]}" do
safe_join([icone(cfg[:icone], cor: nil, tamanho: "w-3.5 h-3.5"), cfg[:label]]) safe_join([icone(cfg[:icone], cor: nil, tamanho: "w-4 h-4", espaco: false), cfg[:label]])
end end
end end

View File

@@ -1,7 +1,7 @@
<%# app/views/admin/auditoria_logs/index.html.erb %> <%# app/views/admin/auditoria_logs/index.html.erb %>
<% content_for :title, 'Auditoria' %> <% content_for :title, 'Auditoria' %>
<h1 class="text-2xl font-bold text-white mb-6 flex items-center gap-2"><%= icone :auditoria %> Auditoria</h1> <h1 class="text-2xl font-bold text-white mb-6 flex items-center gap-2"><%= icone :auditoria, espaco: false %> Auditoria</h1>
<%= form_with url: admin_auditoria_logs_path, method: :get, <%= form_with url: admin_auditoria_logs_path, method: :get,
class: 'bg-[#1a1a1a] border border-[#2a2a2a] rounded-xl p-4 mb-6 flex flex-wrap gap-3' do %> class: 'bg-[#1a1a1a] border border-[#2a2a2a] rounded-xl p-4 mb-6 flex flex-wrap gap-3' do %>

View File

@@ -10,7 +10,7 @@
<%# Pilares de preço %> <%# Pilares de preço %>
<div> <div>
<h2 class="text-lg font-semibold text-white mb-4 flex items-center gap-2"><%= icone :dinheiro %> Pilares de Preço</h2> <h2 class="text-lg font-semibold text-white mb-4 flex items-center gap-2"><%= icone :dinheiro, espaco: false %> Pilares de Preço</h2>
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4"> <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4">
<% @configuracoes.each do |cfg| %> <% @configuracoes.each do |cfg| %>
<div class="bg-[#1a1a1a] rounded-2xl border border-white/5 p-6 group relative"> <div class="bg-[#1a1a1a] rounded-2xl border border-white/5 p-6 group relative">
@@ -39,7 +39,7 @@
<%# Informações do banco externo %> <%# Informações do banco externo %>
<div class="bg-[#1a1a1a] rounded-2xl border border-white/5 p-6"> <div class="bg-[#1a1a1a] rounded-2xl border border-white/5 p-6">
<h2 class="text-lg font-semibold text-white mb-4 flex items-center gap-2"><%= icone :arquivar %> Banco de Dados Externo</h2> <h2 class="text-lg font-semibold text-white mb-4 flex items-center gap-2"><%= icone :arquivar, espaco: false %> Banco de Dados Externo</h2>
<div class="grid grid-cols-1 sm:grid-cols-3 gap-4"> <div class="grid grid-cols-1 sm:grid-cols-3 gap-4">
<div class="p-4 bg-[#0a0a0a] rounded-xl border border-white/5"> <div class="p-4 bg-[#0a0a0a] rounded-xl border border-white/5">
<p class="text-gray-400 text-xs mb-1">Tabela monitorada</p> <p class="text-gray-400 text-xs mb-1">Tabela monitorada</p>

View File

@@ -20,8 +20,8 @@
<%# Aviso de sincronização %> <%# Aviso de sincronização %>
<div class="p-4 bg-amber-900/20 border border-amber-500/40 rounded-xl text-amber-200/90 text-sm flex items-start gap-2"> <div class="p-4 bg-amber-900/20 border border-amber-500/40 rounded-xl text-amber-200/90 text-sm flex items-start gap-2">
<%= icone :alerta, cor: nil, tamanho: 'w-4 h-4 mt-0.5' %> <%= icone :alerta, cor: nil, tamanho: 'w-5 h-5 mt-0.5', espaco: false %>
<p>As alterações são gravadas no <strong>SimpliRoute na hora</strong> (cada campo salva ao confirmar <%= icone :confirmar, cor: nil, tamanho: 'w-3 h-3' %>), <p>As alterações são gravadas no <strong>SimpliRoute na hora</strong> (cada campo salva ao confirmar <%= icone :confirmar, cor: nil, tamanho: 'w-3.5 h-3.5' %>),
mas o painel e as consolidações só refletem <strong>após a próxima sincronização</strong> da base de mas o painel e as consolidações só refletem <strong>após a próxima sincronização</strong> da base de
rastreio. Toda alteração fica registrada na auditoria.</p> rastreio. Toda alteração fica registrada na auditoria.</p>
</div> </div>
@@ -96,9 +96,9 @@
<div id="modal-hist-overlay" class="absolute inset-0 bg-black/70"></div> <div id="modal-hist-overlay" class="absolute inset-0 bg-black/70"></div>
<div class="relative bg-[#151515] border border-white/10 rounded-2xl w-full max-w-2xl max-h-[85vh] flex flex-col"> <div class="relative bg-[#151515] border border-white/10 rounded-2xl w-full max-w-2xl max-h-[85vh] flex flex-col">
<div class="flex items-center justify-between p-4 border-b border-white/5"> <div class="flex items-center justify-between p-4 border-b border-white/5">
<h3 class="text-white font-bold flex items-center gap-2"><%= icone :historico %> Histórico de alterações</h3> <h3 class="text-white font-bold flex items-center gap-2"><%= icone :historico, espaco: false %> Histórico de alterações</h3>
<button id="modal-hist-fechar" type="button" <button id="modal-hist-fechar" type="button"
class="w-9 h-9 rounded-lg bg-white/5 hover:bg-white/10 text-gray-300" aria-label="Fechar"><%= icone :fechar, cor: nil, tamanho: 'w-4 h-4' %></button> class="w-9 h-9 rounded-lg bg-white/5 hover:bg-white/10 text-gray-300" aria-label="Fechar"><%= icone :fechar, cor: nil, tamanho: 'w-5 h-5', espaco: false %></button>
</div> </div>
<div id="modal-hist-corpo" class="p-4 overflow-y-auto space-y-5 text-sm"> <div id="modal-hist-corpo" class="p-4 overflow-y-auto space-y-5 text-sm">
<p class="text-gray-400">Carregando…</p> <p class="text-gray-400">Carregando…</p>

View File

@@ -103,7 +103,7 @@
<% if @usuarios.empty? %> <% if @usuarios.empty? %>
<tr> <tr>
<td colspan="5" class="px-6 py-16 text-center text-gray-500"> <td colspan="5" class="px-6 py-16 text-center text-gray-500">
<div class="mb-3"><%= icone :usuarios, tamanho: 'w-10 h-10', cor: 'text-gray-600' %></div> <div class="mb-3"><%= icone :usuarios, tamanho: 'w-10 h-10', cor: 'text-gray-600', espaco: false %></div>
<p>Nenhum usuário encontrado.</p> <p>Nenhum usuário encontrado.</p>
</td> </td>
</tr> </tr>

View File

@@ -10,7 +10,7 @@
<%# Pilares de preço %> <%# Pilares de preço %>
<div> <div>
<h2 class="text-lg font-semibold text-white mb-4 flex items-center gap-2"><%= icone :dinheiro %> Pilares de Preço</h2> <h2 class="text-lg font-semibold text-white mb-4 flex items-center gap-2"><%= icone :dinheiro, espaco: false %> Pilares de Preço</h2>
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4"> <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4">
<% @configuracoes.each do |cfg| %> <% @configuracoes.each do |cfg| %>
<div class="bg-[#1a1a1a] rounded-2xl border border-white/5 p-6 group relative"> <div class="bg-[#1a1a1a] rounded-2xl border border-white/5 p-6 group relative">
@@ -39,7 +39,7 @@
<%# Informações do banco externo %> <%# Informações do banco externo %>
<div class="bg-[#1a1a1a] rounded-2xl border border-white/5 p-6"> <div class="bg-[#1a1a1a] rounded-2xl border border-white/5 p-6">
<h2 class="text-lg font-semibold text-white mb-4 flex items-center gap-2"><%= icone :arquivar %> Banco de Dados Externo</h2> <h2 class="text-lg font-semibold text-white mb-4 flex items-center gap-2"><%= icone :arquivar, espaco: false %> Banco de Dados Externo</h2>
<div class="grid grid-cols-1 sm:grid-cols-3 gap-4"> <div class="grid grid-cols-1 sm:grid-cols-3 gap-4">
<div class="p-4 bg-[#0a0a0a] rounded-xl border border-white/5"> <div class="p-4 bg-[#0a0a0a] rounded-xl border border-white/5">
<p class="text-gray-400 text-xs mb-1">Tabela monitorada</p> <p class="text-gray-400 text-xs mb-1">Tabela monitorada</p>

View File

@@ -7,7 +7,7 @@
<%= link_to rotulo(:voltar, 'Voltar (Passo 2)', cor: nil), <%= link_to rotulo(:voltar, 'Voltar (Passo 2)', cor: nil),
validar_consolidacao_consolidacao_entregas_path(@consolidacao, motorista: @motorista), validar_consolidacao_consolidacao_entregas_path(@consolidacao, motorista: @motorista),
class: 'inline-flex items-center gap-1 bg-[#1a1a1a] hover:bg-[#2a2a2a] text-white border border-[#2a2a2a] hover:border-orange-500 font-semibold px-4 py-2.5 rounded-lg text-sm min-h-[44px]' %> class: 'inline-flex items-center gap-1 bg-[#1a1a1a] hover:bg-[#2a2a2a] text-white border border-[#2a2a2a] hover:border-orange-500 font-semibold px-4 py-2.5 rounded-lg text-sm min-h-[44px]' %>
<h1 class="text-2xl font-bold text-white mt-2 flex items-center gap-2"><%= icone :planilha %> Revisão — <%= @motorista %></h1> <h1 class="text-2xl font-bold text-white mt-2 flex items-center gap-2"><%= icone :planilha, espaco: false %> Revisão — <%= @motorista %></h1>
<p class="text-gray-400 text-sm"><%= @consolidacao.nome %></p> <p class="text-gray-400 text-sm"><%= @consolidacao.nome %></p>
</div> </div>
@@ -71,7 +71,7 @@
<%= c.tipo_cor[:label] %><% if (c.termo? || c.termo_especial?) && c.quantidade > 1 %> ×<%= c.quantidade %><% end %> <%= c.tipo_cor[:label] %><% if (c.termo? || c.termo_especial?) && c.quantidade > 1 %> ×<%= c.quantidade %><% end %>
</span> </span>
<% if c.manual? %> <% if c.manual? %>
<span class="ml-1 bg-orange-500/15 text-orange-400 border border-orange-500/40 px-2 py-1 rounded text-xs font-bold"><%= icone :adicionar, cor: nil, tamanho: 'w-3 h-3' %> Apontamento</span> <span class="ml-1 bg-orange-500/15 text-orange-400 border border-orange-500/40 px-2 py-1 rounded text-xs font-bold"><%= icone :adicionar, cor: nil, tamanho: 'w-3.5 h-3.5' %> Apontamento</span>
<% end %> <% end %>
</td> </td>
<td class="px-4 py-3 text-right font-bold <%= c.desconto? ? 'text-red-400' : 'text-white' %>"> <td class="px-4 py-3 text-right font-bold <%= c.desconto? ? 'text-red-400' : 'text-white' %>">
@@ -83,7 +83,7 @@
form: { data: { turbo_confirm: 'Remover este apontamento manual?' } }, form: { data: { turbo_confirm: 'Remover este apontamento manual?' } },
class: 'text-gray-500 hover:text-red-400 leading-none px-1', class: 'text-gray-500 hover:text-red-400 leading-none px-1',
title: 'Remover apontamento' do %> title: 'Remover apontamento' do %>
<%= icone :fechar, cor: nil, tamanho: 'w-3.5 h-3.5' %> <%= icone :fechar, cor: nil, tamanho: 'w-4 h-4', espaco: false %>
<% end %> <% end %>
<% end %> <% end %>
</div> </div>

View File

@@ -18,7 +18,7 @@
class: 'inline-flex items-center gap-1 bg-[#1a1a1a] hover:bg-[#2a2a2a] text-white border border-[#2a2a2a] hover:border-orange-500 font-semibold px-4 py-2.5 rounded-lg text-sm min-h-[44px]' %> class: 'inline-flex items-center gap-1 bg-[#1a1a1a] hover:bg-[#2a2a2a] text-white border border-[#2a2a2a] hover:border-orange-500 font-semibold px-4 py-2.5 rounded-lg text-sm min-h-[44px]' %>
<div class="flex items-center justify-between mt-2"> <div class="flex items-center justify-between mt-2">
<div> <div>
<h1 class="text-2xl font-bold text-white flex items-center gap-2"><%= icone :caminhao %> <%= @motorista %></h1> <h1 class="text-2xl font-bold text-white flex items-center gap-2"><%= icone :caminhao, espaco: false %> <%= @motorista %></h1>
<p class="text-gray-400 text-sm"><%= @consolidacao.nome %> · <%= l @consolidacao.data_inicio, format: :short %> → <%= l @consolidacao.data_fim, format: :short %></p> <p class="text-gray-400 text-sm"><%= @consolidacao.nome %> · <%= l @consolidacao.data_inicio, format: :short %> → <%= l @consolidacao.data_fim, format: :short %></p>
</div> </div>
<%= link_to safe_join(['Revisar (Passo 3)', icone(:avancar, cor: nil)], ' '), <%= link_to safe_join(['Revisar (Passo 3)', icone(:avancar, cor: nil)], ' '),
@@ -54,7 +54,7 @@
<div class="bg-[#1a1a1a] border border-[#2a2a2a] rounded-xl p-3 mb-3"> <div class="bg-[#1a1a1a] border border-[#2a2a2a] rounded-xl p-3 mb-3">
<div class="flex items-center gap-2 mb-2 flex-wrap"> <div class="flex items-center gap-2 mb-2 flex-wrap">
<span class="text-gray-400 text-sm font-semibold"><%= icone :veiculo %> Fechar por veículo:</span> <span class="text-gray-400 text-sm font-semibold"><%= icone :veiculo %> Fechar por veículo:</span>
<span class="text-gray-600 text-xs">clique no nome para filtrar; consolide o carro quando estiver 100% (<%= icone :travado, cor: nil, tamanho: 'w-3 h-3' %>)</span> <span class="text-gray-600 text-xs">clique no nome para filtrar; consolide o carro quando estiver 100% (<%= icone :travado, cor: nil, tamanho: 'w-3.5 h-3.5' %>)</span>
</div> </div>
<div class="flex flex-wrap gap-2"> <div class="flex flex-wrap gap-2">
<%# Chip "Todos" — limpa a seleção (mostra todos os carros) %> <%# Chip "Todos" — limpa a seleção (mostra todos os carros) %>
@@ -78,11 +78,11 @@
<%= link_to validar_consolidacao_consolidacao_entregas_path(@consolidacao, motorista: @motorista, vehicle: nova_sel.presence), <%= link_to validar_consolidacao_consolidacao_entregas_path(@consolidacao, motorista: @motorista, vehicle: nova_sel.presence),
data: { 'validacao-target': 'chipVeiculo', vehicle: v[:vehicle], eligible: v[:eligible] }, data: { 'validacao-target': 'chipVeiculo', vehicle: v[:vehicle], eligible: v[:eligible] },
class: "px-3 py-2 rounded-lg text-sm font-semibold border min-h-[40px] flex items-center gap-2 transition-colors #{cor}" do %> class: "px-3 py-2 rounded-lg text-sm font-semibold border min-h-[40px] flex items-center gap-2 transition-colors #{cor}" do %>
<span data-chip-lock class="<%= 'hidden' unless v[:fechado] %>"><%= icone :travado, cor: nil, tamanho: 'w-3 h-3' %></span> <span data-chip-lock class="<%= 'hidden' unless v[:fechado] %>"><%= icone :travado, cor: nil, tamanho: 'w-3.5 h-3.5', espaco: false %></span>
<span><%= v[:vehicle] %></span> <span><%= v[:vehicle] %></span>
<span class="text-xs <%= v[:completo] ? 'text-green-400' : 'text-gray-500' %>"> <span class="text-xs <%= v[:completo] ? 'text-green-400' : 'text-gray-500' %>">
<span data-chip-feito><%= v[:classificadas] %></span>/<span data-chip-total><%= v[:eligible] %></span> <span data-chip-feito><%= v[:classificadas] %></span>/<span data-chip-total><%= v[:eligible] %></span>
<span data-chip-check class="<%= 'hidden' unless v[:completo] %>"><%= icone :confirmar, cor: nil, tamanho: 'w-3 h-3' %></span> <span data-chip-check class="<%= 'hidden' unless v[:completo] %>"><%= icone :confirmar, cor: nil, tamanho: 'w-3.5 h-3.5', espaco: false %></span>
</span> </span>
<% end %> <% end %>
<% end %> <% end %>
@@ -103,7 +103,7 @@
params: { motorista: @motorista, vehicle: sel_unico, vehicle_sel: @veiculos_sel }, params: { motorista: @motorista, vehicle: sel_unico, vehicle_sel: @veiculos_sel },
form: { data: { turbo_confirm: "Reabrir o veículo #{sel_unico} para edição?" } }, form: { data: { turbo_confirm: "Reabrir o veículo #{sel_unico} para edição?" } },
class: 'text-gray-400 hover:text-white border border-[#2a2a2a] hover:border-orange-500 px-3 py-2 rounded-lg text-xs min-h-[40px] inline-flex items-center gap-1.5' do %> class: 'text-gray-400 hover:text-white border border-[#2a2a2a] hover:border-orange-500 px-3 py-2 rounded-lg text-xs min-h-[40px] inline-flex items-center gap-1.5' do %>
<%= icone :destravado, cor: nil, tamanho: 'w-3.5 h-3.5' %> Reabrir veículo <%= icone :destravado, cor: nil, tamanho: 'w-4 h-4' %> Reabrir veículo
<% end %> <% end %>
</div> </div>
<% else %> <% else %>
@@ -117,14 +117,14 @@
data: { 'validacao-target': 'consolidarBtn' }, data: { 'validacao-target': 'consolidarBtn' },
form: { data: { turbo_confirm: "Consolidar o veículo #{sel_unico}? Você poderá reabrir depois." } }, form: { data: { turbo_confirm: "Consolidar o veículo #{sel_unico}? Você poderá reabrir depois." } },
class: "font-bold px-4 py-2 rounded-lg text-xs min-h-[40px] inline-flex items-center gap-1.5 #{status_unico[:completo] ? 'bg-green-600 hover:bg-green-500 text-white cursor-pointer' : 'bg-[#2a2a2a] text-gray-600 cursor-not-allowed'}" do %> class: "font-bold px-4 py-2 rounded-lg text-xs min-h-[40px] inline-flex items-center gap-1.5 #{status_unico[:completo] ? 'bg-green-600 hover:bg-green-500 text-white cursor-pointer' : 'bg-[#2a2a2a] text-gray-600 cursor-not-allowed'}" do %>
<%= icone :travado, cor: nil, tamanho: 'w-3.5 h-3.5' %> Consolidar este veículo <%= icone :travado, cor: nil, tamanho: 'w-4 h-4' %> Consolidar este veículo
<% end %> <% end %>
<%= button_to arquivar_veiculo_consolidacao_consolidacao_entregas_path(@consolidacao), <%= button_to arquivar_veiculo_consolidacao_consolidacao_entregas_path(@consolidacao),
method: :post, method: :post,
params: { motorista: @motorista, vehicle: sel_unico, vehicle_sel: @veiculos_sel }, params: { motorista: @motorista, vehicle: sel_unico, vehicle_sel: @veiculos_sel },
form: { data: { turbo_confirm: "Arquivar o veículo #{sel_unico}? Ele sai da finalização (as entregas já classificadas continuam no pagamento)." } }, form: { data: { turbo_confirm: "Arquivar o veículo #{sel_unico}? Ele sai da finalização (as entregas já classificadas continuam no pagamento)." } },
class: 'text-gray-400 hover:text-white border border-[#2a2a2a] hover:border-red-500/50 px-3 py-2 rounded-lg text-xs min-h-[40px] inline-flex items-center gap-1.5' do %> class: 'text-gray-400 hover:text-white border border-[#2a2a2a] hover:border-red-500/50 px-3 py-2 rounded-lg text-xs min-h-[40px] inline-flex items-center gap-1.5' do %>
<%= icone :arquivar, cor: nil, tamanho: 'w-3.5 h-3.5' %> Arquivar veículo <%= icone :arquivar, cor: nil, tamanho: 'w-4 h-4' %> Arquivar veículo
<% end %> <% end %>
<span class="text-gray-500 text-xs" data-validacao-target="consolidarHint"> <span class="text-gray-500 text-xs" data-validacao-target="consolidarHint">
<%= status_unico[:completo] ? 'Pronto para consolidar.' : 'Classifique 100% deste veículo para consolidar.' %> <%= status_unico[:completo] ? 'Pronto para consolidar.' : 'Classifique 100% deste veículo para consolidar.' %>
@@ -186,7 +186,7 @@
<button type="button" data-action="ferramentas#toggle" <button type="button" data-action="ferramentas#toggle"
class="w-full md:w-auto inline-flex items-center justify-center gap-2 bg-[#1a1a1a] hover:bg-[#2a2a2a] text-white border border-dashed border-[#3a3a3a] hover:border-orange-500 font-semibold px-4 py-3 rounded-lg min-h-[48px]"> class="w-full md:w-auto inline-flex items-center justify-center gap-2 bg-[#1a1a1a] hover:bg-[#2a2a2a] text-white border border-dashed border-[#3a3a3a] hover:border-orange-500 font-semibold px-4 py-3 rounded-lg min-h-[48px]">
<%= icone :adicionar %> Adicionar lançamento <%= icone :adicionar %> Adicionar lançamento
<%= icone :expandir, cor: 'text-gray-500' %> <%= icone :expandir, cor: 'text-gray-500', espaco: false %>
</button> </button>
<div data-ferramentas-target="menu" <div data-ferramentas-target="menu"
@@ -210,7 +210,7 @@
<div class="flex items-center justify-between mb-1"> <div class="flex items-center justify-between mb-1">
<h2 class="text-xl font-bold text-white">Registro manual de entrega</h2> <h2 class="text-xl font-bold text-white">Registro manual de entrega</h2>
<button type="button" data-action="apontamento-manual#fechar" <button type="button" data-action="apontamento-manual#fechar"
class="text-gray-500 hover:text-white leading-none" aria-label="Fechar"><%= icone :fechar, cor: nil, tamanho: 'w-5 h-5' %></button> class="text-gray-500 hover:text-white leading-none" aria-label="Fechar"><%= icone :fechar, cor: nil, tamanho: 'w-6 h-6', espaco: false %></button>
</div> </div>
<p class="text-gray-400 text-sm mb-4">Lançe uma entrega à mão, sem buscar na base de rastreio. Use quando o motorista foi ao local mas a nota ficou registrada com outro motorista.</p> <p class="text-gray-400 text-sm mb-4">Lançe uma entrega à mão, sem buscar na base de rastreio. Use quando o motorista foi ao local mas a nota ficou registrada com outro motorista.</p>
@@ -277,7 +277,7 @@
<button type="button" data-action="apontamento-manual#adicionar" <button type="button" data-action="apontamento-manual#adicionar"
class="w-full bg-green-600 hover:bg-green-500 text-white font-bold py-3.5 rounded-lg min-h-[48px]"> class="w-full bg-green-600 hover:bg-green-500 text-white font-bold py-3.5 rounded-lg min-h-[48px]">
Adicionar apontamento <%= icone :confirmar, cor: nil %> Adicionar apontamento <%= icone :confirmar, cor: nil, espaco: false %>
</button> </button>
</div> </div>
</div> </div>
@@ -287,9 +287,9 @@
class="hidden fixed inset-0 z-50 bg-black/70 flex items-center justify-center p-4"> class="hidden fixed inset-0 z-50 bg-black/70 flex items-center justify-center p-4">
<div class="bg-[#1a1a1a] border border-[#2a2a2a] rounded-2xl w-full max-w-md p-6"> <div class="bg-[#1a1a1a] border border-[#2a2a2a] rounded-2xl w-full max-w-md p-6">
<div class="flex items-center justify-between mb-1"> <div class="flex items-center justify-between mb-1">
<h2 class="text-xl font-bold text-white flex items-center gap-2"><%= icone :documento %> Entrega de termo</h2> <h2 class="text-xl font-bold text-white flex items-center gap-2"><%= icone :documento, espaco: false %> Entrega de termo</h2>
<button type="button" data-action="apontamento-termo#fechar" <button type="button" data-action="apontamento-termo#fechar"
class="text-gray-500 hover:text-white leading-none" aria-label="Fechar"><%= icone :fechar, cor: nil, tamanho: 'w-5 h-5' %></button> class="text-gray-500 hover:text-white leading-none" aria-label="Fechar"><%= icone :fechar, cor: nil, tamanho: 'w-6 h-6', espaco: false %></button>
</div> </div>
<p class="text-gray-400 text-sm mb-4">Entrega sem nota fiscal nem código de rastreio. Informe quantos termos de cada tipo foram entregues.</p> <p class="text-gray-400 text-sm mb-4">Entrega sem nota fiscal nem código de rastreio. Informe quantos termos de cada tipo foram entregues.</p>
@@ -341,7 +341,7 @@
<button type="button" data-action="apontamento-termo#adicionar" <button type="button" data-action="apontamento-termo#adicionar"
class="w-full bg-green-600 hover:bg-green-500 text-white font-bold py-3.5 rounded-lg min-h-[48px]"> class="w-full bg-green-600 hover:bg-green-500 text-white font-bold py-3.5 rounded-lg min-h-[48px]">
Adicionar termos <%= icone :confirmar, cor: nil %> Adicionar termos <%= icone :confirmar, cor: nil, espaco: false %>
</button> </button>
</div> </div>
</div> </div>
@@ -357,7 +357,7 @@
<%# Busca na listagem — filtra os cards por NF, local, endereço ou veículo %> <%# Busca na listagem — filtra os cards por NF, local, endereço ou veículo %>
<div class="sticky top-0 z-20 bg-[#0a0a0a] pb-2"> <div class="sticky top-0 z-20 bg-[#0a0a0a] pb-2">
<div class="relative"> <div class="relative">
<span class="absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none"><%= icone :buscar, cor: 'text-gray-500' %></span> <span class="absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none"><%= icone :buscar, cor: 'text-gray-500', espaco: false %></span>
<input type="search" data-validacao-target="busca" data-action="input->validacao#filtrarBusca" <input type="search" data-validacao-target="busca" data-action="input->validacao#filtrarBusca"
placeholder="Buscar NF, local, endereço ou veículo…" autocomplete="off" placeholder="Buscar NF, local, endereço ou veículo…" autocomplete="off"
class="w-full bg-[#1a1a1a] border border-[#2a2a2a] rounded-lg pl-10 pr-3 py-2.5 text-sm text-gray-200 placeholder-gray-500 focus:border-orange-500 focus:outline-none"> class="w-full bg-[#1a1a1a] border border-[#2a2a2a] rounded-lg pl-10 pr-3 py-2.5 text-sm text-gray-200 placeholder-gray-500 focus:border-orange-500 focus:outline-none">
@@ -382,9 +382,9 @@
<p class="text-white font-semibold truncate"> <p class="text-white font-semibold truncate">
NF <%= e.numero_nf %> · <%= e.local %> NF <%= e.numero_nf %> · <%= e.local %>
<% if e.falhada? %> <% if e.falhada? %>
<span class="ml-1 align-middle text-[10px] font-bold uppercase tracking-wide bg-red-500/20 text-red-400 border border-red-500/40 px-1.5 py-0.5 rounded"><%= icone :alerta, cor: nil, tamanho: 'w-3 h-3' %> Insucesso</span> <span class="ml-1 align-middle text-[10px] font-bold uppercase tracking-wide bg-red-500/20 text-red-400 border border-red-500/40 px-1.5 py-0.5 rounded"><%= icone :alerta, cor: nil, tamanho: 'w-3.5 h-3.5' %> Insucesso</span>
<% else %> <% else %>
<span class="ml-1 align-middle text-[10px] font-bold uppercase tracking-wide bg-green-500/20 text-green-400 border border-green-500/40 px-1.5 py-0.5 rounded"><%= icone :confirmar, cor: nil, tamanho: 'w-3 h-3' %> Entregue</span> <span class="ml-1 align-middle text-[10px] font-bold uppercase tracking-wide bg-green-500/20 text-green-400 border border-green-500/40 px-1.5 py-0.5 rounded"><%= icone :confirmar, cor: nil, tamanho: 'w-3.5 h-3.5' %> Entregue</span>
<% end %> <% end %>
</p> </p>
<p class="text-gray-400 text-xs truncate"><%= icone :local %> <%= e.address.presence || 'sem endereço' %></p> <p class="text-gray-400 text-xs truncate"><%= icone :local %> <%= e.address.presence || 'sem endereço' %></p>
@@ -415,7 +415,7 @@
<% end %> <% end %>
<% else %> <% else %>
<div class="bg-[#1a1a1a] border border-[#2a2a2a] rounded-xl p-10 text-center"> <div class="bg-[#1a1a1a] border border-[#2a2a2a] rounded-xl p-10 text-center">
<p class="mb-3"><%= icone :sucesso, tamanho: 'w-10 h-10', cor: 'text-green-500' %></p> <p class="mb-3"><%= icone :sucesso, tamanho: 'w-10 h-10', cor: 'text-green-500', espaco: false %></p>
<p class="text-gray-400">Nenhuma entrega pendente neste filtro.</p> <p class="text-gray-400">Nenhuma entrega pendente neste filtro.</p>
</div> </div>
<% end %> <% end %>
@@ -424,7 +424,7 @@
<%# ── Resumo lateral (1 coluna) — rola junto se precisar ─────── %> <%# ── Resumo lateral (1 coluna) — rola junto se precisar ─────── %>
<div class="lg:col-span-1 lg:overflow-y-auto" data-validacao-target="resumo"> <div class="lg:col-span-1 lg:overflow-y-auto" data-validacao-target="resumo">
<div class="bg-[#1a1a1a] border border-[#2a2a2a] rounded-xl p-5 space-y-4"> <div class="bg-[#1a1a1a] border border-[#2a2a2a] rounded-xl p-5 space-y-4">
<h3 class="text-white font-bold flex items-center gap-2"><%= icone :dashboard %> Resumo</h3> <h3 class="text-white font-bold flex items-center gap-2"><%= icone :dashboard, espaco: false %> Resumo</h3>
<div class="space-y-2 text-sm"> <div class="space-y-2 text-sm">
<div class="flex justify-between items-center"> <div class="flex justify-between items-center">

View File

@@ -2,7 +2,7 @@
<% content_for :title, 'Consolidações arquivadas' %> <% content_for :title, 'Consolidações arquivadas' %>
<div class="flex items-center justify-between mb-6"> <div class="flex items-center justify-between mb-6">
<h1 class="text-2xl font-bold text-white flex items-center gap-2"><%= icone :arquivadas %> Consolidações arquivadas</h1> <h1 class="text-2xl font-bold text-white flex items-center gap-2"><%= icone :arquivadas, espaco: false %> Consolidações arquivadas</h1>
<%= link_to rotulo(:voltar, 'Voltar às ativas', cor: nil), consolidacoes_path, <%= link_to rotulo(:voltar, 'Voltar às ativas', cor: nil), consolidacoes_path,
class: 'text-gray-400 hover:text-white border border-[#2a2a2a] px-4 py-3 rounded-lg min-h-[48px] flex items-center' %> class: 'text-gray-400 hover:text-white border border-[#2a2a2a] px-4 py-3 rounded-lg min-h-[48px] flex items-center' %>
</div> </div>
@@ -26,7 +26,7 @@
<%= badge_status(c.status) %> <%= badge_status(c.status) %>
</div> </div>
<p class="text-gray-400 text-sm"> <p class="text-gray-400 text-sm">
<%= icone :calendario %> <%= l c.data_inicio, format: :short %> <%= icone :avancar, tamanho: 'w-3 h-3' %> <%= l c.data_fim, format: :short %> <%= icone :calendario %> <%= l c.data_inicio, format: :short %> <%= icone :avancar, tamanho: 'w-3.5 h-3.5' %> <%= l c.data_fim, format: :short %>
· <%= icone :pessoa %> <%= c.consolidacao_motoristas.count %> motorista(s) · <%= icone :pessoa %> <%= c.consolidacao_motoristas.count %> motorista(s)
· Criada por <%= c.criador.nome_display %> · Criada por <%= c.criador.nome_display %>
</p> </p>
@@ -48,12 +48,12 @@
<%= button_to reativar_consolidacao_path(c), method: :post, <%= button_to reativar_consolidacao_path(c), method: :post,
form: { data: { turbo_confirm: 'Reativar esta consolidação? Ela voltará para a lista de ativas.' } }, form: { data: { turbo_confirm: 'Reativar esta consolidação? Ela voltará para a lista de ativas.' } },
class: 'bg-orange-500 hover:bg-orange-600 text-black font-bold px-4 py-2.5 rounded-lg text-sm min-h-[44px] inline-flex items-center gap-2' do %> class: 'bg-orange-500 hover:bg-orange-600 text-black font-bold px-4 py-2.5 rounded-lg text-sm min-h-[44px] inline-flex items-center gap-2' do %>
<%= icone :restaurar, cor: nil, tamanho: 'w-4 h-4' %> Reativar <%= icone :restaurar, cor: nil, tamanho: 'w-5 h-5' %> Reativar
<% end %> <% end %>
<%= button_to consolidacao_path(c), method: :delete, <%= button_to consolidacao_path(c), method: :delete,
form: { data: { turbo_confirm: 'EXCLUIR PERMANENTEMENTE esta consolidação e todas as suas classificações? Esta ação NÃO pode ser desfeita.' } }, form: { data: { turbo_confirm: 'EXCLUIR PERMANENTEMENTE esta consolidação e todas as suas classificações? Esta ação NÃO pode ser desfeita.' } },
class: 'text-red-400 hover:text-white hover:bg-red-600 border border-red-900 px-4 py-2.5 rounded-lg text-sm min-h-[44px] inline-flex items-center gap-2' do %> class: 'text-red-400 hover:text-white hover:bg-red-600 border border-red-900 px-4 py-2.5 rounded-lg text-sm min-h-[44px] inline-flex items-center gap-2' do %>
<%= icone :excluir, cor: nil, tamanho: 'w-4 h-4' %> Excluir <%= icone :excluir, cor: nil, tamanho: 'w-5 h-5' %> Excluir
<% end %> <% end %>
</div> </div>
<% end %> <% end %>
@@ -64,7 +64,7 @@
</div> </div>
<% else %> <% else %>
<div class="bg-[#1a1a1a] border border-[#2a2a2a] rounded-xl p-12 text-center"> <div class="bg-[#1a1a1a] border border-[#2a2a2a] rounded-xl p-12 text-center">
<p class="mb-4"><%= icone :pasta, tamanho: 'w-12 h-12', cor: 'text-gray-600' %></p> <p class="mb-4"><%= icone :pasta, tamanho: 'w-12 h-12', cor: 'text-gray-600', espaco: false %></p>
<p class="text-gray-400 mb-4">Nenhuma consolidação arquivada.</p> <p class="text-gray-400 mb-4">Nenhuma consolidação arquivada.</p>
<%= link_to 'Ver consolidações ativas', consolidacoes_path, <%= link_to 'Ver consolidações ativas', consolidacoes_path,
class: 'inline-block bg-orange-500 hover:bg-orange-600 text-black font-bold px-5 py-3 rounded-lg' %> class: 'inline-block bg-orange-500 hover:bg-orange-600 text-black font-bold px-5 py-3 rounded-lg' %>

View File

@@ -4,9 +4,9 @@
<div data-controller="nota-avulsa" <div data-controller="nota-avulsa"
data-nota-avulsa-buscar-url-value="<%= buscar_nf_consolidacoes_path %>"> data-nota-avulsa-buscar-url-value="<%= buscar_nf_consolidacoes_path %>">
<div class="flex items-center justify-between mb-6"> <div class="flex items-center justify-between mb-6">
<h1 class="text-2xl font-bold text-white flex items-center gap-2"><%= icone :consolidacoes %> Consolidações</h1> <h1 class="text-2xl font-bold text-white flex items-center gap-2"><%= icone :consolidacoes, espaco: false %> Consolidações</h1>
<div class="flex gap-2"> <div class="flex gap-2">
<%= link_to rotulo(:arquivadas, 'Arquivadas'), arquivadas_consolidacoes_path, <%= link_to rotulo(:arquivadas, 'Arquivadas', cor: nil), arquivadas_consolidacoes_path,
class: 'text-gray-400 hover:text-white border border-[#2a2a2a] px-4 py-3 rounded-lg min-h-[48px] flex items-center transition-colors' %> class: 'text-gray-400 hover:text-white border border-[#2a2a2a] px-4 py-3 rounded-lg min-h-[48px] flex items-center transition-colors' %>
<% if policy(Consolidacao).create? %> <% if policy(Consolidacao).create? %>
<button type="button" data-action="nota-avulsa#abrir" <button type="button" data-action="nota-avulsa#abrir"
@@ -25,9 +25,9 @@
class="hidden fixed inset-0 z-50 bg-black/70 flex items-center justify-center p-4"> class="hidden fixed inset-0 z-50 bg-black/70 flex items-center justify-center p-4">
<div class="bg-[#1a1a1a] border border-[#2a2a2a] rounded-2xl w-full max-w-lg p-6 max-h-[90vh] overflow-y-auto text-left"> <div class="bg-[#1a1a1a] border border-[#2a2a2a] rounded-2xl w-full max-w-lg p-6 max-h-[90vh] overflow-y-auto text-left">
<div class="flex items-center justify-between mb-1"> <div class="flex items-center justify-between mb-1">
<h2 class="text-xl font-bold text-white flex items-center gap-2"><%= icone :adicionar %> Nota avulsa</h2> <h2 class="text-xl font-bold text-white flex items-center gap-2"><%= icone :adicionar, espaco: false %> Nota avulsa</h2>
<button type="button" data-action="nota-avulsa#fechar" <button type="button" data-action="nota-avulsa#fechar"
class="text-gray-500 hover:text-white leading-none" aria-label="Fechar"><%= icone :fechar, cor: nil, tamanho: 'w-5 h-5' %></button> class="text-gray-500 hover:text-white leading-none" aria-label="Fechar"><%= icone :fechar, cor: nil, tamanho: 'w-6 h-6', espaco: false %></button>
</div> </div>
<p class="text-gray-400 text-sm mb-4">Para uma nota que chegou por fora: busque a NF e crie uma consolidação já com o apontamento do motorista.</p> <p class="text-gray-400 text-sm mb-4">Para uma nota que chegou por fora: busque a NF e crie uma consolidação já com o apontamento do motorista.</p>
@@ -128,7 +128,7 @@
</div> </div>
<% else %> <% else %>
<div class="bg-[#1a1a1a] border border-[#2a2a2a] rounded-xl p-12 text-center"> <div class="bg-[#1a1a1a] border border-[#2a2a2a] rounded-xl p-12 text-center">
<p class="mb-4"><%= icone :vazio, tamanho: 'w-12 h-12', cor: 'text-gray-600' %></p> <p class="mb-4"><%= icone :vazio, tamanho: 'w-12 h-12', cor: 'text-gray-600', espaco: false %></p>
<p class="text-gray-400 mb-4">Nenhuma consolidação encontrada.</p> <p class="text-gray-400 mb-4">Nenhuma consolidação encontrada.</p>
<%= link_to 'Criar primeira consolidação', new_consolidacao_path, <%= link_to 'Criar primeira consolidação', new_consolidacao_path,
class: 'inline-block bg-orange-500 hover:bg-orange-600 text-black font-bold px-5 py-3 rounded-lg' %> class: 'inline-block bg-orange-500 hover:bg-orange-600 text-black font-bold px-5 py-3 rounded-lg' %>

View File

@@ -2,13 +2,13 @@
<% content_for :title, 'Nova Consolidação' %> <% content_for :title, 'Nova Consolidação' %>
<div class="max-w-3xl mx-auto"> <div class="max-w-3xl mx-auto">
<h1 class="text-2xl font-bold text-white mb-6 flex items-center gap-2"><%= icone :adicionar %> Nova Consolidação</h1> <h1 class="text-2xl font-bold text-white mb-6 flex items-center gap-2"><%= icone :adicionar, espaco: false %> Nova Consolidação</h1>
<%= form_with model: @consolidacao, class: 'bg-[#1a1a1a] border border-[#2a2a2a] rounded-xl p-6 space-y-6' do |f| %> <%= form_with model: @consolidacao, class: 'bg-[#1a1a1a] border border-[#2a2a2a] rounded-xl p-6 space-y-6' do |f| %>
<% if @consolidacao.errors.any? %> <% if @consolidacao.errors.any? %>
<div class="bg-red-900/40 border border-red-600 rounded-lg p-4"> <div class="bg-red-900/40 border border-red-600 rounded-lg p-4">
<p class="text-red-400 font-bold mb-1 flex items-center gap-2"><%= icone :alerta, cor: nil %> Corrija os erros:</p> <p class="text-red-400 font-bold mb-1 flex items-center gap-2"><%= icone :alerta, cor: nil, espaco: false %> Corrija os erros:</p>
<ul class="text-red-300 text-sm list-disc list-inside"> <ul class="text-red-300 text-sm list-disc list-inside">
<% @consolidacao.errors.full_messages.each do |msg| %> <% @consolidacao.errors.full_messages.each do |msg| %>
<li><%= msg %></li> <li><%= msg %></li>

View File

@@ -15,7 +15,7 @@
<% if @consolidacao.finalizada? %><%= badge_pagamento(@consolidacao.status_pagamento) %><% end %> <% if @consolidacao.finalizada? %><%= badge_pagamento(@consolidacao.status_pagamento) %><% end %>
</div> </div>
<p class="text-gray-400 text-sm mt-1"> <p class="text-gray-400 text-sm mt-1">
<%= icone :calendario %> <%= l @consolidacao.data_inicio, format: :short %> <%= icone :avancar, tamanho: 'w-3 h-3' %> <%= l @consolidacao.data_fim, format: :short %> <%= icone :calendario %> <%= l @consolidacao.data_inicio, format: :short %> <%= icone :avancar, tamanho: 'w-3.5 h-3.5' %> <%= l @consolidacao.data_fim, format: :short %>
· Criada por <%= @consolidacao.criador.nome_display %> · Criada por <%= @consolidacao.criador.nome_display %>
<% if @consolidacao.finalizada? %> <% if @consolidacao.finalizada? %>
· Finalizada por <%= @consolidacao.finalizador&.nome_display %> em <%= l @consolidacao.finalizado_em, format: :short %> · Finalizada por <%= @consolidacao.finalizador&.nome_display %> em <%= l @consolidacao.finalizado_em, format: :short %>
@@ -35,14 +35,14 @@
<%= link_to rotulo(:editar, 'Continuar validação', cor: nil), wizard_consolidacao_path(@consolidacao), <%= link_to rotulo(:editar, 'Continuar validação', cor: nil), wizard_consolidacao_path(@consolidacao),
class: 'bg-orange-500 hover:bg-orange-600 text-black font-bold px-5 py-3 rounded-lg min-h-[48px] flex items-center' %> class: 'bg-orange-500 hover:bg-orange-600 text-black font-bold px-5 py-3 rounded-lg min-h-[48px] flex items-center' %>
<% end %> <% end %>
<%= link_to rotulo(:dashboard, 'Relatório financeiro'), gerar_pdf_financeiro_consolidacao_path(@consolidacao), <%= link_to rotulo(:dashboard, 'Relatório financeiro', cor: nil), gerar_pdf_financeiro_consolidacao_path(@consolidacao),
data: { turbo: false }, data: { turbo: false },
class: 'bg-[#1a1a1a] hover:bg-[#2a2a2a] text-white border border-orange-500 font-semibold px-4 py-3 rounded-lg min-h-[48px] flex items-center' %> class: 'bg-[#1a1a1a] hover:bg-[#2a2a2a] text-white border border-orange-500 font-semibold px-4 py-3 rounded-lg min-h-[48px] flex items-center' %>
<% if policy(@consolidacao).destroy? && !@consolidacao.arquivada? %> <% if policy(@consolidacao).destroy? && !@consolidacao.arquivada? %>
<%= button_to arquivar_consolidacao_path(@consolidacao), method: :post, <%= button_to arquivar_consolidacao_path(@consolidacao), method: :post,
form: { data: { turbo_confirm: 'Arquivar esta consolidação? Ela não será excluída, apenas movida para o arquivo.' } }, form: { data: { turbo_confirm: 'Arquivar esta consolidação? Ela não será excluída, apenas movida para o arquivo.' } },
class: 'text-gray-400 hover:text-white border border-[#2a2a2a] px-4 py-3 rounded-lg min-h-[48px] flex items-center gap-2' do %> class: 'text-gray-400 hover:text-white border border-[#2a2a2a] px-4 py-3 rounded-lg min-h-[48px] flex items-center gap-2' do %>
<%= icone :arquivar, cor: nil, tamanho: 'w-4 h-4' %> Arquivar <%= icone :arquivar, cor: nil, tamanho: 'w-5 h-5' %> Arquivar
<% end %> <% end %>
<% end %> <% end %>
</div> </div>
@@ -62,7 +62,7 @@
<%= f.button type: :submit, <%= f.button type: :submit,
data: { turbo_confirm: 'Marcar TODOS os motoristas pendentes desta consolidação como PAGOS? Confirme que a Nota Fiscal de cada um foi preenchida.' }, data: { turbo_confirm: 'Marcar TODOS os motoristas pendentes desta consolidação como PAGOS? Confirme que a Nota Fiscal de cada um foi preenchida.' },
class: 'bg-green-600 hover:bg-green-700 text-white font-bold px-4 py-2.5 rounded-lg text-sm cursor-pointer min-h-[44px] inline-flex items-center gap-2' do %> class: 'bg-green-600 hover:bg-green-700 text-white font-bold px-4 py-2.5 rounded-lg text-sm cursor-pointer min-h-[44px] inline-flex items-center gap-2' do %>
<%= icone :dinheiro, cor: nil, tamanho: 'w-4 h-4' %> Marcar tudo como pago <%= icone :dinheiro, cor: nil, tamanho: 'w-5 h-5' %> Marcar tudo como pago
<% end %> <% end %>
<% end %> <% end %>
<% end %> <% end %>
@@ -70,7 +70,7 @@
<%= button_to cancelar_pagamento_consolidacao_path(@consolidacao), method: :post, <%= button_to cancelar_pagamento_consolidacao_path(@consolidacao), method: :post,
form: { data: { turbo_confirm: 'Estornar o pagamento de TODOS os motoristas?' } }, form: { data: { turbo_confirm: 'Estornar o pagamento de TODOS os motoristas?' } },
class: 'text-gray-400 hover:text-white border border-[#2a2a2a] px-4 py-2.5 rounded-lg text-sm min-h-[44px] inline-flex items-center gap-2' do %> class: 'text-gray-400 hover:text-white border border-[#2a2a2a] px-4 py-2.5 rounded-lg text-sm min-h-[44px] inline-flex items-center gap-2' do %>
<%= icone :estornar, cor: nil, tamanho: 'w-4 h-4' %> Estornar tudo <%= icone :estornar, cor: nil, tamanho: 'w-5 h-5' %> Estornar tudo
<% end %> <% end %>
<% end %> <% end %>
</div> </div>
@@ -84,7 +84,7 @@
</div> </div>
<%# Motoristas + botões de PDF %> <%# Motoristas + botões de PDF %>
<h2 class="text-white font-bold text-lg mb-3 flex items-center gap-2"><%= icone :usuarios %> Motoristas</h2> <h2 class="text-white font-bold text-lg mb-3 flex items-center gap-2"><%= icone :usuarios, espaco: false %> Motoristas</h2>
<div class="space-y-3"> <div class="space-y-3">
<% @motoristas.each do |cm| %> <% @motoristas.each do |cm| %>
<div class="bg-[#1a1a1a] border border-[#2a2a2a] rounded-xl p-5"> <div class="bg-[#1a1a1a] border border-[#2a2a2a] rounded-xl p-5">
@@ -104,7 +104,7 @@
<div class="flex flex-wrap gap-1.5 mt-1"> <div class="flex flex-wrap gap-1.5 mt-1">
<% veiculos.each do |cv| %> <% veiculos.each do |cv| %>
<span class="text-xs px-2 py-0.5 rounded border <%= cv.fechado? ? 'border-green-500/50 text-green-400' : 'border-[#2a2a2a] text-gray-400' %>"> <span class="text-xs px-2 py-0.5 rounded border <%= cv.fechado? ? 'border-green-500/50 text-green-400' : 'border-[#2a2a2a] text-gray-400' %>">
<%= cv.fechado? ? icone(:travado, cor: nil, tamanho: 'w-3 h-3') : icone(:ponto_vazio, cor: nil, tamanho: 'w-3 h-3') %> <%= cv.vehicle %> · <%= moeda(cv.valor_total) %> <%= cv.fechado? ? icone(:travado, cor: nil, tamanho: 'w-3.5 h-3.5') : icone(:ponto_vazio, cor: nil, tamanho: 'w-3.5 h-3.5') %> <%= cv.vehicle %> · <%= moeda(cv.valor_total) %>
</span> </span>
<% end %> <% end %>
</div> </div>
@@ -126,7 +126,7 @@
<%= button_to cancelar_pagamento_consolidacao_path(@consolidacao, consolidacao_motorista_id: cm.id), method: :post, <%= button_to cancelar_pagamento_consolidacao_path(@consolidacao, consolidacao_motorista_id: cm.id), method: :post,
form: { data: { turbo_confirm: "Estornar o pagamento de #{cm.motorista_nome}?" } }, form: { data: { turbo_confirm: "Estornar o pagamento de #{cm.motorista_nome}?" } },
class: 'text-gray-400 hover:text-white border border-[#2a2a2a] px-3 py-2 rounded-lg text-xs min-h-[40px] inline-flex items-center gap-1.5' do %> class: 'text-gray-400 hover:text-white border border-[#2a2a2a] px-3 py-2 rounded-lg text-xs min-h-[40px] inline-flex items-center gap-1.5' do %>
<%= icone :estornar, cor: nil, tamanho: 'w-3.5 h-3.5' %> Estornar pagamento <%= icone :estornar, cor: nil, tamanho: 'w-4 h-4' %> Estornar pagamento
<% end %> <% end %>
<% else %> <% else %>
<%# Inputs/botão associados ao form único #form-pagar-tudo via atributo form=. %> <%# Inputs/botão associados ao form único #form-pagar-tudo via atributo form=. %>
@@ -138,7 +138,7 @@
name: 'consolidacao_motorista_id', value: cm.id, name: 'consolidacao_motorista_id', value: cm.id,
data: { turbo_confirm: "Marcar #{cm.motorista_nome} como pago?" }, data: { turbo_confirm: "Marcar #{cm.motorista_nome} como pago?" },
class: 'bg-green-600 hover:bg-green-700 text-white font-bold px-3 py-2 rounded-lg text-xs cursor-pointer min-h-[40px] inline-flex items-center gap-1.5' do %> class: 'bg-green-600 hover:bg-green-700 text-white font-bold px-3 py-2 rounded-lg text-xs cursor-pointer min-h-[40px] inline-flex items-center gap-1.5' do %>
<%= icone :dinheiro, cor: nil, tamanho: 'w-3.5 h-3.5' %> Marcar pago <%= icone :dinheiro, cor: nil, tamanho: 'w-4 h-4' %> Marcar pago
<% end %> <% end %>
</div> </div>
<% end %> <% end %>
@@ -168,7 +168,7 @@
<%# ── Apontamentos manuais (notas que chegaram por fora) ─────────────── %> <%# ── Apontamentos manuais (notas que chegaram por fora) ─────────────── %>
<% if @apontamentos.present? %> <% if @apontamentos.present? %>
<% pode_editar = !(@consolidacao.finalizada? && current_user.operador?) %> <% pode_editar = !(@consolidacao.finalizada? && current_user.operador?) %>
<h2 class="text-white font-bold text-lg mt-8 mb-3 flex items-center gap-2"><%= icone :adicionar %> Apontamentos manuais</h2> <h2 class="text-white font-bold text-lg mt-8 mb-3 flex items-center gap-2"><%= icone :adicionar, espaco: false %> Apontamentos manuais</h2>
<div class="bg-[#1a1a1a] border border-[#2a2a2a] rounded-xl overflow-hidden"> <div class="bg-[#1a1a1a] border border-[#2a2a2a] rounded-xl overflow-hidden">
<table class="w-full text-sm"> <table class="w-full text-sm">
<thead class="bg-[#0a0a0a] text-gray-400"> <thead class="bg-[#0a0a0a] text-gray-400">
@@ -214,7 +214,7 @@
method: :delete, method: :delete,
form: { data: { turbo_confirm: eh_termo ? "Remover a entrega de termo de #{motorista}?" : "Remover o apontamento da NF #{nf_exibida.presence || '—'} de #{motorista}?" } }, form: { data: { turbo_confirm: eh_termo ? "Remover a entrega de termo de #{motorista}?" : "Remover o apontamento da NF #{nf_exibida.presence || '—'} de #{motorista}?" } },
class: 'text-gray-400 hover:text-red-400 border border-[#2a2a2a] hover:border-red-500/50 px-3 py-2 rounded-lg text-xs min-h-[40px] inline-flex items-center gap-1.5' do %> class: 'text-gray-400 hover:text-red-400 border border-[#2a2a2a] hover:border-red-500/50 px-3 py-2 rounded-lg text-xs min-h-[40px] inline-flex items-center gap-1.5' do %>
<%= icone :fechar, cor: nil, tamanho: 'w-3 h-3' %> Remover <%= icone :fechar, cor: nil, tamanho: 'w-3.5 h-3.5' %> Remover
<% end %> <% end %>
</td> </td>
<% end %> <% end %>
@@ -230,8 +230,8 @@
<div id="modal-preview" class="fixed inset-0 bg-black/80 z-50 hidden items-center justify-center p-4"> <div id="modal-preview" class="fixed inset-0 bg-black/80 z-50 hidden items-center justify-center p-4">
<div class="bg-[#1a1a1a] border border-[#2a2a2a] rounded-2xl max-w-2xl w-full max-h-[85vh] flex flex-col"> <div class="bg-[#1a1a1a] border border-[#2a2a2a] rounded-2xl max-w-2xl w-full max-h-[85vh] flex flex-col">
<div class="flex items-center justify-between px-6 py-4 border-b border-[#2a2a2a]"> <div class="flex items-center justify-between px-6 py-4 border-b border-[#2a2a2a]">
<h3 class="text-white font-bold flex items-center gap-2"><%= icone :visualizar %> Pré-visualização do Extrato</h3> <h3 class="text-white font-bold flex items-center gap-2"><%= icone :visualizar, espaco: false %> Pré-visualização do Extrato</h3>
<button onclick="fecharPreview()" class="text-gray-400 hover:text-white min-w-[44px] min-h-[44px]" aria-label="Fechar"><%= icone :fechar, cor: nil, tamanho: 'w-5 h-5' %></button> <button onclick="fecharPreview()" class="text-gray-400 hover:text-white min-w-[44px] min-h-[44px]" aria-label="Fechar"><%= icone :fechar, cor: nil, tamanho: 'w-6 h-6', espaco: false %></button>
</div> </div>
<div id="modal-preview-conteudo" class="overflow-y-auto p-6 flex-1"> <div id="modal-preview-conteudo" class="overflow-y-auto p-6 flex-1">
<div class="flex justify-center py-10"><div class="spinner w-10 h-10"></div></div> <div class="flex justify-center py-10"><div class="spinner w-10 h-10"></div></div>
@@ -243,7 +243,7 @@
</a> </a>
<button onclick="fecharPreview()" <button onclick="fecharPreview()"
class="px-6 py-3 text-gray-400 hover:text-white border border-[#2a2a2a] rounded-lg min-h-[48px]"> class="px-6 py-3 text-gray-400 hover:text-white border border-[#2a2a2a] rounded-lg min-h-[48px]">
<%= icone :voltar, cor: nil, tamanho: 'w-4 h-4' %> Voltar <%= icone :voltar, cor: nil, tamanho: 'w-5 h-5' %> Voltar
</button> </button>
</div> </div>
</div> </div>

View File

@@ -8,7 +8,7 @@
<%= link_to '← Voltar para o resumo', consolidacao_path(@consolidacao), class: 'text-gray-500 hover:text-orange-500 text-sm' %> <%= link_to '← Voltar para o resumo', consolidacao_path(@consolidacao), class: 'text-gray-500 hover:text-orange-500 text-sm' %>
<h1 class="text-2xl font-bold text-white mt-2"><%= @consolidacao.nome %></h1> <h1 class="text-2xl font-bold text-white mt-2"><%= @consolidacao.nome %></h1>
<p class="text-gray-400 text-sm"> <p class="text-gray-400 text-sm">
<%= icone :calendario %> <%= l @consolidacao.data_inicio, format: :short %> <%= icone :avancar, tamanho: 'w-3 h-3' %> <%= l @consolidacao.data_fim, format: :short %> <%= icone :calendario %> <%= l @consolidacao.data_inicio, format: :short %> <%= icone :avancar, tamanho: 'w-3.5 h-3.5' %> <%= l @consolidacao.data_fim, format: :short %>
· <%= badge_status(@consolidacao.status) %> · <%= badge_status(@consolidacao.status) %>
</p> </p>
</div> </div>
@@ -43,7 +43,7 @@
<button type="button" data-action="ferramentas#toggle" <button type="button" data-action="ferramentas#toggle"
class="w-full md:w-auto inline-flex items-center justify-center gap-2 bg-[#1a1a1a] hover:bg-[#2a2a2a] text-white border border-dashed border-[#3a3a3a] hover:border-orange-500 font-semibold px-4 py-3 rounded-lg min-h-[48px]"> class="w-full md:w-auto inline-flex items-center justify-center gap-2 bg-[#1a1a1a] hover:bg-[#2a2a2a] text-white border border-dashed border-[#3a3a3a] hover:border-orange-500 font-semibold px-4 py-3 rounded-lg min-h-[48px]">
<%= icone :adicionar %> Adicionar / Ferramentas <%= icone :adicionar %> Adicionar / Ferramentas
<%= icone :expandir, cor: 'text-gray-500' %> <%= icone :expandir, cor: 'text-gray-500', espaco: false %>
</button> </button>
<div data-ferramentas-target="menu" <div data-ferramentas-target="menu"
@@ -67,7 +67,7 @@
<div class="flex items-center justify-between mb-1"> <div class="flex items-center justify-between mb-1">
<h2 class="text-xl font-bold text-white">Apontamento manual</h2> <h2 class="text-xl font-bold text-white">Apontamento manual</h2>
<button type="button" data-action="apontamento#fechar" <button type="button" data-action="apontamento#fechar"
class="text-gray-500 hover:text-white leading-none" aria-label="Fechar"><%= icone :fechar, cor: nil, tamanho: 'w-5 h-5' %></button> class="text-gray-500 hover:text-white leading-none" aria-label="Fechar"><%= icone :fechar, cor: nil, tamanho: 'w-6 h-6', espaco: false %></button>
</div> </div>
<p class="text-gray-400 text-sm mb-4">Busque a nota pela base de rastreio e adicione ao fechamento do motorista correspondente.</p> <p class="text-gray-400 text-sm mb-4">Busque a nota pela base de rastreio e adicione ao fechamento do motorista correspondente.</p>
@@ -104,7 +104,7 @@
</div> </div>
<button type="button" data-action="apontamento#apontar" <button type="button" data-action="apontamento#apontar"
class="w-full bg-green-600 hover:bg-green-500 text-white font-bold py-3.5 rounded-lg min-h-[48px]"> class="w-full bg-green-600 hover:bg-green-500 text-white font-bold py-3.5 rounded-lg min-h-[48px]">
Adicionar apontamento <%= icone :confirmar, cor: nil %> Adicionar apontamento <%= icone :confirmar, cor: nil, espaco: false %>
</button> </button>
</div> </div>
</div> </div>
@@ -115,9 +115,9 @@
class="hidden fixed inset-0 z-50 bg-black/70 flex items-center justify-center p-4"> class="hidden fixed inset-0 z-50 bg-black/70 flex items-center justify-center p-4">
<div class="bg-[#1a1a1a] border border-[#2a2a2a] rounded-2xl w-full max-w-md p-6"> <div class="bg-[#1a1a1a] border border-[#2a2a2a] rounded-2xl w-full max-w-md p-6">
<div class="flex items-center justify-between mb-1"> <div class="flex items-center justify-between mb-1">
<h2 class="text-xl font-bold text-white flex items-center gap-2"><%= icone :motorista %> Adicionar motorista</h2> <h2 class="text-xl font-bold text-white flex items-center gap-2"><%= icone :motorista, espaco: false %> Adicionar motorista</h2>
<button type="button" data-action="adicionar-motorista#fechar" <button type="button" data-action="adicionar-motorista#fechar"
class="text-gray-500 hover:text-white leading-none" aria-label="Fechar"><%= icone :fechar, cor: nil, tamanho: 'w-5 h-5' %></button> class="text-gray-500 hover:text-white leading-none" aria-label="Fechar"><%= icone :fechar, cor: nil, tamanho: 'w-6 h-6', espaco: false %></button>
</div> </div>
<p class="text-gray-400 text-sm mb-4">Inclua um motorista nesta consolidação. Se ele estava arquivado, será restaurado.</p> <p class="text-gray-400 text-sm mb-4">Inclua um motorista nesta consolidação. Se ele estava arquivado, será restaurado.</p>
@@ -152,7 +152,7 @@
<button type="submit" <button type="submit"
class="w-full bg-green-600 hover:bg-green-500 text-white font-bold py-3.5 rounded-lg min-h-[48px]"> class="w-full bg-green-600 hover:bg-green-500 text-white font-bold py-3.5 rounded-lg min-h-[48px]">
Adicionar <%= icone :confirmar, cor: nil %> Adicionar <%= icone :confirmar, cor: nil, espaco: false %>
</button> </button>
<% end %> <% end %>
</div> </div>
@@ -174,7 +174,7 @@
<div class="flex items-center gap-4"> <div class="flex items-center gap-4">
<div class="w-12 h-12 rounded-full flex items-center justify-center text-xl font-black <div class="w-12 h-12 rounded-full flex items-center justify-center text-xl font-black
<%= m[:completo] ? 'bg-green-600 text-white' : 'bg-orange-500 text-black' %>"> <%= m[:completo] ? 'bg-green-600 text-white' : 'bg-orange-500 text-black' %>">
<%= m[:completo] ? icone(:confirmar, cor: nil, tamanho: 'w-6 h-6') : m[:registro].motorista_nome.first.upcase %> <%= m[:completo] ? icone(:confirmar, cor: nil, tamanho: 'w-7 h-7') : m[:registro].motorista_nome.first.upcase %>
</div> </div>
<div> <div>
<p class="text-white font-bold text-lg"><%= m[:registro].motorista_nome %></p> <p class="text-white font-bold text-lg"><%= m[:registro].motorista_nome %></p>
@@ -184,7 +184,7 @@
<%= m[:classificadas] %>/<%= m[:total] %> classificadas <%= m[:classificadas] %>/<%= m[:total] %> classificadas
</span> </span>
<% if m[:apontamentos].positive? %> <% if m[:apontamentos].positive? %>
· <span class="text-orange-400"><%= icone :adicionar, cor: nil, tamanho: 'w-3 h-3' %> <%= m[:apontamentos] %> apontamento<%= 's' if m[:apontamentos] > 1 %></span> · <span class="text-orange-400"><%= icone :adicionar, cor: nil, tamanho: 'w-3.5 h-3.5' %> <%= m[:apontamentos] %> apontamento<%= 's' if m[:apontamentos] > 1 %></span>
<% end %> <% end %>
</p> </p>
<% if m[:veiculos_total] > 0 %> <% if m[:veiculos_total] > 0 %>
@@ -201,7 +201,7 @@
</div> </div>
<div class="text-right <%= 'pr-10' if pode_arquivar_motorista %>"> <div class="text-right <%= 'pr-10' if pode_arquivar_motorista %>">
<p class="text-orange-500 font-bold"><%= moeda(m[:registro].valor_total) %></p> <p class="text-orange-500 font-bold"><%= moeda(m[:registro].valor_total) %></p>
<%= icone :avancar, cor: 'text-gray-600', tamanho: 'w-5 h-5' %> <%= icone :avancar, cor: 'text-gray-600', tamanho: 'w-6 h-6', espaco: false %>
</div> </div>
</div> </div>
<div class="mt-3"> <div class="mt-3">
@@ -220,7 +220,7 @@
class: 'absolute top-3 right-3' }, class: 'absolute top-3 right-3' },
class: 'text-gray-500 hover:text-red-400 border border-[#2a2a2a] hover:border-red-500/50 rounded-lg w-9 h-9 flex items-center justify-center', class: 'text-gray-500 hover:text-red-400 border border-[#2a2a2a] hover:border-red-500/50 rounded-lg w-9 h-9 flex items-center justify-center',
title: "Arquivar #{m[:registro].motorista_nome}" do %> title: "Arquivar #{m[:registro].motorista_nome}" do %>
<%= icone :arquivar, cor: nil, tamanho: 'w-4 h-4' %> <%= icone :arquivar, cor: nil, tamanho: 'w-5 h-5', espaco: false %>
<% end %> <% end %>
<% end %> <% end %>
</div> </div>
@@ -230,7 +230,7 @@
<%# Motoristas arquivados — restauráveis %> <%# Motoristas arquivados — restauráveis %>
<% if @arquivados.present? %> <% if @arquivados.present? %>
<div class="mt-6"> <div class="mt-6">
<h2 class="text-gray-400 font-semibold text-sm mb-2 flex items-center gap-2"><%= icone :arquivar %> Motoristas arquivados (<%= @arquivados.size %>)</h2> <h2 class="text-gray-400 font-semibold text-sm mb-2 flex items-center gap-2"><%= icone :arquivar, espaco: false %> Motoristas arquivados (<%= @arquivados.size %>)</h2>
<div class="space-y-2"> <div class="space-y-2">
<% @arquivados.each do |cm| %> <% @arquivados.each do |cm| %>
<div class="flex items-center justify-between bg-[#141414] border border-[#2a2a2a] border-dashed rounded-xl px-4 py-3"> <div class="flex items-center justify-between bg-[#141414] border border-[#2a2a2a] border-dashed rounded-xl px-4 py-3">
@@ -243,7 +243,7 @@
<%= button_to desarquivar_motorista_consolidacao_path(@consolidacao, consolidacao_motorista_id: cm.id), <%= button_to desarquivar_motorista_consolidacao_path(@consolidacao, consolidacao_motorista_id: cm.id),
method: :post, method: :post,
class: 'text-green-400 hover:text-green-300 border border-[#2a2a2a] hover:border-green-500/50 px-3 py-2 rounded-lg text-xs min-h-[40px] inline-flex items-center gap-1.5' do %> class: 'text-green-400 hover:text-green-300 border border-[#2a2a2a] hover:border-green-500/50 px-3 py-2 rounded-lg text-xs min-h-[40px] inline-flex items-center gap-1.5' do %>
<%= icone :restaurar, cor: nil, tamanho: 'w-3.5 h-3.5' %> Restaurar <%= icone :restaurar, cor: nil, tamanho: 'w-4 h-4' %> Restaurar
<% end %> <% end %>
<% end %> <% end %>
<% if policy(@consolidacao).destroy? %> <% if policy(@consolidacao).destroy? %>
@@ -251,7 +251,7 @@
method: :delete, method: :delete,
form: { data: { turbo_confirm: "Excluir DEFINITIVAMENTE #{cm.motorista_nome} desta consolidação? Os lançamentos dele serão apagados e isso não pode ser desfeito." } }, form: { data: { turbo_confirm: "Excluir DEFINITIVAMENTE #{cm.motorista_nome} desta consolidação? Os lançamentos dele serão apagados e isso não pode ser desfeito." } },
class: 'text-red-400 hover:text-red-300 border border-[#2a2a2a] hover:border-red-500/50 px-3 py-2 rounded-lg text-xs min-h-[40px] inline-flex items-center gap-1.5' do %> class: 'text-red-400 hover:text-red-300 border border-[#2a2a2a] hover:border-red-500/50 px-3 py-2 rounded-lg text-xs min-h-[40px] inline-flex items-center gap-1.5' do %>
<%= icone :excluir, cor: nil, tamanho: 'w-3.5 h-3.5' %> Excluir <%= icone :excluir, cor: nil, tamanho: 'w-4 h-4' %> Excluir
<% end %> <% end %>
<% end %> <% end %>
</div> </div>
@@ -279,7 +279,7 @@
method: :post, method: :post,
form: { data: { turbo_confirm: 'Arquivar TODOS os veículos ainda não classificados 100% e finalizar? Eles ficam de fora desta consolidação (você resolve depois). Os veículos consolidados são pagos normalmente.' } }, form: { data: { turbo_confirm: 'Arquivar TODOS os veículos ainda não classificados 100% e finalizar? Eles ficam de fora desta consolidação (você resolve depois). Os veículos consolidados são pagos normalmente.' } },
class: 'bg-orange-500 hover:bg-orange-600 text-black font-bold px-5 py-3.5 rounded-lg min-h-[48px] flex items-center justify-center text-center gap-2' do %> class: 'bg-orange-500 hover:bg-orange-600 text-black font-bold px-5 py-3.5 rounded-lg min-h-[48px] flex items-center justify-center text-center gap-2' do %>
<%= icone :travado, cor: nil, tamanho: 'w-4 h-4' %> Arquivar pendentes e finalizar <%= icone :travado, cor: nil, tamanho: 'w-5 h-5' %> Arquivar pendentes e finalizar
<% end %> <% end %>
<% end %> <% end %>
<%= button_to finalizar_consolidacao_path(@consolidacao), <%= button_to finalizar_consolidacao_path(@consolidacao),
@@ -288,7 +288,7 @@
form: { data: { turbo_confirm: 'Finalizar? Após finalizada, a consolidação não poderá ser editada por operadores.' } }, form: { data: { turbo_confirm: 'Finalizar? Após finalizada, a consolidação não poderá ser editada por operadores.' } },
class: "font-bold px-6 py-3.5 rounded-lg min-h-[48px] transition-colors inline-flex items-center justify-center gap-2 class: "font-bold px-6 py-3.5 rounded-lg min-h-[48px] transition-colors inline-flex items-center justify-center gap-2
#{tudo_completo ? 'bg-green-600 hover:bg-green-500 text-white cursor-pointer' : 'bg-[#2a2a2a] text-gray-600 cursor-not-allowed'}" do %> #{tudo_completo ? 'bg-green-600 hover:bg-green-500 text-white cursor-pointer' : 'bg-[#2a2a2a] text-gray-600 cursor-not-allowed'}" do %>
Finalizar consolidação <%= icone :confirmar, cor: nil %> Finalizar consolidação <%= icone :confirmar, cor: nil, espaco: false %>
<% end %> <% end %>
</div> </div>
<% end %> <% end %>

View File

@@ -55,7 +55,7 @@
<%# Filtro de calendário — seleciona uma faixa de datas %> <%# Filtro de calendário — seleciona uma faixa de datas %>
<form id="dashboard-filtro-form" method="get" action="<%= dashboard_path %>" data-turbo="false" class="flex flex-wrap items-center gap-2"> <form id="dashboard-filtro-form" method="get" action="<%= dashboard_path %>" data-turbo="false" class="flex flex-wrap items-center gap-2">
<div class="relative"> <div class="relative">
<span class="pointer-events-none absolute right-3 top-1/2 -translate-y-1/2"><%= icone :calendario %></span> <span class="pointer-events-none absolute right-3 top-1/2 -translate-y-1/2"><%= icone :calendario, espaco: false %></span>
<input type="text" id="periodo-range" readonly placeholder="Selecione o período" <input type="text" id="periodo-range" readonly placeholder="Selecione o período"
value="<%= @periodo_inicio.strftime('%d/%m/%Y') %> até <%= @periodo_fim.strftime('%d/%m/%Y') %>" value="<%= @periodo_inicio.strftime('%d/%m/%Y') %> até <%= @periodo_fim.strftime('%d/%m/%Y') %>"
class="cursor-pointer pl-4 pr-10 py-2.5 bg-[#1a1a1a] border border-white/10 rounded-xl class="cursor-pointer pl-4 pr-10 py-2.5 bg-[#1a1a1a] border border-white/10 rounded-xl
@@ -86,7 +86,7 @@
<div class="flex items-center justify-between px-2 pb-2 mb-1 border-b border-white/10"> <div class="flex items-center justify-between px-2 pb-2 mb-1 border-b border-white/10">
<span class="text-xs uppercase tracking-wider text-gray-400">Operações</span> <span class="text-xs uppercase tracking-wider text-gray-400">Operações</span>
<% if @operacao_filtro.present? %> <% if @operacao_filtro.present? %>
<%= link_to rotulo(:fechar, 'Limpar', cor: nil, tamanho: 'w-3 h-3'), dashboard_path(inicio: @periodo_inicio.strftime('%Y-%m-%d'), fim: @periodo_fim.strftime('%Y-%m-%d')), <%= link_to rotulo(:fechar, 'Limpar', cor: nil, tamanho: 'w-3.5 h-3.5'), dashboard_path(inicio: @periodo_inicio.strftime('%Y-%m-%d'), fim: @periodo_fim.strftime('%Y-%m-%d')),
data: { turbo: false }, class: 'text-xs text-orange-400 hover:text-orange-300 font-semibold' %> data: { turbo: false }, class: 'text-xs text-orange-400 hover:text-orange-300 font-semibold' %>
<% end %> <% end %>
</div> </div>
@@ -107,7 +107,7 @@
<% end %> <% end %>
<%# Imprimir relatório financeiro do período/operação atuais %> <%# Imprimir relatório financeiro do período/operação atuais %>
<%= link_to rotulo(:imprimir, 'Relatório'), <%= link_to rotulo(:imprimir, 'Relatório', cor: nil),
dashboard_relatorio_financeiro_path( dashboard_relatorio_financeiro_path(
inicio: @periodo_inicio.strftime('%Y-%m-%d'), inicio: @periodo_inicio.strftime('%Y-%m-%d'),
fim: @periodo_fim.strftime('%Y-%m-%d'), fim: @periodo_fim.strftime('%Y-%m-%d'),
@@ -124,7 +124,7 @@
<div class="sm:col-span-2 xl:col-span-1 bg-[#f97316] rounded-2xl p-6 relative overflow-hidden"> <div class="sm:col-span-2 xl:col-span-1 bg-[#f97316] rounded-2xl p-6 relative overflow-hidden">
<div class="absolute inset-0 bg-gradient-to-br from-orange-400/20 to-transparent"></div> <div class="absolute inset-0 bg-gradient-to-br from-orange-400/20 to-transparent"></div>
<div class="relative"> <div class="relative">
<p class="text-orange-100 text-sm font-medium mb-2 flex items-center gap-2"><%= icone :dinheiro, cor: nil %> Valor Estimado</p> <p class="text-orange-100 text-sm font-medium mb-2 flex items-center gap-2"><%= icone :dinheiro, cor: nil, espaco: false %> Valor Estimado</p>
<p class="text-4xl font-black text-white mb-1"> <p class="text-4xl font-black text-white mb-1">
<%= moeda(@valor_estimado) %> <%= moeda(@valor_estimado) %>
</p> </p>
@@ -136,7 +136,7 @@
<%# Card destacado: total consolidado e pago (consolidações finalizadas do período) %> <%# Card destacado: total consolidado e pago (consolidações finalizadas do período) %>
<div class="sm:col-span-2 xl:col-span-1 bg-[#1a1a1a] rounded-2xl border border-green-500/30 p-6"> <div class="sm:col-span-2 xl:col-span-1 bg-[#1a1a1a] rounded-2xl border border-green-500/30 p-6">
<p class="text-gray-400 text-sm font-medium mb-2 flex items-center gap-2"><%= icone :consolidado_pago %> Consolidado / Pago</p> <p class="text-gray-400 text-sm font-medium mb-2 flex items-center gap-2"><%= icone :consolidado_pago, espaco: false %> Consolidado / Pago</p>
<p class="text-3xl font-black text-white mb-1"><%= moeda(@fin_custo_total) %></p> <p class="text-3xl font-black text-white mb-1"><%= moeda(@fin_custo_total) %></p>
<p class="text-gray-400 text-xs mb-2">consolidado no período</p> <p class="text-gray-400 text-xs mb-2">consolidado no período</p>
<div class="flex items-center gap-2 text-sm border-t border-white/5 pt-2"> <div class="flex items-center gap-2 text-sm border-t border-white/5 pt-2">
@@ -147,7 +147,7 @@
<%# Card 2: Total de entregas %> <%# Card 2: Total de entregas %>
<div class="bg-[#1a1a1a] rounded-2xl border border-white/5 p-6"> <div class="bg-[#1a1a1a] rounded-2xl border border-white/5 p-6">
<p class="text-gray-400 text-sm font-medium mb-2 flex items-center gap-2"><%= icone :consolidacoes %> Total Entregas</p> <p class="text-gray-400 text-sm font-medium mb-2 flex items-center gap-2"><%= icone :consolidacoes, espaco: false %> Total Entregas</p>
<p class="text-4xl font-black text-white mb-1"><%= @total_entregas %></p> <p class="text-4xl font-black text-white mb-1"><%= @total_entregas %></p>
<div class="flex flex-wrap items-center gap-x-2 gap-y-1 text-sm"> <div class="flex flex-wrap items-center gap-x-2 gap-y-1 text-sm">
<span class="text-green-400"><%= @entregas_pagas %> entregues</span> <span class="text-green-400"><%= @entregas_pagas %> entregues</span>
@@ -160,7 +160,7 @@
<%# Card 3: Consolidações %> <%# Card 3: Consolidações %>
<div class="bg-[#1a1a1a] rounded-2xl border border-white/5 p-6"> <div class="bg-[#1a1a1a] rounded-2xl border border-white/5 p-6">
<p class="text-gray-400 text-sm font-medium mb-2 flex items-center gap-2"><%= icone :planilha %> Consolidações</p> <p class="text-gray-400 text-sm font-medium mb-2 flex items-center gap-2"><%= icone :planilha, espaco: false %> Consolidações</p>
<p class="text-4xl font-black text-white mb-1"><%= @consolidacoes_mes.count %></p> <p class="text-4xl font-black text-white mb-1"><%= @consolidacoes_mes.count %></p>
<div class="flex items-center gap-2 text-sm"> <div class="flex items-center gap-2 text-sm">
<span class="text-yellow-500"><%= @consolidacoes_abertas %> abertas</span> <span class="text-yellow-500"><%= @consolidacoes_abertas %> abertas</span>
@@ -171,7 +171,7 @@
<%# Card 4: Motoristas ativos %> <%# Card 4: Motoristas ativos %>
<div class="bg-[#1a1a1a] rounded-2xl border border-white/5 p-6"> <div class="bg-[#1a1a1a] rounded-2xl border border-white/5 p-6">
<p class="text-gray-400 text-sm font-medium mb-2 flex items-center gap-2"><%= icone :veiculo %> Motoristas</p> <p class="text-gray-400 text-sm font-medium mb-2 flex items-center gap-2"><%= icone :veiculo, espaco: false %> Motoristas</p>
<p class="text-4xl font-black text-white mb-1"><%= @motoristas.count %></p> <p class="text-4xl font-black text-white mb-1"><%= @motoristas.count %></p>
<p class="text-gray-400 text-sm">com entregas no período</p> <p class="text-gray-400 text-sm">com entregas no período</p>
</div> </div>
@@ -180,22 +180,22 @@
<%# KPIs FINANCEIROS (consolidações finalizadas, já com filtro de operação) %> <%# KPIs FINANCEIROS (consolidações finalizadas, já com filtro de operação) %>
<div class="grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-4 gap-4"> <div class="grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-4 gap-4">
<div class="bg-[#1a1a1a] rounded-2xl border border-white/5 p-6"> <div class="bg-[#1a1a1a] rounded-2xl border border-white/5 p-6">
<p class="text-gray-400 text-sm font-medium mb-2 flex items-center gap-2"><%= icone :dinheiro %> Custo total</p> <p class="text-gray-400 text-sm font-medium mb-2 flex items-center gap-2"><%= icone :dinheiro, espaco: false %> Custo total</p>
<p class="text-3xl font-black text-white"><%= moeda(@fin_custo_total) %></p> <p class="text-3xl font-black text-white"><%= moeda(@fin_custo_total) %></p>
<p class="text-gray-400 text-xs mt-1"><%= @fin_qtd_entregas %> entregas classificadas</p> <p class="text-gray-400 text-xs mt-1"><%= @fin_qtd_entregas %> entregas classificadas</p>
</div> </div>
<div class="bg-[#1a1a1a] rounded-2xl border border-white/5 p-6"> <div class="bg-[#1a1a1a] rounded-2xl border border-white/5 p-6">
<p class="text-gray-400 text-sm font-medium mb-2 flex items-center gap-2"><%= icone :ticket %> Ticket médio</p> <p class="text-gray-400 text-sm font-medium mb-2 flex items-center gap-2"><%= icone :ticket, espaco: false %> Ticket médio</p>
<p class="text-3xl font-black text-white"><%= moeda(@fin_ticket_medio) %></p> <p class="text-3xl font-black text-white"><%= moeda(@fin_ticket_medio) %></p>
<p class="text-gray-400 text-xs mt-1">por entrega</p> <p class="text-gray-400 text-xs mt-1">por entrega</p>
</div> </div>
<div class="bg-[#1a1a1a] rounded-2xl border border-white/5 p-6"> <div class="bg-[#1a1a1a] rounded-2xl border border-white/5 p-6">
<p class="text-gray-400 text-sm font-medium mb-2 flex items-center gap-2"><%= icone :sucesso, cor: 'text-green-500' %> Pago</p> <p class="text-gray-400 text-sm font-medium mb-2 flex items-center gap-2"><%= icone :sucesso, cor: 'text-green-500', espaco: false %> Pago</p>
<p class="text-3xl font-black text-green-400"><%= moeda(@fin_pago) %></p> <p class="text-3xl font-black text-green-400"><%= moeda(@fin_pago) %></p>
<p class="text-gray-400 text-xs mt-1">já confirmado</p> <p class="text-gray-400 text-xs mt-1">já confirmado</p>
</div> </div>
<div class="bg-[#1a1a1a] rounded-2xl border border-white/5 p-6"> <div class="bg-[#1a1a1a] rounded-2xl border border-white/5 p-6">
<p class="text-gray-400 text-sm font-medium mb-2 flex items-center gap-2"><%= icone :relogio, cor: 'text-amber-400' %> A pagar</p> <p class="text-gray-400 text-sm font-medium mb-2 flex items-center gap-2"><%= icone :relogio, cor: 'text-amber-400', espaco: false %> A pagar</p>
<p class="text-3xl font-black text-yellow-500"><%= moeda(@fin_pendente) %></p> <p class="text-3xl font-black text-yellow-500"><%= moeda(@fin_pendente) %></p>
<p class="text-gray-400 text-xs mt-1">pendente</p> <p class="text-gray-400 text-xs mt-1">pendente</p>
</div> </div>
@@ -238,7 +238,7 @@
</div> </div>
<% else %> <% else %>
<div class="flex-1 min-h-48 flex flex-col items-center justify-center text-gray-400"> <div class="flex-1 min-h-48 flex flex-col items-center justify-center text-gray-400">
<div class="mb-2"><%= icone :custo, tamanho: 'w-8 h-8', cor: 'text-gray-600' %></div> <div class="mb-2"><%= icone :custo, tamanho: 'w-8 h-8', cor: 'text-gray-600', espaco: false %></div>
<p class="text-sm">Nenhum pagamento realizado neste período</p> <p class="text-sm">Nenhum pagamento realizado neste período</p>
<% if @pag_pend_valor.positive? %> <% if @pag_pend_valor.positive? %>
<p class="text-xs mt-1"> <p class="text-xs mt-1">
@@ -252,7 +252,7 @@
<%# Top motoristas %> <%# Top motoristas %>
<div class="bg-[#1a1a1a] rounded-2xl border border-white/5 p-6"> <div class="bg-[#1a1a1a] rounded-2xl border border-white/5 p-6">
<h2 class="text-lg font-semibold text-white mb-4 flex items-center gap-2"><%= icone :ranking %> Motoristas</h2> <h2 class="text-lg font-semibold text-white mb-4 flex items-center gap-2"><%= icone :ranking, espaco: false %> Motoristas</h2>
<% if @motoristas.any? %> <% if @motoristas.any? %>
<div class="space-y-3"> <div class="space-y-3">
@@ -282,7 +282,7 @@
</div> </div>
<% else %> <% else %>
<div class="text-center py-8 text-gray-400"> <div class="text-center py-8 text-gray-400">
<div class="mb-2"><%= icone :caminhao, tamanho: 'w-8 h-8', cor: 'text-gray-600' %></div> <div class="mb-2"><%= icone :caminhao, tamanho: 'w-8 h-8', cor: 'text-gray-600', espaco: false %></div>
<p class="text-sm">Nenhuma entrega concluída neste período</p> <p class="text-sm">Nenhuma entrega concluída neste período</p>
</div> </div>
<% end %> <% end %>
@@ -294,34 +294,34 @@
<%# Custo por operação (barra) %> <%# Custo por operação (barra) %>
<div class="bg-[#1a1a1a] rounded-2xl border border-white/5 p-6"> <div class="bg-[#1a1a1a] rounded-2xl border border-white/5 p-6">
<h2 class="text-lg font-semibold text-white mb-1 flex items-center gap-2"><%= icone :tag %> Custo por operação</h2> <h2 class="text-lg font-semibold text-white mb-1 flex items-center gap-2"><%= icone :tag, espaco: false %> Custo por operação</h2>
<p class="text-gray-400 text-sm mb-4">Valor consolidado no período</p> <p class="text-gray-400 text-sm mb-4">Valor consolidado no período</p>
<% if @fin_por_operacao.any? %> <% if @fin_por_operacao.any? %>
<div class="relative h-64"><canvas id="grafico-custo-operacao"></canvas></div> <div class="relative h-64"><canvas id="grafico-custo-operacao"></canvas></div>
<% else %> <% else %>
<div class="text-center py-8 text-gray-400"><div class="mb-2"><%= icone :tag, tamanho: 'w-8 h-8', cor: 'text-gray-600' %></div><p class="text-sm">Sem dados no período</p></div> <div class="text-center py-8 text-gray-400"><div class="mb-2"><%= icone :tag, tamanho: 'w-8 h-8', cor: 'text-gray-600', espaco: false %></div><p class="text-sm">Sem dados no período</p></div>
<% end %> <% end %>
</div> </div>
<%# Composição por tipo (rosca) %> <%# Composição por tipo (rosca) %>
<div class="bg-[#1a1a1a] rounded-2xl border border-white/5 p-6"> <div class="bg-[#1a1a1a] rounded-2xl border border-white/5 p-6">
<h2 class="text-lg font-semibold text-white mb-1 flex items-center gap-2"><%= icone :composicao %> Composição do custo</h2> <h2 class="text-lg font-semibold text-white mb-1 flex items-center gap-2"><%= icone :composicao, espaco: false %> Composição do custo</h2>
<p class="text-gray-400 text-sm mb-4">Por tipo de lançamento</p> <p class="text-gray-400 text-sm mb-4">Por tipo de lançamento</p>
<% if @fin_por_tipo.any? %> <% if @fin_por_tipo.any? %>
<div class="relative h-64"><canvas id="grafico-composicao-tipo"></canvas></div> <div class="relative h-64"><canvas id="grafico-composicao-tipo"></canvas></div>
<% else %> <% else %>
<div class="text-center py-8 text-gray-400"><div class="mb-2"><%= icone :composicao, tamanho: 'w-8 h-8', cor: 'text-gray-600' %></div><p class="text-sm">Sem dados no período</p></div> <div class="text-center py-8 text-gray-400"><div class="mb-2"><%= icone :composicao, tamanho: 'w-8 h-8', cor: 'text-gray-600', espaco: false %></div><p class="text-sm">Sem dados no período</p></div>
<% end %> <% end %>
</div> </div>
<%# Custo por motorista (barra) %> <%# Custo por motorista (barra) %>
<div class="bg-[#1a1a1a] rounded-2xl border border-white/5 p-6"> <div class="bg-[#1a1a1a] rounded-2xl border border-white/5 p-6">
<h2 class="text-lg font-semibold text-white mb-1 flex items-center gap-2"><%= icone :pessoa %> Custo por motorista</h2> <h2 class="text-lg font-semibold text-white mb-1 flex items-center gap-2"><%= icone :pessoa, espaco: false %> Custo por motorista</h2>
<p class="text-gray-400 text-sm mb-4">Por motorista no período</p> <p class="text-gray-400 text-sm mb-4">Por motorista no período</p>
<% if @fin_por_motorista.any? %> <% if @fin_por_motorista.any? %>
<div class="relative h-64"><canvas id="grafico-custo-motorista"></canvas></div> <div class="relative h-64"><canvas id="grafico-custo-motorista"></canvas></div>
<% else %> <% else %>
<div class="text-center py-8 text-gray-400"><div class="mb-2"><%= icone :pessoa, tamanho: 'w-8 h-8', cor: 'text-gray-600' %></div><p class="text-sm">Sem dados no período</p></div> <div class="text-center py-8 text-gray-400"><div class="mb-2"><%= icone :pessoa, tamanho: 'w-8 h-8', cor: 'text-gray-600', espaco: false %></div><p class="text-sm">Sem dados no período</p></div>
<% end %> <% end %>
</div> </div>
</div> </div>
@@ -331,12 +331,12 @@
<%# Rosca pago vs a pagar (por valor) %> <%# Rosca pago vs a pagar (por valor) %>
<div class="bg-[#1a1a1a] rounded-2xl border border-white/5 p-6"> <div class="bg-[#1a1a1a] rounded-2xl border border-white/5 p-6">
<h2 class="text-lg font-semibold text-white mb-1 flex items-center gap-2"><%= icone :pagamento %> Pagamentos</h2> <h2 class="text-lg font-semibold text-white mb-1 flex items-center gap-2"><%= icone :pagamento, espaco: false %> Pagamentos</h2>
<p class="text-gray-400 text-sm mb-4">Pagos por data de pagamento · pendentes no período</p> <p class="text-gray-400 text-sm mb-4">Pagos por data de pagamento · pendentes no período</p>
<% if (@pag_pago_qtd + @pag_pend_qtd).zero? %> <% if (@pag_pago_qtd + @pag_pend_qtd).zero? %>
<div class="text-center py-8 text-gray-400"> <div class="text-center py-8 text-gray-400">
<div class="mb-2"><%= icone :nota_fiscal, tamanho: 'w-8 h-8', cor: 'text-gray-600' %></div> <div class="mb-2"><%= icone :nota_fiscal, tamanho: 'w-8 h-8', cor: 'text-gray-600', espaco: false %></div>
<p class="text-sm">Nenhum pagamento ou pendência no período</p> <p class="text-sm">Nenhum pagamento ou pendência no período</p>
</div> </div>
<% else %> <% else %>
@@ -365,7 +365,7 @@
<%# Pagamentos realizados no período (filtrados por pago_em) %> <%# Pagamentos realizados no período (filtrados por pago_em) %>
<div> <div>
<h2 class="text-lg font-semibold text-white mb-4 flex items-center gap-2"><%= icone :sucesso, cor: 'text-green-500' %> Pagamentos realizados no período</h2> <h2 class="text-lg font-semibold text-white mb-4 flex items-center gap-2"><%= icone :sucesso, cor: 'text-green-500', espaco: false %> Pagamentos realizados no período</h2>
<% if @pagamentos_feitos.any? %> <% if @pagamentos_feitos.any? %>
<div class="overflow-x-auto"> <div class="overflow-x-auto">
<table class="w-full text-sm"> <table class="w-full text-sm">
@@ -405,7 +405,7 @@
<%# Pendentes (consolidações finalizadas do período sem pagamento) %> <%# Pendentes (consolidações finalizadas do período sem pagamento) %>
<div> <div>
<h2 class="text-lg font-semibold text-white mb-4 flex items-center gap-2"><%= icone :relogio, cor: 'text-amber-400' %> Pagamentos pendentes</h2> <h2 class="text-lg font-semibold text-white mb-4 flex items-center gap-2"><%= icone :relogio, cor: 'text-amber-400', espaco: false %> Pagamentos pendentes</h2>
<% if @pagamentos_pendentes.any? %> <% if @pagamentos_pendentes.any? %>
<div class="overflow-x-auto"> <div class="overflow-x-auto">
<table class="w-full text-sm"> <table class="w-full text-sm">
@@ -435,7 +435,7 @@
<div class="flex gap-1" id="pagamentos-pendentes-abas"></div> <div class="flex gap-1" id="pagamentos-pendentes-abas"></div>
</div> </div>
<% else %> <% else %>
<p class="text-gray-400 text-sm py-3">Nenhuma pendência no período. <%= icone :sucesso, cor: 'text-green-500' %></p> <p class="text-gray-400 text-sm py-3">Nenhuma pendência no período. <%= icone :sucesso, cor: 'text-green-500', espaco: false %></p>
<% end %> <% end %>
</div> </div>
</div> </div>
@@ -444,7 +444,7 @@
<%# Por operação %> <%# Por operação %>
<% if @por_operacao.any? %> <% if @por_operacao.any? %>
<div class="bg-[#1a1a1a] rounded-2xl border border-white/5 p-6"> <div class="bg-[#1a1a1a] rounded-2xl border border-white/5 p-6">
<h2 class="text-lg font-semibold text-white mb-4 flex items-center gap-2"><%= icone :operacao %> Entregas por Local</h2> <h2 class="text-lg font-semibold text-white mb-4 flex items-center gap-2"><%= icone :operacao, espaco: false %> Entregas por Local</h2>
<div class="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3"> <div class="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3">
<% total_op = @por_operacao.values.sum.to_f %> <% total_op = @por_operacao.values.sum.to_f %>
<% @por_operacao.each do |local, qtd| %> <% @por_operacao.each do |local, qtd| %>

View File

@@ -6,7 +6,7 @@
<div class="text-center mb-8"> <div class="text-center mb-8">
<div class="w-16 h-16 bg-[#f97316] rounded-2xl flex items-center justify-center mx-auto mb-3"> <div class="w-16 h-16 bg-[#f97316] rounded-2xl flex items-center justify-center mx-auto mb-3">
<%= icone :travado, tamanho: 'w-8 h-8' %> <%= icone :travado, cor: 'text-black', tamanho: 'w-8 h-8', espaco: false %>
</div> </div>
<h1 class="text-white font-bold text-2xl">Definir nova senha</h1> <h1 class="text-white font-bold text-2xl">Definir nova senha</h1>
</div> </div>

View File

@@ -6,7 +6,7 @@
<div class="text-center mb-8"> <div class="text-center mb-8">
<div class="w-16 h-16 bg-[#f97316] rounded-2xl flex items-center justify-center mx-auto mb-3"> <div class="w-16 h-16 bg-[#f97316] rounded-2xl flex items-center justify-center mx-auto mb-3">
<%= icone :chave, tamanho: 'w-8 h-8' %> <%= icone :chave, cor: 'text-black', tamanho: 'w-8 h-8', espaco: false %>
</div> </div>
<h1 class="text-white font-bold text-2xl">Recuperar senha</h1> <h1 class="text-white font-bold text-2xl">Recuperar senha</h1>
<p class="text-gray-400 text-sm mt-1">Informe seu e-mail para receber as instruções</p> <p class="text-gray-400 text-sm mt-1">Informe seu e-mail para receber as instruções</p>

View File

@@ -114,7 +114,7 @@
class="h-14 rounded-xl bg-[#0a0a0a] border border-white/10 text-gray-400 class="h-14 rounded-xl bg-[#0a0a0a] border border-white/10 text-gray-400
text-sm hover:bg-red-900/40 hover:border-red-500/50 hover:text-red-400 text-sm hover:bg-red-900/40 hover:border-red-500/50 hover:text-red-400
active:scale-95 transition-all"> active:scale-95 transition-all">
<%= icone :fechar, cor: nil, tamanho: 'w-4 h-4' %> <%= icone :fechar, cor: nil, tamanho: 'w-5 h-5', espaco: false %>
</button> </button>
<button type="button" <button type="button"
onclick="pinPress('0')" onclick="pinPress('0')"

View File

@@ -70,7 +70,7 @@
<div class="px-6 py-4 border-t border-[#2a2a2a]"> <div class="px-6 py-4 border-t border-[#2a2a2a]">
<%= link_to destroy_user_session_path, data: { turbo_method: :delete, turbo_confirm: 'Deseja sair?' }, <%= link_to destroy_user_session_path, data: { turbo_method: :delete, turbo_confirm: 'Deseja sair?' },
class: "flex items-center gap-2 text-gray-400 hover:text-red-400 text-sm transition-colors" do %> class: "flex items-center gap-2 text-gray-400 hover:text-red-400 text-sm transition-colors" do %>
<%= icone :sair, cor: nil, tamanho: 'w-4 h-4' %> Sair <%= icone :sair, cor: nil, tamanho: 'w-5 h-5' %> Sair
<% end %> <% end %>
</div> </div>
</aside> </aside>
@@ -88,7 +88,7 @@
title="Esconder/mostrar menu" aria-label="Esconder ou mostrar o menu"> title="Esconder/mostrar menu" aria-label="Esconder ou mostrar o menu">
<%# Gira 180° quando a sidebar está recolhida (ver syncSidebarToggleIcon) %> <%# Gira 180° quando a sidebar está recolhida (ver syncSidebarToggleIcon) %>
<span id="sidebar-toggle-icon" class="leading-none transition-transform duration-200"> <span id="sidebar-toggle-icon" class="leading-none transition-transform duration-200">
<%= icone :recolher, cor: nil, tamanho: 'w-4 h-4' %> <%= icone :recolher, cor: nil, tamanho: 'w-5 h-5', espaco: false %>
</span> </span>
</button> </button>
</div> </div>
@@ -98,7 +98,7 @@
<button onclick="toggleSidebar()" <button onclick="toggleSidebar()"
class="text-orange-500 min-h-[48px] min-w-[48px] flex items-center justify-center" class="text-orange-500 min-h-[48px] min-w-[48px] flex items-center justify-center"
aria-label="Abrir menu"> aria-label="Abrir menu">
<%= icone :menu, cor: nil, tamanho: 'w-7 h-7' %> <%= icone :menu, cor: nil, tamanho: 'w-7 h-7', espaco: false %>
</button> </button>
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
<%= image_tag '/logo-reem.png', alt: 'Reem Transporte', class: 'h-8 w-auto object-contain' %> <%= image_tag '/logo-reem.png', alt: 'Reem Transporte', class: 'h-8 w-auto object-contain' %>

View File

@@ -41,7 +41,7 @@
<p class="px-4 text-xs font-semibold text-gray-600 uppercase tracking-wider">Relatórios</p> <p class="px-4 text-xs font-semibold text-gray-600 uppercase tracking-wider">Relatórios</p>
</div> </div>
<div class="flex items-center gap-3 px-4 py-3 rounded-xl text-sm font-medium text-gray-600 cursor-not-allowed"> <div class="flex items-center gap-3 px-4 py-3 rounded-xl text-sm font-medium text-gray-600 cursor-not-allowed">
<%= icone :documento, cor: nil, tamanho: 'w-5 h-5' %> <%= icone :documento, cor: nil, tamanho: 'w-6 h-6' %>
<span>Relatórios PDF</span> <span>Relatórios PDF</span>
<span class="ml-auto text-[10px] bg-gray-800 text-gray-500 px-1.5 py-0.5 rounded">Em breve</span> <span class="ml-auto text-[10px] bg-gray-800 text-gray-500 px-1.5 py-0.5 rounded">Em breve</span>
</div> </div>

View File

@@ -100,7 +100,7 @@
</video> </video>
<button type="button" onclick="event.stopPropagation(); encerrarSplash()" <button type="button" onclick="event.stopPropagation(); encerrarSplash()"
class="absolute bottom-6 right-6 text-gray-400 hover:text-white text-sm border border-white/20 rounded-lg px-4 py-2"> class="absolute bottom-6 right-6 text-gray-400 hover:text-white text-sm border border-white/20 rounded-lg px-4 py-2">
Pular <%= icone :fechar, cor: nil, tamanho: 'w-3.5 h-3.5' %> Pular <%= icone :fechar, cor: nil, tamanho: 'w-4 h-4', espaco: false %>
</button> </button>
</div> </div>
<script> <script>
@@ -130,7 +130,7 @@
<div id="flash-notice" <div id="flash-notice"
class="fixed top-4 right-4 z-50 bg-orange-500 text-black font-semibold px-5 py-3 rounded-lg shadow-lg flex items-center gap-2 animate-fade-in" class="fixed top-4 right-4 z-50 bg-orange-500 text-black font-semibold px-5 py-3 rounded-lg shadow-lg flex items-center gap-2 animate-fade-in"
data-controller="flash"> data-controller="flash">
<%= icone :sucesso, cor: nil, tamanho: 'w-5 h-5' %> <%= notice %> <%= icone :sucesso, cor: nil, tamanho: 'w-6 h-6' %> <%= notice %>
</div> </div>
<% end %> <% end %>
@@ -138,7 +138,7 @@
<div id="flash-alert" <div id="flash-alert"
class="fixed top-4 right-4 z-50 bg-red-600 text-white font-semibold px-5 py-3 rounded-lg shadow-lg flex items-center gap-2" class="fixed top-4 right-4 z-50 bg-red-600 text-white font-semibold px-5 py-3 rounded-lg shadow-lg flex items-center gap-2"
data-controller="flash"> data-controller="flash">
<%= icone :alerta, cor: nil, tamanho: 'w-5 h-5' %> <%= alert %> <%= icone :alerta, cor: nil, tamanho: 'w-6 h-6' %> <%= alert %>
</div> </div>
<% end %> <% end %>

View File

@@ -9,7 +9,7 @@
<%# ── Aviso de pagamento recém-confirmado ───────────────── %> <%# ── Aviso de pagamento recém-confirmado ───────────────── %>
<% if @pagamentos_recentes.any? %> <% if @pagamentos_recentes.any? %>
<div class="bg-green-600/15 border border-green-600/40 rounded-2xl p-5 mb-6"> <div class="bg-green-600/15 border border-green-600/40 rounded-2xl p-5 mb-6">
<p class="text-green-400 font-bold uppercase tracking-wide mb-3 flex items-center gap-2"><%= icone :sucesso, cor: nil %> Pagamento confirmado!</p> <p class="text-green-400 font-bold uppercase tracking-wide mb-3 flex items-center gap-2"><%= icone :sucesso, cor: nil, espaco: false %> Pagamento confirmado!</p>
<div class="space-y-3"> <div class="space-y-3">
<% @pagamentos_recentes.each do |cm| %> <% @pagamentos_recentes.each do |cm| %>
<div class="flex flex-col gap-0.5"> <div class="flex flex-col gap-0.5">
@@ -33,7 +33,7 @@
<%# Card 1 — Valor Estimado (LARANJA) %> <%# Card 1 — Valor Estimado (LARANJA) %>
<div class="bg-orange-500 rounded-2xl p-6"> <div class="bg-orange-500 rounded-2xl p-6">
<p class="text-black/80 font-bold uppercase tracking-wide flex items-center gap-2"><%= icone :dinheiro, cor: nil %> Valor estimado deste mês</p> <p class="text-black/80 font-bold uppercase tracking-wide flex items-center gap-2"><%= icone :dinheiro, cor: nil, espaco: false %> Valor estimado deste mês</p>
<p class="text-black/70 text-sm mt-1"><%= icone :calendario, cor: nil %> <%= l @estimado_inicio, format: :short %> a <%= l @estimado_fim, format: :short %></p> <p class="text-black/70 text-sm mt-1"><%= icone :calendario, cor: nil %> <%= l @estimado_inicio, format: :short %> a <%= l @estimado_fim, format: :short %></p>
<p class="text-black font-black text-4xl sm:text-5xl mt-2 leading-tight whitespace-nowrap"><%= moeda(@valor_estimado) %></p> <p class="text-black font-black text-4xl sm:text-5xl mt-2 leading-tight whitespace-nowrap"><%= moeda(@valor_estimado) %></p>
<p class="text-black/80 text-base mt-2"> <p class="text-black/80 text-base mt-2">
@@ -46,7 +46,7 @@
<%# Card 2 — Valor Consolidado (BRANCO) %> <%# Card 2 — Valor Consolidado (BRANCO) %>
<div class="bg-white rounded-2xl p-6"> <div class="bg-white rounded-2xl p-6">
<p class="text-gray-600 font-bold uppercase tracking-wide flex items-center gap-2"><%= icone :sucesso, cor: 'text-green-600' %> Valor fechado para pagamento</p> <p class="text-gray-600 font-bold uppercase tracking-wide flex items-center gap-2"><%= icone :sucesso, cor: 'text-green-600', espaco: false %> Valor fechado para pagamento</p>
<p class="text-black font-black text-4xl sm:text-5xl mt-2 leading-tight whitespace-nowrap"><%= moeda(@valor_consolidado) %></p> <p class="text-black font-black text-4xl sm:text-5xl mt-2 leading-tight whitespace-nowrap"><%= moeda(@valor_consolidado) %></p>
<p class="text-gray-600 text-base mt-2"> <p class="text-gray-600 text-base mt-2">
Soma dos pagamentos já confirmados pela empresa Soma dos pagamentos já confirmados pela empresa
@@ -55,7 +55,7 @@
</div> </div>
<%# ── Lista de consolidações ──────────────────────────── %> <%# ── Lista de consolidações ──────────────────────────── %>
<h2 class="text-white font-bold text-xl mb-3 flex items-center gap-2"><%= icone :planilha %> Meus pagamentos</h2> <h2 class="text-white font-bold text-xl mb-3 flex items-center gap-2"><%= icone :planilha, espaco: false %> Meus pagamentos</h2>
<% if @minhas_consolidacoes.any? %> <% if @minhas_consolidacoes.any? %>
<div class="space-y-3"> <div class="space-y-3">
@@ -101,7 +101,7 @@
</div> </div>
<% else %> <% else %>
<div class="bg-[#1a1a1a] border border-[#2a2a2a] rounded-2xl p-10 text-center"> <div class="bg-[#1a1a1a] border border-[#2a2a2a] rounded-2xl p-10 text-center">
<p class="mb-3"><%= icone :vazio, tamanho: 'w-12 h-12', cor: 'text-gray-600' %></p> <p class="mb-3"><%= icone :vazio, tamanho: 'w-12 h-12', cor: 'text-gray-600', espaco: false %></p>
<p class="text-gray-200 text-lg">Você ainda não aparece em nenhum pagamento.</p> <p class="text-gray-200 text-lg">Você ainda não aparece em nenhum pagamento.</p>
<p class="text-gray-400 text-base mt-1">Quando a empresa fechar um período com suas entregas, ele aparece aqui.</p> <p class="text-gray-400 text-base mt-1">Quando a empresa fechar um período com suas entregas, ele aparece aqui.</p>
</div> </div>

View File

@@ -43,7 +43,7 @@
</button> </button>
<button type="submit" id="btn-entrar" disabled <button type="submit" id="btn-entrar" disabled
class="bg-orange-500 disabled:bg-[#2a2a2a] disabled:text-gray-600 text-black font-bold text-xl rounded-xl py-5 min-h-[64px] transition-colors"> class="bg-orange-500 disabled:bg-[#2a2a2a] disabled:text-gray-600 text-black font-bold text-xl rounded-xl py-5 min-h-[64px] transition-colors">
<%= icone :confirmar, cor: nil, tamanho: 'w-6 h-6' %> <%= icone :confirmar, cor: nil, tamanho: 'w-7 h-7', espaco: false %>
</button> </button>
</div> </div>
<% end %> <% end %>

View File

@@ -18,7 +18,7 @@
<div class="bg-[#1a1a1a] rounded-2xl border border-white/5 p-6"> <div class="bg-[#1a1a1a] rounded-2xl border border-white/5 p-6">
<div class="flex flex-wrap items-center justify-between gap-3 mb-4"> <div class="flex flex-wrap items-center justify-between gap-3 mb-4">
<div> <div>
<h2 class="text-lg font-semibold text-white flex items-center gap-2"><%= icone :planilha %> Planilha da operação</h2> <h2 class="text-lg font-semibold text-white flex items-center gap-2"><%= icone :planilha, espaco: false %> Planilha da operação</h2>
<p class="text-gray-400 text-sm">Espelho por NF — pesquise por nota, motorista, unidade, ocorrência, veículo...</p> <p class="text-gray-400 text-sm">Espelho por NF — pesquise por nota, motorista, unidade, ocorrência, veículo...</p>
</div> </div>
@@ -27,7 +27,7 @@
<input type="hidden" name="<%= k %>" value="<%= v %>"> <input type="hidden" name="<%= k %>" value="<%= v %>">
<% end %> <% end %>
<div class="relative"> <div class="relative">
<span class="pointer-events-none absolute left-3 top-1/2 -translate-y-1/2"><%= icone :buscar, cor: 'text-gray-500' %></span> <span class="pointer-events-none absolute left-3 top-1/2 -translate-y-1/2"><%= icone :buscar, cor: 'text-gray-500', espaco: false %></span>
<input type="search" name="q" value="<%= @busca %>" placeholder="Pesquisar..." <input type="search" name="q" value="<%= @busca %>" placeholder="Pesquisar..."
class="pl-9 pr-3 py-2 bg-[#0a0a0a] border border-white/10 rounded-xl text-white text-sm class="pl-9 pr-3 py-2 bg-[#0a0a0a] border border-white/10 rounded-xl text-white text-sm
w-52 sm:w-72 focus:outline-none focus:border-orange-500 placeholder-gray-500"> w-52 sm:w-72 focus:outline-none focus:border-orange-500 placeholder-gray-500">
@@ -37,7 +37,7 @@
Buscar Buscar
</button> </button>
<% if @busca.present? %> <% if @busca.present? %>
<%= link_to rotulo(:fechar, 'Limpar', cor: nil, tamanho: 'w-3 h-3'), operacoes_planilha_path(request.query_parameters.except('q', 'pg')), <%= link_to rotulo(:fechar, 'Limpar', cor: nil, tamanho: 'w-3.5 h-3.5'), operacoes_planilha_path(request.query_parameters.except('q', 'pg')),
data: { turbo: false }, class: 'text-xs text-orange-400 hover:text-orange-300 whitespace-nowrap' %> data: { turbo: false }, class: 'text-xs text-orange-400 hover:text-orange-300 whitespace-nowrap' %>
<% end %> <% end %>
</form> </form>

View File

@@ -12,12 +12,12 @@
</div> </div>
<div class="map-toggle inline-flex rounded-lg overflow-hidden border border-white/10 text-xs"> <div class="map-toggle inline-flex rounded-lg overflow-hidden border border-white/10 text-xs">
<button type="button" data-view="heat" <button type="button" data-view="heat"
class="px-3 py-1.5 bg-orange-500 text-black font-semibold"><%= icone :calor, cor: nil, tamanho: 'w-3.5 h-3.5' %> Calor</button> class="px-3 py-1.5 bg-orange-500 text-black font-semibold"><%= icone :calor, cor: nil, tamanho: 'w-4 h-4' %> Calor</button>
<button type="button" data-view="pontos" <button type="button" data-view="pontos"
class="px-3 py-1.5 text-gray-300 hover:text-white"><%= icone :local, cor: nil, tamanho: 'w-3.5 h-3.5' %> Pontos (<%= pontos.size %>)</button> class="px-3 py-1.5 text-gray-300 hover:text-white"><%= icone :local, cor: nil, tamanho: 'w-4 h-4' %> Pontos (<%= pontos.size %>)</button>
</div> </div>
<button type="button" class="map-fullscreen px-3 py-1.5 rounded-lg border border-white/10 text-gray-300 hover:text-white text-xs" title="Ver em tela cheia"> <button type="button" class="map-fullscreen px-3 py-1.5 rounded-lg border border-white/10 text-gray-300 hover:text-white text-xs" title="Ver em tela cheia">
<%= icone :tela_cheia, cor: nil, tamanho: 'w-3.5 h-3.5' %> Tela cheia <%= icone :tela_cheia, cor: nil, tamanho: 'w-4 h-4' %> Tela cheia
</button> </button>
</div> </div>
</div> </div>

View File

@@ -25,7 +25,7 @@
<p class="text-gray-400 text-sm font-medium mb-1">Total de Entregas</p> <p class="text-gray-400 text-sm font-medium mb-1">Total de Entregas</p>
<p class="text-6xl font-black text-white leading-none inline-block origin-left transition-transform duration-200 group-hover:scale-110"><%= metricas.total %></p> <p class="text-6xl font-black text-white leading-none inline-block origin-left transition-transform duration-200 group-hover:scale-110"><%= metricas.total %></p>
<p class="text-xs text-gray-500 mt-2 h-0 overflow-hidden opacity-0 transition-all duration-200 group-hover:h-4 group-hover:opacity-100"> <p class="text-xs text-gray-500 mt-2 h-0 overflow-hidden opacity-0 transition-all duration-200 group-hover:h-4 group-hover:opacity-100">
<%= icone :sucesso, cor: 'text-green-500', tamanho: 'w-3.5 h-3.5' %> <%= metricas.sucesso %> · <%= icone :ponto, cor: 'text-blue-500', tamanho: 'w-3.5 h-3.5' %> <%= metricas.recusas %> · <%= icone :parcial, cor: 'text-amber-400', tamanho: 'w-3.5 h-3.5' %> <%= metricas.pendentes %> <%= icone :sucesso, cor: 'text-green-500', tamanho: 'w-4 h-4' %> <%= metricas.sucesso %> · <%= icone :ponto, cor: 'text-blue-500', tamanho: 'w-4 h-4' %> <%= metricas.recusas %> · <%= icone :parcial, cor: 'text-amber-400', tamanho: 'w-4 h-4' %> <%= metricas.pendentes %>
</p> </p>
</div> </div>
<div class="group bg-[#1a1a1a] rounded-2xl border border-white/5 p-7 transition-all duration-200 hover:border-green-500/40 hover:bg-[#202020] hover:-translate-y-0.5 hover:shadow-lg hover:shadow-black/40"> <div class="group bg-[#1a1a1a] rounded-2xl border border-white/5 p-7 transition-all duration-200 hover:border-green-500/40 hover:bg-[#202020] hover:-translate-y-0.5 hover:shadow-lg hover:shadow-black/40">

View File

@@ -30,7 +30,7 @@
data: { turbo: false }, data: { turbo: false },
title: (ativo ? 'Clique para remover o filtro' : "Filtrar por #{cel}"), 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 %> class: "inline-flex items-center gap-1 hover:text-orange-400 #{'text-orange-400 font-semibold' if ativo}" do %>
<%= cel %><% if ativo %> <%= icone :fechar, cor: nil, tamanho: 'w-3 h-3' %><% end %> <%= cel %><% if ativo %> <%= icone :fechar, cor: nil, tamanho: 'w-3.5 h-3.5' %><% end %>
<% end %> <% end %>
<% else %> <% else %>
<%= cel %> <%= cel %>

View File

@@ -69,7 +69,7 @@
<% if @modo == 'global' %> <% if @modo == 'global' %>
<div class="flex flex-wrap items-center gap-2"> <div class="flex flex-wrap items-center gap-2">
<div class="relative"> <div class="relative">
<span class="pointer-events-none absolute right-3 top-1/2 -translate-y-1/2"><%= icone :calendario %></span> <span class="pointer-events-none absolute right-3 top-1/2 -translate-y-1/2"><%= icone :calendario, espaco: false %></span>
<input type="text" id="periodo-range" readonly placeholder="Selecione o período" <input type="text" id="periodo-range" readonly placeholder="Selecione o período"
value="<%= @periodo_inicio.strftime('%d/%m/%Y') %> até <%= @periodo_fim.strftime('%d/%m/%Y') %>" value="<%= @periodo_inicio.strftime('%d/%m/%Y') %> até <%= @periodo_fim.strftime('%d/%m/%Y') %>"
class="cursor-pointer pl-4 pr-10 py-2.5 bg-[#1a1a1a] border border-white/10 rounded-xl class="cursor-pointer pl-4 pr-10 py-2.5 bg-[#1a1a1a] border border-white/10 rounded-xl
@@ -125,7 +125,7 @@
<% @chips.each do |chip| %> <% @chips.each do |chip| %>
<span class="inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-orange-500/15 border border-orange-500/30 text-orange-300 text-xs"> <span class="inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-orange-500/15 border border-orange-500/30 text-orange-300 text-xs">
<%= chip[:rotulo] %>: <strong class="text-white"><%= chip[:display] || chip[:valor] %></strong> <%= chip[:rotulo] %>: <strong class="text-white"><%= chip[:display] || chip[:valor] %></strong>
<%= link_to icone(:fechar, cor: nil, tamanho: 'w-3 h-3'), operacoes_dashboard_path(request.query_parameters.except(chip[:param])), <%= link_to icone(:fechar, cor: nil, tamanho: 'w-3.5 h-3.5'), operacoes_dashboard_path(request.query_parameters.except(chip[:param])),
data: { turbo: false }, class: 'hover:text-white font-bold', title: 'Remover filtro' %> data: { turbo: false }, class: 'hover:text-white font-bold', title: 'Remover filtro' %>
</span> </span>
<% end %> <% end %>

View File

@@ -15,7 +15,7 @@
<%# ── Cabeçalho ─────────────────────────────────────────── %> <%# ── Cabeçalho ─────────────────────────────────────────── %>
<div class="flex flex-col sm:flex-row sm:items-center justify-between gap-4"> <div class="flex flex-col sm:flex-row sm:items-center justify-between gap-4">
<div> <div>
<h1 class="text-2xl font-bold text-white flex items-center gap-2"><%= icone :planilha %> Planilha da Operação</h1> <h1 class="text-2xl font-bold text-white flex items-center gap-2"><%= icone :planilha, espaco: false %> Planilha da Operação</h1>
<p class="text-gray-400 text-sm mt-0.5"> <p class="text-gray-400 text-sm mt-0.5">
<% if @modo == 'global' %> <% if @modo == 'global' %>
<%= icone :global %> Global · <%= @periodo_inicio.strftime('%d/%m/%Y') %> <%= @periodo_fim.strftime('%d/%m/%Y') %> <%= icone :global %> Global · <%= @periodo_inicio.strftime('%d/%m/%Y') %> <%= @periodo_fim.strftime('%d/%m/%Y') %>
@@ -79,7 +79,7 @@
<% @chips.each do |chip| %> <% @chips.each do |chip| %>
<span class="inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-orange-500/15 border border-orange-500/30 text-orange-300 text-xs"> <span class="inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-orange-500/15 border border-orange-500/30 text-orange-300 text-xs">
<%= chip[:rotulo] %>: <strong class="text-white"><%= chip[:display] || chip[:valor] %></strong> <%= chip[:rotulo] %>: <strong class="text-white"><%= chip[:display] || chip[:valor] %></strong>
<%= link_to icone(:fechar, cor: nil, tamanho: 'w-3 h-3'), operacoes_planilha_path(request.query_parameters.except(chip[:param], 'pg')), <%= link_to icone(:fechar, cor: nil, tamanho: 'w-3.5 h-3.5'), operacoes_planilha_path(request.query_parameters.except(chip[:param], 'pg')),
data: { turbo: false }, class: 'hover:text-white font-bold', title: 'Remover filtro' %> data: { turbo: false }, class: 'hover:text-white font-bold', title: 'Remover filtro' %>
</span> </span>
<% end %> <% end %>

View File

@@ -103,7 +103,7 @@
<% if @usuarios.empty? %> <% if @usuarios.empty? %>
<tr> <tr>
<td colspan="5" class="px-6 py-16 text-center text-gray-500"> <td colspan="5" class="px-6 py-16 text-center text-gray-500">
<div class="mb-3"><%= icone :usuarios, tamanho: 'w-10 h-10', cor: 'text-gray-600' %></div> <div class="mb-3"><%= icone :usuarios, tamanho: 'w-10 h-10', cor: 'text-gray-600', espaco: false %></div>
<p>Nenhum usuário encontrado.</p> <p>Nenhum usuário encontrado.</p>
</td> </td>
</tr> </tr>