Files
Reem-Notas/app/views/admin/romaneios/_avisos.html.erb

51 lines
2.4 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<%# Divergências explicadas ONDE elas aparecem — não em documentação. %>
<% multifolha = @romaneio.veiculos_multifolha %>
<% if @colunas_ausentes.include?('status') && @romaneio.operacao_tabela.present? %>
<div class="p-4 bg-amber-900/20 border border-amber-500/40 rounded-xl text-amber-200/90 text-sm flex items-start gap-2">
<span class="text-base leading-none">⚠️</span>
<p>
A operação <strong><%= @romaneio.operacao_label %></strong> não tem a coluna
<strong>STATUS</strong>, então não dá para saber quem é paciente novo — a coluna
<strong>APARELHO</strong> saiu vazia para todos e precisa ser preenchida à mão.
Um romaneio em que ninguém recebe aparelho, entregue calado, vira aparelho não entregue.
</p>
</div>
<% end %>
<% if @colunas_ausentes.include?('telefones') && @romaneio.operacao_tabela.present? %>
<div class="p-4 bg-amber-900/20 border border-amber-500/40 rounded-xl text-amber-200/90 text-sm flex items-start gap-2">
<span class="text-base leading-none">☎️</span>
<p>
A operação <strong><%= @romaneio.operacao_label %></strong> não tem a coluna
<strong>TELEFONES</strong>. O que aparece na tabela veio do “TEL:” das anotações do
plano, que nem sempre traz todos os números.
</p>
</div>
<% end %>
<% if @romaneio.operacao_tabela.blank? %>
<div class="p-4 bg-blue-900/20 border border-blue-500/40 rounded-xl text-blue-200/90 text-sm flex items-start gap-2">
<span class="text-base leading-none"></span>
<p>
Este romaneio foi importado <strong>sem operação vinculada</strong>: a coluna APARELHO
não é preenchida sozinha e o telefone vem só das anotações do plano.
Escolha a operação do mês em <strong>“Vincular operação”</strong>, logo acima — não
é preciso reimportar o plano.
</p>
</div>
<% end %>
<% if multifolha.any? %>
<div class="p-4 bg-blue-900/20 border border-blue-500/40 rounded-xl text-blue-200/90 text-sm flex items-start gap-2">
<span class="text-base leading-none">🖨️</span>
<p>
<% multifolha.each do |veiculo, total| %>
<strong><%= veiculo %></strong> tem <%= total %> paradas →
sai em <%= @romaneio.folhas_de(veiculo) %> folhas<%= ',' unless veiculo == multifolha.keys.last %>
<% end %>
— cada folha vai com o próprio bloco de assinatura, e a numeração continua entre elas.
</p>
</div>
<% end %>