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

@@ -7,7 +7,7 @@
<%= link_to rotulo(:voltar, 'Voltar (Passo 2)', cor: nil),
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]' %>
<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>
</div>
@@ -71,7 +71,7 @@
<%= c.tipo_cor[:label] %><% if (c.termo? || c.termo_especial?) && c.quantidade > 1 %> ×<%= c.quantidade %><% end %>
</span>
<% 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 %>
</td>
<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?' } },
class: 'text-gray-500 hover:text-red-400 leading-none px-1',
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 %>
</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]' %>
<div class="flex items-center justify-between mt-2">
<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>
</div>
<%= 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="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-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 class="flex flex-wrap gap-2">
<%# 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),
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 %>
<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 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-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>
<% end %>
<% end %>
@@ -103,7 +103,7 @@
params: { motorista: @motorista, vehicle: sel_unico, vehicle_sel: @veiculos_sel },
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 %>
<%= 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 %>
</div>
<% else %>
@@ -117,14 +117,14 @@
data: { 'validacao-target': 'consolidarBtn' },
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 %>
<%= 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 %>
<%= button_to arquivar_veiculo_consolidacao_consolidacao_entregas_path(@consolidacao),
method: :post,
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)." } },
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 %>
<span class="text-gray-500 text-xs" data-validacao-target="consolidarHint">
<%= status_unico[:completo] ? 'Pronto para consolidar.' : 'Classifique 100% deste veículo para consolidar.' %>
@@ -186,7 +186,7 @@
<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]">
<%= icone :adicionar %> Adicionar lançamento
<%= icone :expandir, cor: 'text-gray-500' %>
<%= icone :expandir, cor: 'text-gray-500', espaco: false %>
</button>
<div data-ferramentas-target="menu"
@@ -210,7 +210,7 @@
<div class="flex items-center justify-between mb-1">
<h2 class="text-xl font-bold text-white">Registro manual de entrega</h2>
<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>
<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"
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>
</div>
</div>
@@ -287,9 +287,9 @@
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="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"
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>
<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"
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>
</div>
</div>
@@ -357,7 +357,7 @@
<%# 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="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"
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">
@@ -382,9 +382,9 @@
<p class="text-white font-semibold truncate">
NF <%= e.numero_nf %> · <%= e.local %>
<% 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 %>
<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 %>
</p>
<p class="text-gray-400 text-xs truncate"><%= icone :local %> <%= e.address.presence || 'sem endereço' %></p>
@@ -415,7 +415,7 @@
<% end %>
<% else %>
<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>
</div>
<% end %>
@@ -424,7 +424,7 @@
<%# ── Resumo lateral (1 coluna) — rola junto se precisar ─────── %>
<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">
<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="flex justify-between items-center">