Correção de alguns valores no dash principal

This commit is contained in:
2026-08-24 12:07:56 -03:00
parent 7b3ec3e407
commit 04b78bc7de
12 changed files with 690 additions and 50 deletions

View File

@@ -24,6 +24,7 @@
<div class="group bg-[#1a1a1a] rounded-2xl border border-white/5 p-7 transition-all duration-200 hover:border-white/20 hover:bg-[#202020] hover:-translate-y-0.5 hover:shadow-lg hover:shadow-black/40">
<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-xs text-gray-500 mt-2">notas fiscais da operação</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">
<%= 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>
@@ -49,6 +50,37 @@
<%= pct_total.(metricas.pendentes) %>% do total
</p>
</div>
<%# Camada operacional: os cards acima contam NOTAS (o que o cliente paga e
o que confere nos documentos). Aqui ficam as IDAS ao local — que é o
que o motorista recebe e o que o dashboard financeiro conta. Sem esta
faixa, uma NF que só foi entregue na segunda tentativa aparecia como
sucesso puro e o insucesso sumia da tela. %>
<div class="bg-[#141414] rounded-2xl border border-white/5 p-5">
<p class="text-gray-400 text-xs font-medium uppercase tracking-wider mb-3">Visitas ao local</p>
<dl class="space-y-2 text-sm">
<div class="flex items-baseline justify-between gap-2">
<dt class="text-gray-400">Visitas realizadas</dt>
<dd class="text-white font-bold"><%= metricas.total_visitas %></dd>
</div>
<div class="flex items-baseline justify-between gap-2">
<dt class="text-gray-400">Retentativas</dt>
<dd class="<%= metricas.retentativas.positive? ? 'text-amber-400' : 'text-gray-500' %> font-bold"><%= metricas.retentativas %></dd>
</div>
<div class="flex items-baseline justify-between gap-2">
<dt class="text-gray-400">Insucessos (por visita)</dt>
<dd class="text-blue-400 font-bold"><%= metricas.visitas_insucesso %></dd>
</div>
<div class="flex items-baseline justify-between gap-2">
<dt class="text-gray-400">Entregues na 2ª ida ou mais</dt>
<dd class="text-white font-bold"><%= metricas.notas_reentregues %></dd>
</div>
</dl>
<p class="text-[11px] leading-snug text-gray-500 mt-3">
O dashboard financeiro conta VISITAS (o motorista recebe por ida); esta tela conta NOTAS.
A diferença são as <%= metricas.retentativas %> retentativas acima.
</p>
</div>
</div>
<%# Coluna direita — gráficos/tabelas ocupam o espaço ao lado dos cards. %>