Correção de horario e implantação da geração de Romaneio

This commit is contained in:
2026-08-27 16:21:56 -03:00
parent a0aafe62fc
commit ad1a071e4b
51 changed files with 3450 additions and 46 deletions

View File

@@ -0,0 +1,55 @@
<%# Seletor de veículo + os dois campos de cabeçalho da folha. %>
<div class="bg-[#111] border border-white/5 rounded-2xl p-4 space-y-4">
<div>
<label class="block text-sm font-medium text-gray-300 mb-1.5">Veículo</label>
<div class="flex gap-2">
<%# ao lado do select: com 72 veículos, uma lista lateral vira armadilha
de scroll, mas percorrer o plano carro a carro é o que o operador faz. %>
<button type="button" data-action="romaneio#anterior" aria-label="Veículo anterior"
class="px-3 min-w-[48px] min-h-[48px] bg-[#1a1a1a] border border-white/10 rounded-xl
text-white hover:bg-[#242424]"></button>
<select data-romaneio-target="veiculo" data-action="romaneio#trocarVeiculo"
class="flex-1 bg-[#1a1a1a] border border-white/10 rounded-xl px-3 py-3 text-white
focus:outline-none focus:border-orange-500 min-h-[48px]">
<% @veiculos.each do |v| %>
<option value="<%= v.veiculo %>" <%= 'selected' if v.veiculo == @veiculo %>>
<%= v.veiculo %> (<%= @romaneio.contagem_por_veiculo[v.veiculo].to_i %>)
</option>
<% end %>
</select>
<button type="button" data-action="romaneio#proximo" aria-label="Próximo veículo"
class="px-3 min-w-[48px] min-h-[48px] bg-[#1a1a1a] border border-white/10 rounded-xl
text-white hover:bg-[#242424]"></button>
</div>
</div>
<div class="grid grid-cols-1 sm:grid-cols-2 gap-3">
<div>
<label class="block text-sm font-medium text-gray-300 mb-1.5">
PLANO <span class="text-gray-500 font-normal">— texto do canto direito do PDF</span>
</label>
<input type="text" value="<%= @romaneio.rotulo_plano %>"
data-romaneio-target="rotulo" data-action="change->romaneio#salvarRotulo"
class="w-full bg-[#1a1a1a] border border-white/10 rounded-xl px-3 py-3 text-white
focus:outline-none focus:border-orange-500 min-h-[48px]">
</div>
<div>
<label class="block text-sm font-medium text-gray-300 mb-1.5">
Motorista <span class="text-gray-500 font-normal">— só na tela, não sai impresso</span>
</label>
<% atual = @veiculos.find { |v| v.veiculo == @veiculo } %>
<input type="text" value="<%= atual&.motorista %>" placeholder="Quem leva este carro"
data-romaneio-target="motorista" data-action="change->romaneio#salvarMotorista"
class="w-full bg-[#1a1a1a] border border-white/10 rounded-xl px-3 py-3 text-white
placeholder-gray-600 focus:outline-none focus:border-orange-500 min-h-[48px]">
</div>
</div>
<div>
<label class="block text-sm font-medium text-gray-300 mb-1.5">Buscar nesta folha</label>
<input type="search" placeholder="NF, nome ou endereço…"
data-action="input->romaneio#filtrar"
class="w-full bg-[#1a1a1a] border border-white/10 rounded-xl px-3 py-3 text-white
placeholder-gray-600 focus:outline-none focus:border-orange-500 min-h-[48px]">
</div>
</div>