efficiente-admin / index.html
diego1carmo's picture
Add 2 files
1275883 verified
Raw History Blame Contribute Delete
71.8 kB
<!DOCTYPE html> <html lang="pt-BR"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Efficient Data Integration</title> <script src="https://cdn.tailwindcss.com"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> <style> .gradient-bg { background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%); } .sidebar { transition: all 0.3s ease; } .sidebar-collapsed { width: 70px; } .sidebar-collapsed .nav-text { display: none; } .sidebar-collapsed .logo-text { display: none; } .sidebar-collapsed .nav-item { justify-content: center; } .file-drop-area { border: 2px dashed #cbd5e0; transition: all 0.3s ease; } .file-drop-area.active { border-color: #3b82f6; background-color: #f0f7ff; } .chart-container { height: 300px; } .notification { animation: slideIn 0.5s forwards; } @keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } } .progress-bar { transition: width 0.3s ease; } .toggle-checkbox:checked { right: 0; border-color: #3b82f6; } .toggle-checkbox:checked + .toggle-label { background-color: #3b82f6; } .code-block { font-family: 'Courier New', Courier, monospace; background-color: #1e293b; color: #f8fafc; padding: 1rem; border-radius: 0.5rem; overflow-x: auto; } .company-selector { appearance: none; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e"); background-position: right 0.5rem center; background-repeat: no-repeat; background-size: 1.5em 1.5em; padding-right: 2.5rem; } </style> </head> <body class="bg-gray-50 font-sans"> <!-- Login Screen (Initial View) --> <div id="login-screen" class="min-h-screen flex items-center justify-center gradient-bg p-4"> <div class="bg-white rounded-xl shadow-2xl p-8 w-full max-w-md"> <div class="text-center mb-8"> <h1 class="text-3xl font-bold text-gray-800">Efficient</h1> <p class="text-gray-600 mt-2">Faça login para acessar o painel de administração</p> </div> <form id="login-form" class="space-y-6"> <div> <label for="email" class="block text-sm font-medium text-gray-700 mb-1">E-mail</label> <input type="email" id="email" required class="w-full px-4 py-3 rounded-lg border border-gray-300 focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition"> </div> <div> <label for="password" class="block text-sm font-medium text-gray-700 mb-1">Senha</label> <input type="password" id="password" required class="w-full px-4 py-3 rounded-lg border border-gray-300 focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition"> </div> <div class="flex items-center justify-between"> <div class="flex items-center"> <input type="checkbox" id="remember" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"> <label for="remember" class="ml-2 block text-sm text-gray-700">Lembrar-me</label> </div> <a href="#" class="text-sm text-blue-600 hover:text-blue-800">Esqueceu a senha?</a> </div> <button type="submit" class="w-full gradient-bg text-white py-3 px-4 rounded-lg font-medium hover:opacity-90 transition flex items-center justify-center"> <i class="fas fa-sign-in-alt mr-2"></i> Entrar </button> </form> </div> </div> <!-- Main Application (Hidden Initially) --> <div id="app-container" class="hidden min-h-screen flex"> <!-- Sidebar --> <div id="sidebar" class="sidebar bg-white shadow-md flex flex-col h-screen"> <div class="p-4 border-b border-gray-200 flex items-center"> <button id="toggle-sidebar" class="text-gray-500 hover:text-gray-700 mr-3"> <i class="fas fa-bars"></i> </button> <div class="flex items-center"> <span class="logo-text ml-2 font-bold text-gray-800 text-xl">Efficient</span> </div> </div> <nav class="flex-1 overflow-y-auto py-4"> <div class="px-4 space-y-1"> <a href="#" id="nav-import" class="nav-item flex items-center px-4 py-3 text-sm font-medium rounded-lg bg-blue-50 text-blue-700"> <i class="fas fa-file-import mr-3 text-blue-600"></i> <span class="nav-text">Importar Dados</span> </a> <a href="#" id="nav-dashboard" class="nav-item flex items-center px-4 py-3 text-sm font-medium rounded-lg text-gray-600 hover:bg-gray-100"> <i class="fas fa-chart-bar mr-3 text-gray-500"></i> <span class="nav-text">Dashboard</span> </a> <a href="#" id="nav-api" class="nav-item flex items-center px-4 py-3 text-sm font-medium rounded-lg text-gray-600 hover:bg-gray-100"> <i class="fas fa-plug mr-3 text-gray-500"></i> <span class="nav-text">Integração API</span> </a> <a href="#" id="nav-ai" class="nav-item flex items-center px-4 py-3 text-sm font-medium rounded-lg text-gray-600 hover:bg-gray-100"> <i class="fas fa-robot mr-3 text-gray-500"></i> <span class="nav-text">Agentes de IA</span> </a> <a href="#" id="nav-logs" class="nav-item flex items-center px-4 py-3 text-sm font-medium rounded-lg text-gray-600 hover:bg-gray-100"> <i class="fas fa-clipboard-list mr-3 text-gray-500"></i> <span class="nav-text">Logs de Atividade</span> </a> </div> </nav> <div class="p-4 border-t border-gray-200"> <div class="flex items-center"> <img src="https://via.placeholder.com/40" alt="User" class="h-10 w-10 rounded-full"> <div class="ml-3"> <p class="text-sm font-medium text-gray-700">Admin User</p> <p class="text-xs text-gray-500">admin@efficient.com</p> </div> </div> <button id="logout-btn" class="mt-4 w-full flex items-center justify-center text-sm text-gray-600 hover:text-gray-900"> <i class="fas fa-sign-out-alt mr-2"></i> <span class="nav-text">Sair</span> </button> </div> </div> <!-- Main Content --> <div class="flex-1 overflow-auto h-screen"> <!-- Header --> <header class="bg-white shadow-sm py-4 px-6 flex items-center justify-between border-b border-gray-200"> <div class="flex items-center space-x-6"> <h2 id="page-title" class="text-xl font-semibold text-gray-800">Importar Dados</h2> <div class="relative"> <select id="company-select" class="company-selector text-sm font-medium text-gray-800 bg-transparent border border-gray-300 rounded-md px-4 py-2 pr-8 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"> <option>Empresa A</option> <option>Empresa B</option> <option>Empresa C</option> <option>+ Adicionar nova empresa</option> </select> </div> </div> <div class="flex items-center space-x-4"> <span class="text-sm text-gray-500 hidden md:inline">Última atualização: hoje às 14:30</span> <button class="p-2 text-gray-500 hover:text-gray-700 rounded-full hover:bg-gray-100"> <i class="fas fa-bell"></i> </button> <button class="p-2 text-gray-500 hover:text-gray-700 rounded-full hover:bg-gray-100"> <i class="fas fa-question-circle"></i> </button> <button class="text-sm text-blue-600 hover:text-blue-800 flex items-center"> <i class="fas fa-cog mr-1"></i> <span class="hidden md:inline">Configurações</span> </button> </div> </header> <!-- Import Data Section --> <div id="import-section" class="p-6"> <div class="bg-white rounded-xl shadow-sm p-6 mb-6"> <h3 class="text-lg font-medium text-gray-800 mb-4">Upload de Arquivos</h3> <div id="file-drop-area" class="file-drop-area border-2 border-dashed rounded-lg p-8 text-center cursor-pointer mb-4"> <div class="flex flex-col items-center justify-center"> <i class="fas fa-cloud-upload-alt text-4xl text-gray-400 mb-3"></i> <p class="text-gray-600 mb-1">Arraste e solte seu arquivo aqui</p> <p class="text-sm text-gray-500 mb-4">ou</p> <button id="browse-btn" class="px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition"> Selecione o arquivo </button> </div> <input type="file" id="file-input" class="hidden" accept=".csv, .xlsx, .json"> </div> <div class="text-sm text-gray-500"> <p>Formatos suportados: CSV, XLSX, JSON</p> <p>Tamanho máximo: 10MB</p> </div> </div> <div id="file-processing" class="hidden bg-white rounded-xl shadow-sm p-6 mb-6"> <div class="flex items-center justify-between mb-4"> <div> <h4 class="font-medium text-gray-800" id="processing-filename">processando arquivo.csv</h4> <p class="text-sm text-gray-500">Validando dados...</p> </div> <div class="text-right"> <span id="processing-percentage" class="font-medium">0%</span> </div> </div> <div class="w-full bg-gray-200 rounded-full h-2.5"> <div id="progress-bar" class="progress-bar bg-blue-600 h-2.5 rounded-full" style="width: 0%"></div> </div> </div> <div id="validation-results" class="hidden bg-white rounded-xl shadow-sm p-6"> <h3 class="text-lg font-medium text-gray-800 mb-4">Resultados da Validação</h3> <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-6"> <div class="bg-blue-50 rounded-lg p-4"> <p class="text-sm text-blue-600 font-medium mb-1">Total de Colaboradores</p> <p id="total-employees" class="text-2xl font-bold text-blue-800">0</p> </div> <div class="bg-red-50 rounded-lg p-4"> <p class="text-sm text-red-600 font-medium mb-1">Erros Encontrados</p> <p id="total-errors" class="text-2xl font-bold text-red-800">0</p> </div> <div class="bg-green-50 rounded-lg p-4"> <p class="text-sm text-green-600 font-medium mb-1">Total de Gestores</p> <p id="total-managers" class="text-2xl font-bold text-green-800">0</p> </div> <div class="bg-yellow-50 rounded-lg p-4"> <p class="text-sm text-yellow-600 font-medium mb-1">Funcionários Demitidos</p> <p id="total-dismissed" class="text-2xl font-bold text-yellow-800">0</p> </div> </div> <div class="mb-6"> <h4 class="font-medium text-gray-800 mb-2">Detalhes dos Erros</h4> <div class="overflow-x-auto"> <table class="min-w-full divide-y divide-gray-200"> <thead class="bg-gray-50"> <tr> <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Linha</th> <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Campo</th> <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Erro</th> <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Valor</th> </tr> </thead> <tbody id="error-details" class="bg-white divide-y divide-gray-200"> <!-- Errors will be populated here --> </tbody> </table> </div> </div> <div class="flex justify-end space-x-3"> <button id="cancel-import" class="px-4 py-2 border border-gray-300 rounded-lg text-gray-700 hover:bg-gray-50 transition"> Cancelar </button> <button id="confirm-import" class="px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition flex items-center"> <i class="fas fa-check-circle mr-2"></i> Confirmar Importação </button> </div> </div> </div> <!-- Dashboard Section --> <div id="dashboard-section" class="hidden p-6"> <div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-6"> <div class="bg-white rounded-xl shadow-sm p-6 col-span-2"> <div class="flex items-center justify-between mb-4"> <h3 class="text-lg font-medium text-gray-800">Visão Geral</h3> <div class="flex items-center space-x-2"> <select class="text-sm border border-gray-300 rounded px-3 py-1 focus:outline-none focus:ring-1 focus:ring-blue-500"> <option>Últimos 7 dias</option> <option>Últimos 30 dias</option> <option selected>Últimos 90 dias</option> <option>Este ano</option> </select> </div> </div> <div class="chart-container"> <canvas id="imports-chart"></canvas> </div> </div> <div class="bg-white rounded-xl shadow-sm p-6"> <h3 class="text-lg font-medium text-gray-800 mb-4">Últimas Importações</h3> <div class="space-y-4"> <div class="flex items-start"> <div class="bg-green-100 p-2 rounded-full mr-3"> <i class="fas fa-check-circle text-green-600"></i> </div> <div> <p class="text-sm font-medium text-gray-800">Importação concluída</p> <p class="text-xs text-gray-500">Hoje, 10:42 AM</p> <p class="text-xs text-gray-500">245 registros</p> </div> </div> <div class="flex items-start"> <div class="bg-yellow-100 p-2 rounded-full mr-3"> <i class="fas fa-exclamation-triangle text-yellow-600"></i> </div> <div> <p class="text-sm font-medium text-gray-800">Importação com erros</p> <p class="text-xs text-gray-500">Ontem, 3:15 PM</p> <p class="text-xs text-gray-500">12 erros encontrados</p> </div> </div> <div class="flex items-start"> <div class="bg-blue-100 p-2 rounded-full mr-3"> <i class="fas fa-file-import text-blue-600"></i> </div> <div> <p class="text-sm font-medium text-gray-800">Nova importação iniciada</p> <p class="text-xs text-gray-500">Ontem, 9:30 AM</p> <p class="text-xs text-gray-500">arquivo_funcionarios.xlsx</p> </div> </div> </div> </div> </div> <div class="bg-white rounded-xl shadow-sm p-6 mb-6"> <h3 class="text-lg font-medium text-gray-800 mb-4">Estatísticas de Colaboradores</h3> <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-6"> <div class="bg-indigo-50 rounded-lg p-4"> <p class="text-sm text-indigo-600 font-medium mb-1">Total Ativos</p> <p class="text-2xl font-bold text-indigo-800">1,245</p> </div> <div class="bg-purple-50 rounded-lg p-4"> <p class="text-sm text-purple-600 font-medium mb-1">Novos (30 dias)</p> <p class="text-2xl font-bold text-purple-800">42</p> </div> <div class="bg-pink-50 rounded-lg p-4"> <p class="text-sm text-pink-600 font-medium mb-1">Demitidos (30 dias)</p> <p class="text-2xl font-bold text-pink-800">18</p> </div> <div class="bg-cyan-50 rounded-lg p-4"> <p class="text-sm text-cyan-600 font-medium mb-1">Taxa de Rotatividade</p> <p class="text-2xl font-bold text-cyan-800">1.45%</p> </div> </div> <div class="chart-container"> <canvas id="employees-chart"></canvas> </div> </div> <div class="bg-white rounded-xl shadow-sm p-6"> <div class="flex items-center justify-between mb-4"> <h3 class="text-lg font-medium text-gray-800">Atividade Recente</h3> <button class="text-sm text-blue-600 hover:text-blue-800">Ver todos</button> </div> <div class="overflow-x-auto"> <table class="min-w-full divide-y divide-gray-200"> <thead class="bg-gray-50"> <tr> <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Data/Hora</th> <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Ação</th> <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Usuário</th> <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Detalhes</th> <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th> </tr> </thead> <tbody class="bg-white divide-y divide-gray-200"> <tr> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">15/06/2023 10:42</td> <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Importação de dados</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">admin@efficient.com</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">245 registros</td> <td class="px-6 py-4 whitespace-nowrap"> <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Concluído</span> </td> </tr> <tr> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">14/06/2023 15:15</td> <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Importação de dados</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">admin@efficient.com</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">12 erros encontrados</td> <td class="px-6 py-4 whitespace-nowrap"> <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800">Com erros</span> </td> </tr> <tr> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">14/6/2023 09:30</td> <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Início de importação</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">admin@efficient.com</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">arquivo_funcionarios.xlsx</td> <td class="px-6 py-4 whitespace-nowrap"> <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-blue-100 text-blue-800">Em andamento</span> </td> </tr> </tbody> </table> </div> </div> </div> <!-- API Integration Section --> <div id="api-section" class="hidden p-6"> <div class="bg-white rounded-xl shadow-sm p-6 mb-6"> <h3 class="text-lg font-medium text-gray-800 mb-4">Configuração do Webhook</h3> <div class="space-y-6"> <div> <label class="block text-sm font-medium text-gray-700 mb-1">URL do Webhook</label> <div class="flex"> <input type="text" value="https://api.efficient.com/webhook/12345" readonly class="flex-1 px-4 py-2 border border-gray-300 rounded-l-lg focus:ring-blue-500 focus:border-blue-500 bg-gray-50"> <button class="px-4 py-2 bg-blue-600 text-white rounded-r-lg hover:bg-blue-700 transition"> <i class="fas fa-copy"></i> </button> </div> <p class="mt-1 text-sm text-gray-500">Esta é sua URL exclusiva para receber dados</p> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Chave de API</label> <div class="flex"> <input type="text" value="effic_12345_secret_67890" readonly class="flex-1 px-4 py-2 border border-gray-300 rounded-l-lg focus:ring-blue-500 focus:border-blue-500 bg-gray-50"> <button class="px-4 py-2 bg-blue-600 text-white rounded-r-lg hover:bg-blue-700 transition"> <i class="fas fa-copy"></i> </button> <button class="ml-2 px-4 py-2 bg-gray-200 text-gray-700 rounded-lg hover:bg-gray-300 transition"> <i class="fas fa-redo"></i> Regenerar </button> </div> <p class="mt-1 text-sm text-gray-500">Mantenha esta chave em segredo</p> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Status do Webhook</label> <div class="flex items-center"> <div class="relative inline-block w-10 mr-2 align-middle select-none"> <input type="checkbox" id="webhook-toggle" checked class="toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer"/> <label for="webhook-toggle" class="toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 cursor-pointer"></label> </div> <span class="text-sm font-medium text-gray-700">Ativo</span> </div> </div> </div> </div> <div class="bg-white rounded-xl shadow-sm p-6 mb-6"> <h3 class="text-lg font-medium text-gray-800 mb-4">Documentação da API</h3> <div class="mb-6"> <h4 class="font-medium text-gray-800 mb-2">Autenticação</h4> <p class="text-sm text-gray-600 mb-3">Todas as requisições devem incluir o cabeçalho de autenticação:</p> <div class="bg-gray-800 rounded-lg p-4 text-sm text-gray-200 font-mono overflow-x-auto"> <p>Authorization: Bearer &lt;sua_chave_de_api&gt;</p> </div> </div> <div class="mb-6"> <h4 class="font-medium text-gray-800 mb-2">Estrutura do JSON</h4> <p class="text-sm text-gray-600 mb-3">Exemplo de payload para envio de dados de funcionários:</p> <div class="bg-gray-800 rounded-lg p-4 text-sm text-gray-200 font-mono overflow-x-auto"> <pre>{ "funcionario": { "id": "12345", "nome": "João Silva", "email": "joao.silva@empresa.com", "cargo": "Analista", "status": "ativo", "gestor": "Maria Costa", "data_demissao": null } }</pre> </div> </div> <div class="mb-6"> <h4 class="font-medium text-gray-800 mb-2">Campos Obrigatórios</h4> <div class="overflow-x-auto"> <table class="min-w-full divide-y divide-gray-200"> <thead class="bg-gray-50"> <tr> <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Campo</th> <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Tipo</th> <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Obrigatório</th> <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Descrição</th> </tr> </thead> <tbody class="bg-white divide-y divide-gray-200"> <tr> <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">funcionario.id</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">String</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Sim</td> <td class="px-6 py-4 text-sm text-gray-500">Identificador único do funcionário</td> </tr> <tr> <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">funcionario.nome</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">String</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Sim</td> <td class="px-6 py-4 text-sm text-gray-500">Nome completo do funcionário</td> </tr> <tr> <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">funcionario.email</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">String</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Sim</td> <td class="px-6 py-4 text-sm text-gray-500">E-mail corporativo</td> </tr> <tr> <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">funcionario.status</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">String</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Sim</td> <td class="px-6 py-4 text-sm text-gray-500">ativo/inativo</td> </tr> </tbody> </table> </div> </div> <div> <h4 class="font-medium text-gray-800 mb-2">Testando a Integração</h4> <p class="text-sm text-gray-600 mb-3">Você pode testar sua integração enviando uma requisição POST para a URL do webhook com os dados de exemplo.</p> <p class="text-sm text-gray-600 mb-3">Resposta esperada em caso de sucesso:</p> <div class="bg-gray-800 rounded-lg p-4 text-sm text-gray-200 font-mono overflow-x-auto mb-4"> <pre>{ "status": "success", "message": "Dados recebidos e processados com sucesso", "employee_id": "12345" }</pre> </div> <button class="px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition flex items-center"> <i class="fas fa-bolt mr-2"></i> Testar Conexão </button> </div> </div> </div> <!-- AI Agents Section --> <div id="ai-section" class="hidden p-6"> <div class="bg-white rounded-xl shadow-sm p-6 mb-6"> <h3 class="text-lg font-medium text-gray-800 mb-6">Configuração dos Agentes de IA</h3> <div class="grid grid-cols-1 md:grid-cols-2 gap-6"> <!-- Leadership Agent --> <div class="bg-indigo-50 rounded-xl p-6"> <div class="flex items-center justify-between mb-4"> <h4 class="text-md font-medium text-indigo-800 flex items-center"> <i class="fas fa-user-tie mr-2"></i> Agente de Liderança </h4> <div class="relative inline-block w-10 mr-2 align-middle select-none"> <input type="checkbox" id="leadership-toggle" checked class="toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer"/> <label for="leadership-toggle" class="toggle-label block overflow-hidden h-6 rounded-full bg-indigo-600 cursor-pointer"></label> </div> </div> <div class="space-y-4"> <div> <label class="block text-sm font-medium text-indigo-700 mb-1">Modelo de IA</label> <select class="w-full px-4 py-2 border border-indigo-200 rounded-lg focus:ring-indigo-500 focus:border-indigo-500 bg-white"> <option>GPT-4</option> <option>GPT-3.5</option> <option selected>Claude 2</option> <option>Llama 2</option> </select> </div> <div> <label class="block text-sm font-medium text-indigo-700 mb-1">Temperatura</label> <input type="range" min="0" max="1" step="0.1" value="0.7" class="w-full h-2 bg-indigo-200 rounded-lg appearance-none cursor-pointer"> <div class="flex justify-between text-xs text-indigo-600"> <span>Preciso</span> <span>Criativo</span> </div> </div> <div> <label class="block text-sm font-medium text-indigo-700 mb-1">Instruções</label> <textarea class="w-full px-4 py-2 border border-indigo-200 rounded-lg focus:ring-indigo-500 focus:border-indigo-500 bg-white h-32" placeholder="Adicione instruções específicas para o agente...">Você é um assistente de liderança especializado em gestão de pessoas. Responda de forma profissional, fornecendo insights baseados em dados e melhores práticas de RH. Mantenha um tom encorajador e orientado para soluções.</textarea> </div> <div> <label class="block text-sm font-medium text-indigo-700 mb-1">Script de Integração</label> <div class="code-block"> <pre>&lt;script src="https://chat.efficient.com/agent.js?id=lead_12345"&gt;&lt;/script&gt; &lt;div id="efficient-chat" data-agent="lead_12345" data-company="Empresa A"&gt;&lt;/div&gt;</pre> </div> <button class="mt-2 px-3 py-1 bg-indigo-600 text-white text-sm rounded hover:bg-indigo-700 transition flex items-center"> <i class="fas fa-copy mr-1"></i> Copiar Script </button> </div> </div> </div> <!-- Employee Agent --> <div class="bg-purple-50 rounded-xl p-6"> <div class="flex items-center justify-between mb-4"> <h4 class="text-md font-medium text-purple-800 flex items-center"> <i class="fas fa-users mr-2"></i> Agente de Colaboradores </h4> <div class="relative inline-block w-10 mr-2 align-middle select-none"> <input type="checkbox" id="employee-toggle" checked class="toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer"/> <label for="employee-toggle" class="toggle-label block overflow-hidden h-6 rounded-full bg-purple-600 cursor-pointer"></label> </div> </div> <div class="space-y-4"> <div> <label class="block text-sm font-medium text-purple-700 mb-1">Modelo de IA</label> <select class="w-full px-4 py-2 border border-purple-200 rounded-lg focus:ring-purple-500 focus:border-purple-500 bg-white"> <option>GPT-4</option> <option selected>GPT-3.5</option> <option>Claude 2</option> <option>Llama 2</option> </select> </div> <div> <label class="block text-sm font-medium text-purple-700 mb-1">Temperatura</label> <input type="range" min="0" max="1" step="0.1" value="0.5" class="w-full h-2 bg-purple-200 rounded-lg appearance-none cursor-pointer"> <div class="flex justify-between text-xs text-purple-600"> <span>Preciso</span> <span>Criativo</span> </div> </div> <div> <label class="block text-sm font-medium text-purple-700 mb-1">Instruções</label> <textarea class="w-full px-4 py-2 border border-purple-200 rounded-lg focus:ring-purple-500 focus:border-purple-500 bg-white h-32" placeholder="Adicione instruções específicas para o agente...">Você é um assistente para colaboradores da empresa. Responda perguntas sobre benefícios, políticas, procedimentos e cultura organizacional de forma clara acessível. Seja empático e paciente, especialmente com questões sensíveis.</textarea> </div> <div> <label class="block text-sm font-medium text-purple-700 mb-1">Script de Integração</label> <div class="code-block"> <pre>&lt;script src="https://chat.efficient.com/agent.js?id=emp_67890"&gt;&lt;/script&gt; &lt;div id="efficient-chat" data-agent="emp_67890" data-company="Empresa A"&gt;&lt;/div&gt;</pre> </div> <button class="mt-2 px-3 py-1 bg-purple-600 text-white text-sm rounded hover:bg-purple-700 transition flex items-center"> <i class="fas fa-copy mr-1"></i> Copiar Script </button> </div> </div> </div> </div> <div class="mt-6 bg-white border border-gray-200 rounded-xl p-6"> <h4 class="text-md font-medium text-gray-800 mb-4">Pré-visualização do Chat</h4> <div class="border border-gray-200 rounded-lg p-4 h-64 overflow-y-auto bg-gray-50"> <div class="flex mb-4"> <div class="bg-indigo-100 p-3 rounded-lg max-w-xs"> <p class="text-sm text-gray-800">Olá! Como posso te ajudar hoje?</p> </div> </div> <div class="flex mb-4 justify-end"> <div class="bg-blue-100 p-3 rounded-lg max-w-xs"> <p class="text-sm text-gray-800">Quais são os benefícios para novos colaboradores?</p> </div> </div> <div class="flex mb-4"> <div class="bg-indigo-100 p-3 rounded-lg max-w-md"> <p class="text-sm text-gray-800">Na nossa empresa, os benefícios incluem plano de saúde, vale-refeição, gympass, participação nos lucros e auxílio home office. Posso te dar mais detalhes sobre algum específico?</p> </div> </div> </div> <div class="mt-4 flex"> <input type="text" placeholder="Digite sua mensagem..." class="flex-1 px-4 py-2 border border-gray-300 rounded-l-lg focus:ring-blue-500 focus:border-blue-500"> <button class="px-4 py-2 bg-blue-600 text-white rounded-r-lg hover:bg-blue-700 transition"> <i class="fas fa-paper-plane"></i> </button> </div> </div> </div> </div> <!-- Activity Logs Section --> <div id="logs-section" class="hidden p-6"> <div class="bg-white rounded-xl shadow-sm p-6"> <div class="flex items-center justify-between mb-6"> <h3 class="text-lg font-medium text-gray-800">Logs de Atividade</h3> <div class="flex items-center space-x-3"> <div class="relative"> <input type="text" placeholder="Buscar..." class="pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:ring-blue-500 focus:border-blue-500"> <i class="fas fa-search absolute left-3 top-3 text-gray-400"></i> </div> <select class="text-sm border border-gray-300 rounded px-3 py-2 focus:outline-none focus:ring-1 focus:ring-blue-500"> <option>Todos os tipos</option> <option>Importações</option> <option>API</option> <option>Configurações</option> </select> <select class="text-sm border border-gray-300 rounded px-3 py-2 focus:outline-none focus:ring-1 focus:ring-blue-500"> <option>Últimos 7 dias</option> <option>Últimos 30 dias</option> <option selected>Últimos 90 dias</option> <option>Este ano</option> </select> </div> </div> <div class="overflow-x-auto"> <table class="min-w-full divide-y divide-gray-200"> <thead class="bg-gray-50"> <tr> <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Data/Hora</th> <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Tipo</th> <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Ação</th> <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Usuário</th> <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Detalhes</th> <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">IP</th> </tr> </thead> <tbody class="bg-white divide-y divide-gray-200"> <tr> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">15/06/2023 10:42</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-blue-100 text-blue-800">Importação</span> </td> <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Dados importados</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">admin@efficient.com</td> <td class="px-6 py-4 text-sm text-gray-500">245 registros processados</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">192.168.1.1</td> </tr> <tr> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">14/06/2023 15:15</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-purple-100 text-purple-800">API</span> </td> <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Webhook recebido</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">sistema@cliente.com</td> <td class="px-6 py-4 text-sm text-gray-500">Atualização de status</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">201.28.93.12</td> </tr> <tr> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">14/06/2023 09:30</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-blue-100 text-blue-800">Importação</span> </td> <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Arquivo carregado</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">admin@efficient.com</td> <td class="px-6 py-4 text-sm text-gray-500">arquivo_funcionarios.xlsx</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">192.168.1.1</td> </tr> <tr> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">13/06/2023 16:45</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Configuração</span> </td> <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Chave de API regenerada</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">admin@efficient.com</td> <td class="px-6 py-4 text-sm text-gray-500">Nova chave gerada</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">192.168.1.1</td> </tr> </tbody> </table> </div> <div class="flex items-center justify-between mt-6"> <div class="text-sm text-gray-500"> Mostrando 1 a 4 de 24 registros </div> <div class="flex space-x-1"> <button class="px-3 py-1 border border-gray-300 rounded text-gray-700 hover:bg-gray-100"> <i class="fas fa-angle-left"></i> </button> <button class="px-3 py-1 border border-blue-500 bg-blue-50 text-blue-600 rounded">1</button> <button class="px-3 py-1 border border-gray-300 rounded text-gray-700 hover:bg-gray-100">2</button> <button class="px-3 py-1 border border-gray-300 rounded text-gray-700 hover:bg-gray-100">3</button> <button class="px-3 py-1 border border-gray-300 rounded text-gray-700 hover:bg-gray-100"> <i class="fas fa-angle-right"></i> </button> </div> </div> </div> </div> </div> </div> <!-- Notification Container --> <div id="notification-container" class="fixed bottom-4 right-4 space-y-3 z-50"></div> <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> <script> // DOM Elements const loginScreen = document.getElementById('login-screen'); const appContainer = document.getElementById('app-container'); const loginForm = document.getElementById('login-form'); const logoutBtn = document.getElementById('logout-btn'); const toggleSidebar = document.getElementById('toggle-sidebar'); const sidebar = document.getElementById('sidebar'); const navImport = document.getElementById('nav-import'); const navDashboard = document.getElementById('nav-dashboard'); const navApi = document.getElementById('nav-api'); const navAI = document.getElementById('nav-ai'); const navLogs = document.getElementById('nav-logs'); const importSection = document.getElementById('import-section'); const dashboardSection = document.getElementById('dashboard-section'); const apiSection = document.getElementById('api-section'); const aiSection = document.getElementById('ai-section'); const logsSection = document.getElementById('logs-section'); const pageTitle = document.getElementById('page-title'); const fileDropArea = document.getElementById('file-drop-area'); const fileInput = document.getElementById('file-input'); const browseBtn = document.getElementById('browse-btn'); const fileProcessing = document.getElementById('file-processing'); const processingFilename = document.getElementById('processing-filename'); const processingPercentage = document.getElementById('processing-percentage'); const progressBar = document.getElementById('progress-bar'); const validationResults = document.getElementById('validation-results'); const totalEmployees = document.getElementById('total-employees'); const totalErrors = document.getElementById('total-errors'); const totalManagers = document.getElementById('total-managers'); const totalDismissed = document.getElementById('total-dismissed'); const errorDetails = document.getElementById('error-details'); const cancelImport = document.getElementById('cancel-import'); const confirmImport = document.getElementById('confirm-import'); const notificationContainer = document.getElementById('notification-container'); const companySelect = document.getElementById('company-select'); // Login Simulation loginForm.addEventListener('submit', function(e) { e.preventDefault(); const email = document.getElementById('email').value; const password = document.getElementById('password').value; // Simple validation if (email && password) { // Simulate login processing showNotification('Login realizado com sucesso!', 'success'); // Hide login screen and show app after delay setTimeout(() => { loginScreen.classList.add('hidden'); appContainer.classList.remove('hidden'); // Initialize charts initCharts(); }, 1000); } else { showNotification('Por favor, preencha todos os campos.', 'error'); } }); // Logout logoutBtn.addEventListener('click', function() { appContainer.classList.add('hidden'); loginScreen.classList.remove('hidden'); showNotification('Você saiu do sistema.', 'info'); }); // Toggle Sidebar toggleSidebar.addEventListener('click', function() { sidebar.classList.toggle('sidebar-collapsed'); }); // Company Select Change companySelect.addEventListener('change', function() { if (this.value === '+ Adicionar nova empresa') { showNotification('Redirecionando para criação de nova empresa...', 'info'); setTimeout(() => { this.selectedIndex = 0; }, 2000); } else { showNotification(`Empresa alterada para: ${this.value}`, 'success'); } }); // Navigation navImport.addEventListener('click', function(e) { e.preventDefault(); setActiveNav(navImport); showSection(importSection, 'Importar Dados'); }); navDashboard.addEventListener('click', function(e) { e.preventDefault(); setActiveNav(navDashboard); showSection(dashboardSection, 'Dashboard'); }); navApi.addEventListener('click', function(e) { e.preventDefault(); setActiveNav(navApi); showSection(apiSection, 'Integração API'); }); navAI.addEventListener('click', function(e) { e.preventDefault(); setActiveNav(navAI); showSection(aiSection, 'Agentes de IA'); }); navLogs.addEventListener('click', function(e) { e.preventDefault(); setActiveNav(navLogs); showSection(logsSection, 'Logs de Atividade'); }); function setActiveNav(activeNav) { // Remove active class from all nav items [navImport, navDashboard, navApi, navAI, navLogs].forEach(nav => { nav.classList.remove('bg-blue-50', 'text-blue-700'); nav.classList.add('text-gray-600', 'hover:bg-gray-100'); // Update icons color const icon = nav.querySelector('i'); icon.classList.remove('text-blue-600'); icon.classList.add('text-gray-500'); }); // Add active class to clicked nav activeNav.classList.add('bg-blue-50', 'text-blue-700'); activeNav.classList.remove('text-gray-600', 'hover:bg-gray-100'); // Update icon color const activeIcon = activeNav.querySelector('i'); activeIcon.classList.add('text-blue-600'); activeIcon.classList.remove('text-gray-500'); } function showSection(section, title) { // Hide all sections [importSection, dashboardSection, apiSection, aiSection, logsSection].forEach(sec => { sec.classList.add('hidden'); }); // Show selected section section.classList.remove('hidden'); // Update page title pageTitle.textContent = title; } // File Upload Handling browseBtn.addEventListener('click', function() { fileInput.click(); }); fileInput.addEventListener('change', function() { if (this.files.length) { handleFiles(this.files); } }); // Drag and Drop ['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => { fileDropArea.addEventListener(eventName, preventDefaults, false); }); function preventDefaults(e) { e.preventDefault(); e.stopPropagation(); } ['dragenter', 'dragover'].forEach(eventName => { fileDropArea.addEventListener(eventName, highlight, false); }); ['dragleave', 'drop'].forEach(eventName => { fileDropArea.addEventListener(eventName, unhighlight, false); }); function highlight() { fileDropArea.classList.add('active'); } function unhighlight() { fileDropArea.classList.remove('active'); } fileDropArea.addEventListener('drop', function(e) { const dt = e.dataTransfer; const files = dt.files; if (files.length) { handleFiles(files); } }); function handleFiles(files) { const file = files[0]; const validTypes = ['text/csv', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/json']; // Check file type if (!validTypes.includes(file.type) && !file.name.endsWith('.csv') && !file.name.endsWith('.xlsx') && !file.name.endsWith('.json')) { showNotification('Formato de arquivo não suportado. Use CSV, XLSX ou JSON.', 'error'); return; } // Check file size (10MB max) if (file.size > 10 * 1024 * 1024) { showNotification('O arquivo é muito grande. Tamanho máximo: 10MB.', 'error'); return; } // Show processing UI fileProcessing.classList.remove('hidden'); processingFilename.textContent = file.name; // Simulate file processing with progress let progress = 0; const interval = setInterval(() => { progress += Math.floor(Math.random() * 10) + 5; if (progress > 100) progress = 100; processingPercentage.textContent = `${progress}%`; progressBar.style.width = `${progress}%`; if (progress === 100) { clearInterval(interval); setTimeout(() => { processFileComplete(file); }, 500); } }, 200); } function processFileComplete(file) { fileProcessing.classList.add('hidden'); // Simulate validation results const employeeCount = Math.floor(Math.random() * 500) + 100; const errorCount = Math.floor(Math.random() * 20); const managerCount = Math.floor(employeeCount * 0.15); const dismissedCount = Math.floor(employeeCount * 0.05); totalEmployees.textContent = employeeCount; totalErrors.textContent = errorCount; totalManagers.textContent = managerCount; totalDismissed.textContent = dismissedCount; // Populate error details errorDetails.innerHTML = ''; if (errorCount > 0) { for (let i = 0; i < errorCount; i++) { const errors = [ { field: 'E-mail', error: 'Formato inválido' }, { field: 'Data de Admissão', error: 'Data futura' }, { field: 'Cargo', error: 'Campo vazio' }, { field: 'Departamento', error: 'Valor não encontrado' }, { field: 'Gestor', error: 'Referência inválida' } ]; const randomError = errors[Math.floor(Math.random() * errors.length)]; const row = Math.floor(Math.random() * employeeCount) + 1; const tr = document.createElement('tr'); tr.innerHTML = ` <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">${row}</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">${randomError.field}</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">${randomError.error}</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">${Math.random() > 0.5 ? 'N/A' : 'Valor inválido'}</td> `; errorDetails.appendChild(tr); } } else { const tr = document.createElement('tr'); tr.innerHTML = ` <td colspan="4" class="px-6 py-4 text-center text-sm text-gray-500">Nenhum erro encontrado</td> `; errorDetails.appendChild(tr); } validationResults.classList.remove('hidden'); showNotification('Arquivo processado com sucesso!', 'success'); } cancelImport.addEventListener('click', function() { validationResults.classList.add('hidden'); showNotification('Importação cancelada.', 'info'); }); confirmImport.addEventListener('click', function() { validationResults.classList.add('hidden'); showNotification('Dados importados com sucesso!', 'success'); }); // Notification System function showNotification(message, type) { const notification = document.createElement('div'); notification.className = `notification p-4 rounded-lg shadow-lg flex items-start max-w-xs ${getNotificationClass(type)}`; const icon = document.createElement('i'); icon.className = `mr-3 mt-0.5 ${getNotificationIcon(type)}`; const messageDiv = document.createElement('div'); messageDiv.className = 'flex-1'; messageDiv.textContent = message; const closeBtn = document.createElement('button'); closeBtn.className = 'ml-2 text-gray-500 hover:text-gray-700'; closeBtn.innerHTML = '<i class="fas fa-times"></i>'; closeBtn.addEventListener('click', () => { notification.remove(); }); notification.appendChild(icon); notification.appendChild(messageDiv); notification.appendChild(closeBtn); notificationContainer.appendChild(notification); // Auto-remove after 5 seconds setTimeout(() => { notification.remove(); }, 5000); } function getNotificationClass(type) { const classes = { 'success': 'bg-green-100 text-green-800', 'error': 'bg-red-100 text-red-800', 'info': 'bg-blue-100 text-blue-800', 'warning': 'bg-yellow-100 text-yellow-800' }; return classes[type] || classes['info']; } function getNotificationIcon(type) { const icons = { 'success': 'fas fa-check-circle text-green-500', 'error': 'fas fa-exclamation-circle text-red-500', 'info': 'fas fa-info-circle text-blue-500', 'warning': 'fas fa-exclamation-triangle text-yellow-500' }; return icons[type] || icons['info']; } // Initialize Charts function initCharts() { // Imports Chart const importsCtx = document.getElementById('imports-chart').getContext('2d'); new Chart(importsCtx, { type: 'line', data: { labels: ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun'], datasets: [{ label: 'Importações', data: [12, 19, 8, 15, 22, 18], backgroundColor: 'rgba(59, 130, 246, 0.1)', borderColor: 'rgba(59, 130, 246, 1)', borderWidth: 2, tension: 0.4, fill: true }] }, options: { responsive: true, maintainAspectRatio: false, plugins: { legend: { display: false } }, scales: { y: { beginAtZero: true } } } }); // Employees Chart const employeesCtx = document.getElementById('employees-chart').getContext('2d'); new Chart(employeesCtx, { type: 'bar', data: { labels: ['Ativos', 'Novos', 'Demitidos', 'Férias', 'Licença'], datasets: [{ label: 'Funcionários', data: [1245, 42, 18, 32, 9], backgroundColor: [ 'rgba(99, 102, 241, 0.7)', 'rgba(16, 185, 129, 0.7)', 'rgba(239, 68, 68, 0.7)', 'rgba(245, 158, 11, 0.7)', 'rgba(59, 130, 246, 0.7)' ], borderColor: [ 'rgba(99, 102, 241, 1)', 'rgba(16, 185, 129, 1)', 'rgba(239, 68, 68, 1)', 'rgba(245, 158, 11, 1)', 'rgba(59, 130, 246, 1)' ], borderWidth: 1 }] }, options: { responsive: true, maintainAspectRatio: false, plugins: { legend: { display: false } }, scales: { y: { beginAtZero: true } } } }); } // Initialize app with Import section active if (appContainer.classList.contains('hidden') === false) { setActiveNav(navImport); initCharts(); } // Copy script buttons for AI agents document.querySelectorAll('.code-block + button').forEach(button => { button.addEventListener('click', function() { const codeBlock = this.previousElementSibling; const code = codeBlock.querySelector('pre').textContent; navigator.clipboard.writeText(code) .then(() => { showNotification('Script copiado para a área de transferência!', 'success'); }) .catch(err => { showNotification('Falha ao copiar o script.', 'error'); console.error('Failed to copy: ', err); }); }); }); </script> <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=diego1carmo/efficiente-admin" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> </html>
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Efficient Data Integration</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
.gradient-bg {
background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
}
.sidebar {
transition: all 0.3s ease;
}
.sidebar-collapsed {
width: 70px;
}
.sidebar-collapsed .nav-text {
display: none;
}
.sidebar-collapsed .logo-text {
display: none;
}
.sidebar-collapsed .nav-item {
justify-content: center;
}
.file-drop-area {
border: 2px dashed #cbd5e0;
transition: all 0.3s ease;
}
.file-drop-area.active {
border-color: #3b82f6;
background-color: #f0f7ff;
}
.chart-container {
height: 300px;
}
.notification {
animation: slideIn 0.5s forwards;
}
@keyframes slideIn {
from { transform: translateX(100%); opacity: 0; }
to { transform: translateX(0); opacity: 1; }
}
.progress-bar {
transition: width 0.3s ease;
}
.toggle-checkbox:checked {
right: 0;
border-color: #3b82f6;
}
.toggle-checkbox:checked + .toggle-label {
background-color: #3b82f6;
}
.code-block {
font-family: 'Courier New', Courier, monospace;
background-color: #1e293b;
color: #f8fafc;
padding: 1rem;
border-radius: 0.5rem;
overflow-x: auto;
}
.company-selector {
appearance: none;
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
background-position: right 0.5rem center;
background-repeat: no-repeat;
background-size: 1.5em 1.5em;
padding-right: 2.5rem;
}
</style>
</head>
<body class="bg-gray-50 font-sans">
<!-- Login Screen (Initial View) -->
<div id="login-screen" class="min-h-screen flex items-center justify-center gradient-bg p-4">
<div class="bg-white rounded-xl shadow-2xl p-8 w-full max-w-md">
<div class="text-center mb-8">
<h1 class="text-3xl font-bold text-gray-800">Efficient</h1>
<p class="text-gray-600 mt-2">Faça login para acessar o painel de administração</p>
</div>
<form id="login-form" class="space-y-6">
<div>
<label for="email" class="block text-sm font-medium text-gray-700 mb-1">E-mail</label>
<input type="email" id="email" required class="w-full px-4 py-3 rounded-lg border border-gray-300 focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition">
</div>
<div>
<label for="password" class="block text-sm font-medium text-gray-700 mb-1">Senha</label>
<input type="password" id="password" required class="w-full px-4 py-3 rounded-lg border border-gray-300 focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition">
</div>
<div class="flex items-center justify-between">
<div class="flex items-center">
<input type="checkbox" id="remember" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
<label for="remember" class="ml-2 block text-sm text-gray-700">Lembrar-me</label>
</div>
<a href="#" class="text-sm text-blue-600 hover:text-blue-800">Esqueceu a senha?</a>
</div>
<button type="submit" class="w-full gradient-bg text-white py-3 px-4 rounded-lg font-medium hover:opacity-90 transition flex items-center justify-center">
<i class="fas fa-sign-in-alt mr-2"></i> Entrar
</button>