Atualização dos icones para um modelo chapado
This commit is contained in:
@@ -36,31 +36,31 @@
|
||||
|
||||
<%# Dashboard — admin/gerente/operador/externo (todos menos motorista) %>
|
||||
<% unless current_user.motorista? %>
|
||||
<%= nav_link_to '📊 Dashboard', dashboard_path %>
|
||||
<%= nav_link_to '📈 Operações', operacoes_dashboard_path %>
|
||||
<%= nav_link_to 'Dashboard', dashboard_path, icon: :dashboard %>
|
||||
<%= nav_link_to 'Operações', operacoes_dashboard_path, icon: :operacoes %>
|
||||
<% end %>
|
||||
|
||||
<%# Consolidações — só quem pode consolidar (exclui o externo) %>
|
||||
<% if current_user.pode_consolidar? %>
|
||||
<%= nav_link_to '📦 Consolidações', consolidacoes_path %>
|
||||
<%= nav_link_to '📁 Arquivadas', arquivadas_consolidacoes_path %>
|
||||
<%= nav_link_to 'Consolidações', consolidacoes_path, icon: :consolidacoes %>
|
||||
<%= nav_link_to 'Arquivadas', arquivadas_consolidacoes_path, icon: :arquivadas %>
|
||||
<% end %>
|
||||
|
||||
<%# Motorista %>
|
||||
<% if current_user.motorista? %>
|
||||
<%= nav_link_to '🏠 Meu Painel', motorista_dashboard_path %>
|
||||
<%= nav_link_to 'Meu Painel', motorista_dashboard_path, icon: :painel %>
|
||||
<% end %>
|
||||
|
||||
<%# Admin/Gerente — Configurações %>
|
||||
<% if current_user.pode_ver_config? %>
|
||||
<div class="pt-4 mt-4 border-t border-[#2a2a2a]">
|
||||
<p class="px-3 text-xs text-gray-600 uppercase tracking-wider mb-2">Administração</p>
|
||||
<%= nav_link_to '👥 Usuários', admin_usuarios_path %>
|
||||
<%= nav_link_to '⚙️ Configurações', admin_configuracoes_path %>
|
||||
<%= nav_link_to '🔍 Auditoria', admin_auditoria_logs_path %>
|
||||
<%= nav_link_to '📥 Planilha SimpliRoute', admin_planilha_simpli_route_path %>
|
||||
<%= nav_link_to 'Usuários', admin_usuarios_path, icon: :usuarios %>
|
||||
<%= nav_link_to 'Configurações', admin_configuracoes_path, icon: :configuracoes %>
|
||||
<%= nav_link_to 'Auditoria', admin_auditoria_logs_path, icon: :auditoria %>
|
||||
<%= nav_link_to 'Planilha SimpliRoute', admin_planilha_simpli_route_path, icon: :planilha %>
|
||||
<% if current_user.admin? %>
|
||||
<%= nav_link_to '✏️ Editar Lançamento', admin_edicao_lancamento_path %>
|
||||
<%= nav_link_to 'Editar Lançamento', admin_edicao_lancamento_path, icon: :editar_lancamento %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -70,7 +70,7 @@
|
||||
<div class="px-6 py-4 border-t border-[#2a2a2a]">
|
||||
<%= link_to destroy_user_session_path, data: { turbo_method: :delete, turbo_confirm: 'Deseja sair?' },
|
||||
class: "flex items-center gap-2 text-gray-400 hover:text-red-400 text-sm transition-colors" do %>
|
||||
<span>🚪</span> Sair
|
||||
<%= icone :sair, cor: nil, tamanho: 'w-4 h-4' %> Sair
|
||||
<% end %>
|
||||
</div>
|
||||
</aside>
|
||||
@@ -86,15 +86,19 @@
|
||||
group-hover:border group-hover:border-orange-500/70
|
||||
focus:w-7 focus:h-16 focus:bg-[#1a1a1a] focus:text-orange-500"
|
||||
title="Esconder/mostrar menu" aria-label="Esconder ou mostrar o menu">
|
||||
<span id="sidebar-toggle-icon" class="text-lg leading-none">◀</span>
|
||||
<%# Gira 180° quando a sidebar está recolhida (ver syncSidebarToggleIcon) %>
|
||||
<span id="sidebar-toggle-icon" class="leading-none transition-transform duration-200">
|
||||
<%= icone :recolher, cor: nil, tamanho: 'w-4 h-4' %>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<%# Topbar mobile %>
|
||||
<header class="md:hidden fixed top-0 left-0 right-0 z-30 bg-[#111111] border-b border-[#2a2a2a] px-4 py-3 flex items-center justify-between">
|
||||
<button onclick="toggleSidebar()"
|
||||
class="text-orange-500 text-2xl min-h-[48px] min-w-[48px] flex items-center justify-center">
|
||||
☰
|
||||
class="text-orange-500 min-h-[48px] min-w-[48px] flex items-center justify-center"
|
||||
aria-label="Abrir menu">
|
||||
<%= icone :menu, cor: nil, tamanho: 'w-7 h-7' %>
|
||||
</button>
|
||||
<div class="flex items-center gap-2">
|
||||
<%= image_tag '/logo-reem.png', alt: 'Reem Transporte', class: 'h-8 w-auto object-contain' %>
|
||||
@@ -121,8 +125,8 @@
|
||||
}
|
||||
function syncSidebarToggleIcon() {
|
||||
const icon = document.getElementById('sidebar-toggle-icon');
|
||||
if (icon) icon.textContent =
|
||||
document.documentElement.classList.contains('sidebar-collapsed') ? '▶' : '◀';
|
||||
if (icon) icon.classList.toggle('rotate-180',
|
||||
document.documentElement.classList.contains('sidebar-collapsed'));
|
||||
}
|
||||
syncSidebarToggleIcon();
|
||||
</script>
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
<nav class="flex-1 px-3 py-4 space-y-1 overflow-y-auto scrollbar-hidden">
|
||||
|
||||
<%# Dashboard (todos exceto motorista) %>
|
||||
<%= nav_link_to 'Dashboard', dashboard_path, icon: '📊' %>
|
||||
<%= nav_link_to 'Dashboard', dashboard_path, icon: :dashboard %>
|
||||
|
||||
<%# Consolidações (admin, gerente, operador) %>
|
||||
<% if current_user.pode_criar_consolidacao? %>
|
||||
<%= nav_link_to 'Consolidações', consolidacoes_path, icon: '📋' %>
|
||||
<%= nav_link_to 'Consolidações', consolidacoes_path, icon: :consolidacoes %>
|
||||
<% end %>
|
||||
|
||||
<%# Separador Admin %>
|
||||
@@ -31,8 +31,8 @@
|
||||
<p class="px-4 text-xs font-semibold text-gray-600 uppercase tracking-wider">Administração</p>
|
||||
</div>
|
||||
|
||||
<%= nav_link_to 'Usuários', usuarios_path, icon: '👥' %>
|
||||
<%= nav_link_to 'Configurações', configuracoes_path, icon: '⚙️' %>
|
||||
<%= nav_link_to 'Usuários', usuarios_path, icon: :usuarios %>
|
||||
<%= nav_link_to 'Configurações', configuracoes_path, icon: :configuracoes %>
|
||||
<% end %>
|
||||
|
||||
<%# PDFs (fase 7 — link desabilitado por enquanto) %>
|
||||
@@ -41,7 +41,7 @@
|
||||
<p class="px-4 text-xs font-semibold text-gray-600 uppercase tracking-wider">Relatórios</p>
|
||||
</div>
|
||||
<div class="flex items-center gap-3 px-4 py-3 rounded-xl text-sm font-medium text-gray-600 cursor-not-allowed">
|
||||
<span class="text-lg w-5 text-center">📄</span>
|
||||
<%= icone :documento, cor: nil, tamanho: 'w-5 h-5' %>
|
||||
<span>Relatórios PDF</span>
|
||||
<span class="ml-auto text-[10px] bg-gray-800 text-gray-500 px-1.5 py-0.5 rounded">Em breve</span>
|
||||
</div>
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
</video>
|
||||
<button type="button" onclick="event.stopPropagation(); encerrarSplash()"
|
||||
class="absolute bottom-6 right-6 text-gray-400 hover:text-white text-sm border border-white/20 rounded-lg px-4 py-2">
|
||||
Pular ✕
|
||||
Pular <%= icone :fechar, cor: nil, tamanho: 'w-3.5 h-3.5' %>
|
||||
</button>
|
||||
</div>
|
||||
<script>
|
||||
@@ -130,7 +130,7 @@
|
||||
<div id="flash-notice"
|
||||
class="fixed top-4 right-4 z-50 bg-orange-500 text-black font-semibold px-5 py-3 rounded-lg shadow-lg flex items-center gap-2 animate-fade-in"
|
||||
data-controller="flash">
|
||||
<span>✅</span> <%= notice %>
|
||||
<%= icone :sucesso, cor: nil, tamanho: 'w-5 h-5' %> <%= notice %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
<div id="flash-alert"
|
||||
class="fixed top-4 right-4 z-50 bg-red-600 text-white font-semibold px-5 py-3 rounded-lg shadow-lg flex items-center gap-2"
|
||||
data-controller="flash">
|
||||
<span>⚠️</span> <%= alert %>
|
||||
<%= icone :alerta, cor: nil, tamanho: 'w-5 h-5' %> <%= alert %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user