Ateração da autura dos icones
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<% content_for :title, 'Consolidações arquivadas' %>
|
||||
|
||||
<div class="flex items-center justify-between mb-6">
|
||||
<h1 class="text-2xl font-bold text-white flex items-center gap-2"><%= icone :arquivadas %> Consolidações arquivadas</h1>
|
||||
<h1 class="text-2xl font-bold text-white flex items-center gap-2"><%= icone :arquivadas, espaco: false %> Consolidações arquivadas</h1>
|
||||
<%= link_to rotulo(:voltar, 'Voltar às ativas', cor: nil), consolidacoes_path,
|
||||
class: 'text-gray-400 hover:text-white border border-[#2a2a2a] px-4 py-3 rounded-lg min-h-[48px] flex items-center' %>
|
||||
</div>
|
||||
@@ -26,7 +26,7 @@
|
||||
<%= badge_status(c.status) %>
|
||||
</div>
|
||||
<p class="text-gray-400 text-sm">
|
||||
<%= icone :calendario %> <%= l c.data_inicio, format: :short %> <%= icone :avancar, tamanho: 'w-3 h-3' %> <%= l c.data_fim, format: :short %>
|
||||
<%= icone :calendario %> <%= l c.data_inicio, format: :short %> <%= icone :avancar, tamanho: 'w-3.5 h-3.5' %> <%= l c.data_fim, format: :short %>
|
||||
· <%= icone :pessoa %> <%= c.consolidacao_motoristas.count %> motorista(s)
|
||||
· Criada por <%= c.criador.nome_display %>
|
||||
</p>
|
||||
@@ -48,12 +48,12 @@
|
||||
<%= button_to reativar_consolidacao_path(c), method: :post,
|
||||
form: { data: { turbo_confirm: 'Reativar esta consolidação? Ela voltará para a lista de ativas.' } },
|
||||
class: 'bg-orange-500 hover:bg-orange-600 text-black font-bold px-4 py-2.5 rounded-lg text-sm min-h-[44px] inline-flex items-center gap-2' do %>
|
||||
<%= icone :restaurar, cor: nil, tamanho: 'w-4 h-4' %> Reativar
|
||||
<%= icone :restaurar, cor: nil, tamanho: 'w-5 h-5' %> Reativar
|
||||
<% end %>
|
||||
<%= button_to consolidacao_path(c), method: :delete,
|
||||
form: { data: { turbo_confirm: 'EXCLUIR PERMANENTEMENTE esta consolidação e todas as suas classificações? Esta ação NÃO pode ser desfeita.' } },
|
||||
class: 'text-red-400 hover:text-white hover:bg-red-600 border border-red-900 px-4 py-2.5 rounded-lg text-sm min-h-[44px] inline-flex items-center gap-2' do %>
|
||||
<%= icone :excluir, cor: nil, tamanho: 'w-4 h-4' %> Excluir
|
||||
<%= icone :excluir, cor: nil, tamanho: 'w-5 h-5' %> Excluir
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -64,7 +64,7 @@
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="bg-[#1a1a1a] border border-[#2a2a2a] rounded-xl p-12 text-center">
|
||||
<p class="mb-4"><%= icone :pasta, tamanho: 'w-12 h-12', cor: 'text-gray-600' %></p>
|
||||
<p class="mb-4"><%= icone :pasta, tamanho: 'w-12 h-12', cor: 'text-gray-600', espaco: false %></p>
|
||||
<p class="text-gray-400 mb-4">Nenhuma consolidação arquivada.</p>
|
||||
<%= link_to 'Ver consolidações ativas', consolidacoes_path,
|
||||
class: 'inline-block bg-orange-500 hover:bg-orange-600 text-black font-bold px-5 py-3 rounded-lg' %>
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
<div data-controller="nota-avulsa"
|
||||
data-nota-avulsa-buscar-url-value="<%= buscar_nf_consolidacoes_path %>">
|
||||
<div class="flex items-center justify-between mb-6">
|
||||
<h1 class="text-2xl font-bold text-white flex items-center gap-2"><%= icone :consolidacoes %> Consolidações</h1>
|
||||
<h1 class="text-2xl font-bold text-white flex items-center gap-2"><%= icone :consolidacoes, espaco: false %> Consolidações</h1>
|
||||
<div class="flex gap-2">
|
||||
<%= link_to rotulo(:arquivadas, 'Arquivadas'), arquivadas_consolidacoes_path,
|
||||
<%= link_to rotulo(:arquivadas, 'Arquivadas', cor: nil), arquivadas_consolidacoes_path,
|
||||
class: 'text-gray-400 hover:text-white border border-[#2a2a2a] px-4 py-3 rounded-lg min-h-[48px] flex items-center transition-colors' %>
|
||||
<% if policy(Consolidacao).create? %>
|
||||
<button type="button" data-action="nota-avulsa#abrir"
|
||||
@@ -25,9 +25,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-lg p-6 max-h-[90vh] overflow-y-auto text-left">
|
||||
<div class="flex items-center justify-between mb-1">
|
||||
<h2 class="text-xl font-bold text-white flex items-center gap-2"><%= icone :adicionar %> Nota avulsa</h2>
|
||||
<h2 class="text-xl font-bold text-white flex items-center gap-2"><%= icone :adicionar, espaco: false %> Nota avulsa</h2>
|
||||
<button type="button" data-action="nota-avulsa#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">Para uma nota que chegou por fora: busque a NF e crie uma consolidação já com o apontamento do motorista.</p>
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="bg-[#1a1a1a] border border-[#2a2a2a] rounded-xl p-12 text-center">
|
||||
<p class="mb-4"><%= icone :vazio, tamanho: 'w-12 h-12', cor: 'text-gray-600' %></p>
|
||||
<p class="mb-4"><%= icone :vazio, tamanho: 'w-12 h-12', cor: 'text-gray-600', espaco: false %></p>
|
||||
<p class="text-gray-400 mb-4">Nenhuma consolidação encontrada.</p>
|
||||
<%= link_to 'Criar primeira consolidação', new_consolidacao_path,
|
||||
class: 'inline-block bg-orange-500 hover:bg-orange-600 text-black font-bold px-5 py-3 rounded-lg' %>
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
<% content_for :title, 'Nova Consolidação' %>
|
||||
|
||||
<div class="max-w-3xl mx-auto">
|
||||
<h1 class="text-2xl font-bold text-white mb-6 flex items-center gap-2"><%= icone :adicionar %> Nova Consolidação</h1>
|
||||
<h1 class="text-2xl font-bold text-white mb-6 flex items-center gap-2"><%= icone :adicionar, espaco: false %> Nova Consolidação</h1>
|
||||
|
||||
<%= form_with model: @consolidacao, class: 'bg-[#1a1a1a] border border-[#2a2a2a] rounded-xl p-6 space-y-6' do |f| %>
|
||||
|
||||
<% if @consolidacao.errors.any? %>
|
||||
<div class="bg-red-900/40 border border-red-600 rounded-lg p-4">
|
||||
<p class="text-red-400 font-bold mb-1 flex items-center gap-2"><%= icone :alerta, cor: nil %> Corrija os erros:</p>
|
||||
<p class="text-red-400 font-bold mb-1 flex items-center gap-2"><%= icone :alerta, cor: nil, espaco: false %> Corrija os erros:</p>
|
||||
<ul class="text-red-300 text-sm list-disc list-inside">
|
||||
<% @consolidacao.errors.full_messages.each do |msg| %>
|
||||
<li><%= msg %></li>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<% if @consolidacao.finalizada? %><%= badge_pagamento(@consolidacao.status_pagamento) %><% end %>
|
||||
</div>
|
||||
<p class="text-gray-400 text-sm mt-1">
|
||||
<%= icone :calendario %> <%= l @consolidacao.data_inicio, format: :short %> <%= icone :avancar, tamanho: 'w-3 h-3' %> <%= l @consolidacao.data_fim, format: :short %>
|
||||
<%= icone :calendario %> <%= l @consolidacao.data_inicio, format: :short %> <%= icone :avancar, tamanho: 'w-3.5 h-3.5' %> <%= l @consolidacao.data_fim, format: :short %>
|
||||
· Criada por <%= @consolidacao.criador.nome_display %>
|
||||
<% if @consolidacao.finalizada? %>
|
||||
· Finalizada por <%= @consolidacao.finalizador&.nome_display %> em <%= l @consolidacao.finalizado_em, format: :short %>
|
||||
@@ -35,14 +35,14 @@
|
||||
<%= link_to rotulo(:editar, 'Continuar validação', cor: nil), wizard_consolidacao_path(@consolidacao),
|
||||
class: 'bg-orange-500 hover:bg-orange-600 text-black font-bold px-5 py-3 rounded-lg min-h-[48px] flex items-center' %>
|
||||
<% end %>
|
||||
<%= link_to rotulo(:dashboard, 'Relatório financeiro'), gerar_pdf_financeiro_consolidacao_path(@consolidacao),
|
||||
<%= link_to rotulo(:dashboard, 'Relatório financeiro', cor: nil), gerar_pdf_financeiro_consolidacao_path(@consolidacao),
|
||||
data: { turbo: false },
|
||||
class: 'bg-[#1a1a1a] hover:bg-[#2a2a2a] text-white border border-orange-500 font-semibold px-4 py-3 rounded-lg min-h-[48px] flex items-center' %>
|
||||
<% if policy(@consolidacao).destroy? && !@consolidacao.arquivada? %>
|
||||
<%= button_to arquivar_consolidacao_path(@consolidacao), method: :post,
|
||||
form: { data: { turbo_confirm: 'Arquivar esta consolidação? Ela não será excluída, apenas movida para o arquivo.' } },
|
||||
class: 'text-gray-400 hover:text-white border border-[#2a2a2a] px-4 py-3 rounded-lg min-h-[48px] flex items-center gap-2' do %>
|
||||
<%= icone :arquivar, cor: nil, tamanho: 'w-4 h-4' %> Arquivar
|
||||
<%= icone :arquivar, cor: nil, tamanho: 'w-5 h-5' %> Arquivar
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
@@ -62,7 +62,7 @@
|
||||
<%= f.button type: :submit,
|
||||
data: { turbo_confirm: 'Marcar TODOS os motoristas pendentes desta consolidação como PAGOS? Confirme que a Nota Fiscal de cada um foi preenchida.' },
|
||||
class: 'bg-green-600 hover:bg-green-700 text-white font-bold px-4 py-2.5 rounded-lg text-sm cursor-pointer min-h-[44px] inline-flex items-center gap-2' do %>
|
||||
<%= icone :dinheiro, cor: nil, tamanho: 'w-4 h-4' %> Marcar tudo como pago
|
||||
<%= icone :dinheiro, cor: nil, tamanho: 'w-5 h-5' %> Marcar tudo como pago
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
@@ -70,7 +70,7 @@
|
||||
<%= button_to cancelar_pagamento_consolidacao_path(@consolidacao), method: :post,
|
||||
form: { data: { turbo_confirm: 'Estornar o pagamento de TODOS os motoristas?' } },
|
||||
class: 'text-gray-400 hover:text-white border border-[#2a2a2a] px-4 py-2.5 rounded-lg text-sm min-h-[44px] inline-flex items-center gap-2' do %>
|
||||
<%= icone :estornar, cor: nil, tamanho: 'w-4 h-4' %> Estornar tudo
|
||||
<%= icone :estornar, cor: nil, tamanho: 'w-5 h-5' %> Estornar tudo
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
@@ -84,7 +84,7 @@
|
||||
</div>
|
||||
|
||||
<%# Motoristas + botões de PDF %>
|
||||
<h2 class="text-white font-bold text-lg mb-3 flex items-center gap-2"><%= icone :usuarios %> Motoristas</h2>
|
||||
<h2 class="text-white font-bold text-lg mb-3 flex items-center gap-2"><%= icone :usuarios, espaco: false %> Motoristas</h2>
|
||||
<div class="space-y-3">
|
||||
<% @motoristas.each do |cm| %>
|
||||
<div class="bg-[#1a1a1a] border border-[#2a2a2a] rounded-xl p-5">
|
||||
@@ -104,7 +104,7 @@
|
||||
<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? ? icone(:travado, cor: nil, tamanho: 'w-3 h-3') : icone(:ponto_vazio, cor: nil, tamanho: 'w-3 h-3') %> <%= cv.vehicle %> · <%= moeda(cv.valor_total) %>
|
||||
<%= cv.fechado? ? icone(:travado, cor: nil, tamanho: 'w-3.5 h-3.5') : icone(:ponto_vazio, cor: nil, tamanho: 'w-3.5 h-3.5') %> <%= cv.vehicle %> · <%= moeda(cv.valor_total) %>
|
||||
</span>
|
||||
<% end %>
|
||||
</div>
|
||||
@@ -126,7 +126,7 @@
|
||||
<%= button_to cancelar_pagamento_consolidacao_path(@consolidacao, consolidacao_motorista_id: cm.id), method: :post,
|
||||
form: { data: { turbo_confirm: "Estornar o pagamento de #{cm.motorista_nome}?" } },
|
||||
class: 'text-gray-400 hover:text-white border border-[#2a2a2a] px-3 py-2 rounded-lg text-xs min-h-[40px] inline-flex items-center gap-1.5' do %>
|
||||
<%= icone :estornar, cor: nil, tamanho: 'w-3.5 h-3.5' %> Estornar pagamento
|
||||
<%= icone :estornar, cor: nil, tamanho: 'w-4 h-4' %> Estornar pagamento
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%# Inputs/botão associados ao form único #form-pagar-tudo via atributo form=. %>
|
||||
@@ -138,7 +138,7 @@
|
||||
name: 'consolidacao_motorista_id', value: cm.id,
|
||||
data: { turbo_confirm: "Marcar #{cm.motorista_nome} como pago?" },
|
||||
class: 'bg-green-600 hover:bg-green-700 text-white font-bold px-3 py-2 rounded-lg text-xs cursor-pointer min-h-[40px] inline-flex items-center gap-1.5' do %>
|
||||
<%= icone :dinheiro, cor: nil, tamanho: 'w-3.5 h-3.5' %> Marcar pago
|
||||
<%= icone :dinheiro, cor: nil, tamanho: 'w-4 h-4' %> Marcar pago
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -168,7 +168,7 @@
|
||||
<%# ── Apontamentos manuais (notas que chegaram por fora) ─────────────── %>
|
||||
<% if @apontamentos.present? %>
|
||||
<% pode_editar = !(@consolidacao.finalizada? && current_user.operador?) %>
|
||||
<h2 class="text-white font-bold text-lg mt-8 mb-3 flex items-center gap-2"><%= icone :adicionar %> Apontamentos manuais</h2>
|
||||
<h2 class="text-white font-bold text-lg mt-8 mb-3 flex items-center gap-2"><%= icone :adicionar, espaco: false %> Apontamentos manuais</h2>
|
||||
<div class="bg-[#1a1a1a] border border-[#2a2a2a] rounded-xl overflow-hidden">
|
||||
<table class="w-full text-sm">
|
||||
<thead class="bg-[#0a0a0a] text-gray-400">
|
||||
@@ -214,7 +214,7 @@
|
||||
method: :delete,
|
||||
form: { data: { turbo_confirm: eh_termo ? "Remover a entrega de termo de #{motorista}?" : "Remover o apontamento da NF #{nf_exibida.presence || '—'} de #{motorista}?" } },
|
||||
class: 'text-gray-400 hover:text-red-400 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 :fechar, cor: nil, tamanho: 'w-3 h-3' %> Remover
|
||||
<%= icone :fechar, cor: nil, tamanho: 'w-3.5 h-3.5' %> Remover
|
||||
<% end %>
|
||||
</td>
|
||||
<% end %>
|
||||
@@ -230,8 +230,8 @@
|
||||
<div id="modal-preview" class="fixed inset-0 bg-black/80 z-50 hidden items-center justify-center p-4">
|
||||
<div class="bg-[#1a1a1a] border border-[#2a2a2a] rounded-2xl max-w-2xl w-full max-h-[85vh] flex flex-col">
|
||||
<div class="flex items-center justify-between px-6 py-4 border-b border-[#2a2a2a]">
|
||||
<h3 class="text-white font-bold flex items-center gap-2"><%= icone :visualizar %> Pré-visualização do Extrato</h3>
|
||||
<button onclick="fecharPreview()" class="text-gray-400 hover:text-white min-w-[44px] min-h-[44px]" aria-label="Fechar"><%= icone :fechar, cor: nil, tamanho: 'w-5 h-5' %></button>
|
||||
<h3 class="text-white font-bold flex items-center gap-2"><%= icone :visualizar, espaco: false %> Pré-visualização do Extrato</h3>
|
||||
<button onclick="fecharPreview()" class="text-gray-400 hover:text-white min-w-[44px] min-h-[44px]" aria-label="Fechar"><%= icone :fechar, cor: nil, tamanho: 'w-6 h-6', espaco: false %></button>
|
||||
</div>
|
||||
<div id="modal-preview-conteudo" class="overflow-y-auto p-6 flex-1">
|
||||
<div class="flex justify-center py-10"><div class="spinner w-10 h-10"></div></div>
|
||||
@@ -243,7 +243,7 @@
|
||||
</a>
|
||||
<button onclick="fecharPreview()"
|
||||
class="px-6 py-3 text-gray-400 hover:text-white border border-[#2a2a2a] rounded-lg min-h-[48px]">
|
||||
<%= icone :voltar, cor: nil, tamanho: 'w-4 h-4' %> Voltar
|
||||
<%= icone :voltar, cor: nil, tamanho: 'w-5 h-5' %> Voltar
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<%= link_to '← Voltar para o resumo', consolidacao_path(@consolidacao), class: 'text-gray-500 hover:text-orange-500 text-sm' %>
|
||||
<h1 class="text-2xl font-bold text-white mt-2"><%= @consolidacao.nome %></h1>
|
||||
<p class="text-gray-400 text-sm">
|
||||
<%= icone :calendario %> <%= l @consolidacao.data_inicio, format: :short %> <%= icone :avancar, tamanho: 'w-3 h-3' %> <%= l @consolidacao.data_fim, format: :short %>
|
||||
<%= icone :calendario %> <%= l @consolidacao.data_inicio, format: :short %> <%= icone :avancar, tamanho: 'w-3.5 h-3.5' %> <%= l @consolidacao.data_fim, format: :short %>
|
||||
· <%= badge_status(@consolidacao.status) %>
|
||||
</p>
|
||||
</div>
|
||||
@@ -43,7 +43,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 / Ferramentas
|
||||
<%= icone :expandir, cor: 'text-gray-500' %>
|
||||
<%= icone :expandir, cor: 'text-gray-500', espaco: false %>
|
||||
</button>
|
||||
|
||||
<div data-ferramentas-target="menu"
|
||||
@@ -67,7 +67,7 @@
|
||||
<div class="flex items-center justify-between mb-1">
|
||||
<h2 class="text-xl font-bold text-white">Apontamento manual</h2>
|
||||
<button type="button" data-action="apontamento#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">Busque a nota pela base de rastreio e adicione ao fechamento do motorista correspondente.</p>
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
</div>
|
||||
<button type="button" data-action="apontamento#apontar"
|
||||
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>
|
||||
@@ -115,9 +115,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 :motorista %> Adicionar motorista</h2>
|
||||
<h2 class="text-xl font-bold text-white flex items-center gap-2"><%= icone :motorista, espaco: false %> Adicionar motorista</h2>
|
||||
<button type="button" data-action="adicionar-motorista#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">Inclua um motorista nesta consolidação. Se ele estava arquivado, será restaurado.</p>
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
|
||||
<button type="submit"
|
||||
class="w-full bg-green-600 hover:bg-green-500 text-white font-bold py-3.5 rounded-lg min-h-[48px]">
|
||||
Adicionar <%= icone :confirmar, cor: nil %>
|
||||
Adicionar <%= icone :confirmar, cor: nil, espaco: false %>
|
||||
</button>
|
||||
<% end %>
|
||||
</div>
|
||||
@@ -174,7 +174,7 @@
|
||||
<div class="flex items-center gap-4">
|
||||
<div class="w-12 h-12 rounded-full flex items-center justify-center text-xl font-black
|
||||
<%= m[:completo] ? 'bg-green-600 text-white' : 'bg-orange-500 text-black' %>">
|
||||
<%= m[:completo] ? icone(:confirmar, cor: nil, tamanho: 'w-6 h-6') : m[:registro].motorista_nome.first.upcase %>
|
||||
<%= m[:completo] ? icone(:confirmar, cor: nil, tamanho: 'w-7 h-7') : m[:registro].motorista_nome.first.upcase %>
|
||||
</div>
|
||||
<div>
|
||||
<p class="text-white font-bold text-lg"><%= m[:registro].motorista_nome %></p>
|
||||
@@ -184,7 +184,7 @@
|
||||
<%= m[:classificadas] %>/<%= m[:total] %> classificadas
|
||||
</span>
|
||||
<% if m[:apontamentos].positive? %>
|
||||
· <span class="text-orange-400"><%= icone :adicionar, cor: nil, tamanho: 'w-3 h-3' %> <%= m[:apontamentos] %> apontamento<%= 's' if m[:apontamentos] > 1 %></span>
|
||||
· <span class="text-orange-400"><%= icone :adicionar, cor: nil, tamanho: 'w-3.5 h-3.5' %> <%= m[:apontamentos] %> apontamento<%= 's' if m[:apontamentos] > 1 %></span>
|
||||
<% end %>
|
||||
</p>
|
||||
<% if m[:veiculos_total] > 0 %>
|
||||
@@ -201,7 +201,7 @@
|
||||
</div>
|
||||
<div class="text-right <%= 'pr-10' if pode_arquivar_motorista %>">
|
||||
<p class="text-orange-500 font-bold"><%= moeda(m[:registro].valor_total) %></p>
|
||||
<%= icone :avancar, cor: 'text-gray-600', tamanho: 'w-5 h-5' %>
|
||||
<%= icone :avancar, cor: 'text-gray-600', tamanho: 'w-6 h-6', espaco: false %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-3">
|
||||
@@ -220,7 +220,7 @@
|
||||
class: 'absolute top-3 right-3' },
|
||||
class: 'text-gray-500 hover:text-red-400 border border-[#2a2a2a] hover:border-red-500/50 rounded-lg w-9 h-9 flex items-center justify-center',
|
||||
title: "Arquivar #{m[:registro].motorista_nome}" do %>
|
||||
<%= icone :arquivar, cor: nil, tamanho: 'w-4 h-4' %>
|
||||
<%= icone :arquivar, cor: nil, tamanho: 'w-5 h-5', espaco: false %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
@@ -230,7 +230,7 @@
|
||||
<%# Motoristas arquivados — restauráveis %>
|
||||
<% if @arquivados.present? %>
|
||||
<div class="mt-6">
|
||||
<h2 class="text-gray-400 font-semibold text-sm mb-2 flex items-center gap-2"><%= icone :arquivar %> Motoristas arquivados (<%= @arquivados.size %>)</h2>
|
||||
<h2 class="text-gray-400 font-semibold text-sm mb-2 flex items-center gap-2"><%= icone :arquivar, espaco: false %> Motoristas arquivados (<%= @arquivados.size %>)</h2>
|
||||
<div class="space-y-2">
|
||||
<% @arquivados.each do |cm| %>
|
||||
<div class="flex items-center justify-between bg-[#141414] border border-[#2a2a2a] border-dashed rounded-xl px-4 py-3">
|
||||
@@ -243,7 +243,7 @@
|
||||
<%= button_to desarquivar_motorista_consolidacao_path(@consolidacao, consolidacao_motorista_id: cm.id),
|
||||
method: :post,
|
||||
class: 'text-green-400 hover:text-green-300 border border-[#2a2a2a] hover:border-green-500/50 px-3 py-2 rounded-lg text-xs min-h-[40px] inline-flex items-center gap-1.5' do %>
|
||||
<%= icone :restaurar, cor: nil, tamanho: 'w-3.5 h-3.5' %> Restaurar
|
||||
<%= icone :restaurar, cor: nil, tamanho: 'w-4 h-4' %> Restaurar
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if policy(@consolidacao).destroy? %>
|
||||
@@ -251,7 +251,7 @@
|
||||
method: :delete,
|
||||
form: { data: { turbo_confirm: "Excluir DEFINITIVAMENTE #{cm.motorista_nome} desta consolidação? Os lançamentos dele serão apagados e isso não pode ser desfeito." } },
|
||||
class: 'text-red-400 hover:text-red-300 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 :excluir, cor: nil, tamanho: 'w-3.5 h-3.5' %> Excluir
|
||||
<%= icone :excluir, cor: nil, tamanho: 'w-4 h-4' %> Excluir
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
@@ -279,7 +279,7 @@
|
||||
method: :post,
|
||||
form: { data: { turbo_confirm: 'Arquivar TODOS os veículos ainda não classificados 100% e finalizar? Eles ficam de fora desta consolidação (você resolve depois). Os veículos consolidados são pagos normalmente.' } },
|
||||
class: 'bg-orange-500 hover:bg-orange-600 text-black font-bold px-5 py-3.5 rounded-lg min-h-[48px] flex items-center justify-center text-center gap-2' do %>
|
||||
<%= icone :travado, cor: nil, tamanho: 'w-4 h-4' %> Arquivar pendentes e finalizar
|
||||
<%= icone :travado, cor: nil, tamanho: 'w-5 h-5' %> Arquivar pendentes e finalizar
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%= button_to finalizar_consolidacao_path(@consolidacao),
|
||||
@@ -288,7 +288,7 @@
|
||||
form: { data: { turbo_confirm: 'Finalizar? Após finalizada, a consolidação não poderá ser editada por operadores.' } },
|
||||
class: "font-bold px-6 py-3.5 rounded-lg min-h-[48px] transition-colors inline-flex items-center justify-center gap-2
|
||||
#{tudo_completo ? 'bg-green-600 hover:bg-green-500 text-white cursor-pointer' : 'bg-[#2a2a2a] text-gray-600 cursor-not-allowed'}" do %>
|
||||
Finalizar consolidação <%= icone :confirmar, cor: nil %>
|
||||
Finalizar consolidação <%= icone :confirmar, cor: nil, espaco: false %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user