Correção de itens que estão fora do plano valores no dash principal
This commit is contained in:
@@ -29,9 +29,12 @@
|
||||
Nenhuma nota fora das planilhas de operação neste período.
|
||||
</p>
|
||||
<% else %>
|
||||
<%# Quebra por plano de origem — é aqui que "(Avulsa)" e "INCLUSÃO" se separam. %>
|
||||
<div class="flex flex-wrap gap-2 px-6 py-3 border-b border-white/5">
|
||||
<% fora.por_plano.first(8).each do |grupo| %>
|
||||
<%# Quebra por plano de origem — é aqui que "(Avulsa)" e "INCLUSÃO" se separam.
|
||||
Se o espelho não guardar o plano, cai para unidade (ver #agrupamento). %>
|
||||
<% rotulo_grupo, grupos = fora.agrupamento %>
|
||||
<div class="flex flex-wrap items-center gap-2 px-6 py-3 border-b border-white/5">
|
||||
<span class="text-xs text-gray-500 uppercase tracking-wider"><%= rotulo_grupo %>:</span>
|
||||
<% grupos.first(8).each do |grupo| %>
|
||||
<span class="inline-flex items-center gap-2 px-3 py-1 rounded-full bg-white/5 border border-white/10 text-xs text-gray-300">
|
||||
<%= grupo[:nome] %> <strong class="text-white"><%= grupo[:total] %></strong>
|
||||
</span>
|
||||
@@ -43,7 +46,8 @@
|
||||
<thead class="bg-white/5 text-gray-400 text-xs uppercase tracking-wider">
|
||||
<tr>
|
||||
<th class="text-left px-6 py-3 font-medium">NF</th>
|
||||
<th class="text-left px-4 py-3 font-medium">Plano / título</th>
|
||||
<th class="text-left px-4 py-3 font-medium">Destinatário</th>
|
||||
<th class="text-left px-4 py-3 font-medium">Plano</th>
|
||||
<th class="text-left px-4 py-3 font-medium">Motorista</th>
|
||||
<th class="text-left px-4 py-3 font-medium">Unidade</th>
|
||||
<th class="text-left px-4 py-3 font-medium">Data</th>
|
||||
@@ -53,17 +57,17 @@
|
||||
</thead>
|
||||
<tbody class="divide-y divide-white/5">
|
||||
<% fora.listagem.each do |linha| %>
|
||||
<% sucesso = linha['status'] == 'completed' %>
|
||||
<tr class="hover:bg-white/5">
|
||||
<td class="px-6 py-2.5 text-white font-mono"><%= linha['reference_id'] %></td>
|
||||
<td class="px-4 py-2.5 text-gray-300 max-w-[22rem] truncate" title="<%= fora.plano(linha) %>"><%= fora.plano(linha) %></td>
|
||||
<td class="px-4 py-2.5 text-gray-300"><%= linha['driver'].presence || '—' %></td>
|
||||
<td class="px-4 py-2.5 text-gray-300 max-w-[22rem] truncate" title="<%= fora.titulo(linha) %>"><%= fora.titulo(linha) || '—' %></td>
|
||||
<td class="px-4 py-2.5 text-gray-400"><%= fora.plano(linha) || '—' %></td>
|
||||
<td class="px-4 py-2.5 text-gray-300"><%= linha['driver'].presence || '— sem motorista' %></td>
|
||||
<td class="px-4 py-2.5 text-gray-300"><%= linha['contact_name'].presence || '—' %></td>
|
||||
<td class="px-4 py-2.5 text-gray-400 whitespace-nowrap">
|
||||
<%= (linha['checkout'].presence || linha['planned_date'].presence)&.to_date&.strftime('%d/%m/%Y') || '—' %>
|
||||
</td>
|
||||
<td class="px-4 py-2.5">
|
||||
<span class="<%= sucesso ? 'text-green-400' : 'text-blue-400' %>"><%= sucesso ? 'Entregue' : (linha['status'].presence || '—') %></span>
|
||||
<span class="<%= fora.sucesso?(linha) ? 'text-green-400' : 'text-yellow-400' %>"><%= fora.resultado(linha) %></span>
|
||||
</td>
|
||||
<td class="px-4 py-2.5 text-gray-400"><%= linha['observation'].presence || '—' %></td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user