Grande correção do filtro de veiculos na area de consolidação

This commit is contained in:
2026-07-03 09:58:59 -03:00
parent 83310e9e66
commit eca6df39eb
17 changed files with 681 additions and 41 deletions

View File

@@ -91,6 +91,18 @@
<% end %>
</div>
<p class="text-orange-500 font-black text-xl"><%= moeda(cm.valor_total) %></p>
<%# Breakdown por veículo (consolidados 🔒 / abertos). Informativo — o
pagamento continua sendo do motorista inteiro. %>
<% veiculos = @veiculos_por_motorista[cm.motorista_nome] %>
<% if veiculos.present? %>
<div class="flex flex-wrap gap-1.5 mt-1">
<% 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' %>">
<%= cv.fechado? ? '🔒' : '○' %> <%= cv.vehicle %> · <%= moeda(cv.valor_total) %>
</span>
<% end %>
</div>
<% end %>
<% if cm.pago? %>
<p class="text-green-400 text-xs mt-1">
💰 Pago em <%= l cm.pago_em, format: :short %>