Spaces:
Running

aaaaaa22222 / index.html
moosee's picture
Add 3 files
b6d5fcb verified
Raw History Blame Contribute Delete
43.5 kB
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Gestão de Clientes - Cooperativa Agrícola</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">
<script>
tailwind.config = {
theme: {
extend: {
colors: {
primary: '#2e7d32',
secondary: '#388e3c',
light: '#f5f5f5',
dark: '#1b5e20',
}
}
}
}
</script>
<style>
.sidebar {
transition: all 0.3s ease;
}
.sidebar.collapsed {
width: 70px;
}
.sidebar.collapsed .sidebar-text {
display: none;
}
.sidebar.collapsed .logo-text {
display: none;
}
.sidebar.collapsed .nav-item {
justify-content: center;
}
@media (max-width: 768px) {
.sidebar {
position: absolute;
z-index: 100;
left: -250px;
}
.sidebar.open {
left: 0;
}
.main-content {
margin-left: 0 !important;
}
}
.chart-container {
position: relative;
height: 300px;
}
/* Centralizando o conteúdo */
.centered-container {
max-width: 1400px;
margin: 0 auto;
width: 100%;
padding: 0 1rem;
}
</style>
</head>
<body class="bg-gray-100 font-sans">
<div class="flex h-screen overflow-hidden">
<!-- Sidebar -->
<div class="sidebar bg-primary text-white w-64 flex-shrink-0 flex-col hidden md:flex">
<div class="flex items-center justify-between p-4 border-b border-green-700">
<div class="flex items-center">
<i class="fas fa-leaf text-2xl mr-2"></i>
<span class="logo-text text-xl font-bold">AgroCoop</span>
</div>
<button id="toggleSidebar" class="text-white focus:outline-none">
<i class="fas fa-bars"></i>
</button>
</div>
<div class="flex-grow p-4 overflow-y-auto">
<nav>
<ul class="space-y-2">
<li>
<a href="#" class="nav-item flex items-center p-2 rounded hover:bg-secondary">
<i class="fas fa-tachometer-alt mr-3"></i>
<span class="sidebar-text">Dashboard</span>
</a>
</li>
<li>
<a href="#" class="nav-item flex items-center p-2 rounded bg-secondary">
<i class="fas fa-users mr-3"></i>
<span class="sidebar-text">Clientes</span>
</a>
</li>
<li>
<a href="#" class="nav-item flex items-center p-2 rounded hover:bg-secondary">
<i class="fas fa-tractor mr-3"></i>
<span class="sidebar-text">Produtores</span>
</a>
</li>
<li>
<a href="#" class="nav-item flex items-center p-2 rounded hover:bg-secondary">
<i class="fas fa-shopping-basket mr-3"></i>
<span class="sidebar-text">Produtos</span>
</a>
</li>
<li>
<a href="#" class="nav-item flex items-center p-2 rounded hover:bg-secondary">
<i class="fas fa-file-invoice-dollar mr-3"></i>
<span class="sidebar-text">Financeiro</span>
</a>
</li>
<li>
<a href="#" class="nav-item flex items-center p-2 rounded hover:bg-secondary">
<i class="fas fa-chart-line mr-3"></i>
<span class="sidebar-text">Relatórios</span>
</a>
</li>
<li>
<a href="#" class="nav-item flex items-center p-2 rounded hover:bg-secondary">
<i class="fas fa-cog mr-3"></i>
<span class="sidebar-text">Configurações</span>
</a>
</li>
</ul>
</nav>
</div>
<div class="p-4 border-t border-green-700">
<div class="flex items-center">
<img src="https://randomuser.me/api/portraits/men/32.jpg" alt="User" class="w-8 h-8 rounded-full mr-2">
<div class="sidebar-text">
<p class="text-sm font-medium">João Silva</p>
<p class="text-xs text-green-200">Administrador</p>
</div>
</div>
</div>
</div>
<!-- Main Content -->
<div class="main-content flex-1 flex flex-col overflow-hidden md:ml-64">
<!-- Top Navigation -->
<header class="bg-white shadow-sm">
<div class="centered-container">
<div class="flex items-center justify-between p-4">
<div class="flex items-center md:hidden">
<button id="mobileMenuButton" class="text-gray-600 focus:outline-none">
<i class="fas fa-bars text-xl"></i>
</button>
<span class="ml-2 font-bold text-primary">AgroCoop</span>
</div>
<div class="flex items-center space-x-4">
<div class="relative">
<input type="text" placeholder="Buscar..." class="pl-8 pr-4 py-2 rounded-full border border-gray-300 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent">
<i class="fas fa-search absolute left-3 top-3 text-gray-400"></i>
</div>
<button class="text-gray-600 hover:text-primary">
<i class="fas fa-bell text-xl"></i>
</button>
</div>
</div>
</div>
</header>
<!-- Main Content Area -->
<main class="flex-1 overflow-y-auto">
<div class="centered-container py-4">
<!-- Page Header -->
<div class="flex flex-col md:flex-row justify-between items-start md:items-center mb-6">
<div>
<h1 class="text-2xl font-bold text-gray-800">Gestão de Clientes</h1>
<p class="text-gray-600">Gerencie os clientes da cooperativa agrícola</p>
</div>
<div class="mt-4 md:mt-0">
<button class="bg-primary hover:bg-dark text-white px-4 py-2 rounded-md flex items-center">
<i class="fas fa-plus mr-2"></i>
Novo Cliente
</button>
</div>
</div>
<!-- Indicators -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-6">
<div class="bg-white rounded-lg shadow p-4 border-l-4 border-primary">
<div class="flex justify-between items-center">
<div>
<p class="text-gray-500 text-sm">Total de Clientes</p>
<h3 class="text-2xl font-bold text-gray-800">1,248</h3>
</div>
<div class="bg-green-100 p-3 rounded-full">
<i class="fas fa-users text-primary text-xl"></i>
</div>
</div>
<p class="text-green-600 text-sm mt-2">
<i class="fas fa-arrow-up mr-1"></i> 12% desde o último mês
</p>
</div>
<div class="bg-white rounded-lg shadow p-4 border-l-4 border-blue-500">
<div class="flex justify-between items-center">
<div>
<p class="text-gray-500 text-sm">Clientes Ativos</p>
<h3 class="text-2xl font-bold text-gray-800">856</h3>
</div>
<div class="bg-blue-100 p-3 rounded-full">
<i class="fas fa-user-check text-blue-500 text-xl"></i>
</div>
</div>
<p class="text-green-600 text-sm mt-2">
<i class="fas fa-arrow-up mr-1"></i> 8% desde o último mês
</p>
</div>
<div class="bg-white rounded-lg shadow p-4 border-l-4 border-yellow-500">
<div class="flex justify-between items-center">
<div>
<p class="text-gray-500 text-sm">Clientes Inativos</p>
<h3 class="text-2xl font-bold text-gray-800">392</h3>
</div>
<div class="bg-yellow-100 p-3 rounded-full">
<i class="fas fa-user-slash text-yellow-500 text-xl"></i>
</div>
</div>
<p class="text-red-600 text-sm mt-2">
<i class="fas fa-arrow-down mr-1"></i> 4% desde o último mês
</p>
</div>
<div class="bg-white rounded-lg shadow p-4 border-l-4 border-purple-500">
<div class="flex justify-between items-center">
<div>
<p class="text-gray-500 text-sm">Novos (30 dias)</p>
<h3 class="text-2xl font-bold text-gray-800">64</h3>
</div>
<div class="bg-purple-100 p-3 rounded-full">
<i class="fas fa-user-plus text-purple-500 text-xl"></i>
</div>
</div>
<p class="text-green-600 text-sm mt-2">
<i class="fas fa-arrow-up mr-1"></i> 22% desde o último mês
</p>
</div>
</div>
<!-- Charts -->
<div class="grid grid-cols-1 lg:grid-cols-2 gap-4 mb-6">
<div class="bg-white rounded-lg shadow p-4">
<div class="flex justify-between items-center mb-4">
<h3 class="font-semibold text-gray-800">Crescimento de Clientes</h3>
<select class="border border-gray-300 rounded-md px-2 py-1 text-sm focus:outline-none focus:ring-2 focus:ring-primary">
<option>Últimos 6 meses</option>
<option>Últimos 12 meses</option>
<option>Este ano</option>
</select>
</div>
<div class="chart-container">
<canvas id="growthChart"></canvas>
</div>
</div>
<div class="bg-white rounded-lg shadow p-4">
<div class="flex justify-between items-center mb-4">
<h3 class="font-semibold text-gray-800">Distribuição por Região</h3>
<select class="border border-gray-300 rounded-md px-2 py-1 text-sm focus:outline-none focus:ring-2 focus:ring-primary">
<option>Todas as regiões</option>
<option>Norte</option>
<option>Sul</option>
<option>Leste</option>
<option>Oeste</option>
</select>
</div>
<div class="chart-container">
<canvas id="regionChart"></canvas>
</div>
</div>
</div>
<!-- Clients Table -->
<div class="bg-white rounded-lg shadow overflow-hidden mb-6">
<div class="flex flex-col md:flex-row justify-between items-start md:items-center p-4 border-b">
<div class="mb-4 md:mb-0">
<h3 class="font-semibold text-gray-800">Lista de Clientes</h3>
<p class="text-sm text-gray-600">Todos os clientes cadastrados na cooperativa</p>
</div>
<div class="flex space-x-2">
<div class="relative">
<input type="text" placeholder="Filtrar..." class="pl-8 pr-4 py-2 rounded-md border border-gray-300 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent">
<i class="fas fa-filter absolute left-3 top-3 text-gray-400"></i>
</div>
<button class="bg-gray-100 hover:bg-gray-200 text-gray-700 px-3 py-2 rounded-md">
<i class="fas fa-download"></i>
</button>
</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">
Nome
</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
CPF/CNPJ
</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">
Região
</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
Status
</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
Ações
</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<tr>
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10">
<img class="h-10 w-10 rounded-full" src="https://randomuser.me/api/portraits/men/1.jpg" alt="">
</div>
<div class="ml-4">
<div class="text-sm font-medium text-gray-900">João da Silva</div>
<div class="text-sm text-gray-500">joao@email.com</div>
</div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm text-gray-900">123.456.789-09</div>
</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">
Produtor
</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
Sul
</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">
Ativo
</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<button class="text-primary hover:text-dark mr-3"><i class="fas fa-edit"></i></button>
<button class="text-red-600 hover:text-red-800"><i class="fas fa-trash-alt"></i></button>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10">
<img class="h-10 w-10 rounded-full" src="https://randomuser.me/api/portraits/women/2.jpg" alt="">
</div>
<div class="ml-4">
<div class="text-sm font-medium text-gray-900">Maria Oliveira</div>
<div class="text-sm text-gray-500">maria@email.com</div>
</div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm text-gray-900">987.654.321-00</div>
</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">
Comprador
</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
Norte
</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">
Ativo
</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<button class="text-primary hover:text-dark mr-3"><i class="fas fa-edit"></i></button>
<button class="text-red-600 hover:text-red-800"><i class="fas fa-trash-alt"></i></button>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10">
<img class="h-10 w-10 rounded-full" src="https://randomuser.me/api/portraits/men/3.jpg" alt="">
</div>
<div class="ml-4">
<div class="text-sm font-medium text-gray-900">Fazenda Boa Vista</div>
<div class="text-sm text-gray-500">contato@boavista.com</div>
</div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm text-gray-900">12.345.678/0001-99</div>
</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">
Produtor
</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
Oeste
</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">
Pendente
</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<button class="text-primary hover:text-dark mr-3"><i class="fas fa-edit"></i></button>
<button class="text-red-600 hover:text-red-800"><i class="fas fa-trash-alt"></i></button>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10">
<img class="h-10 w-10 rounded-full" src="https://randomuser.me/api/portraits/women/4.jpg" alt="">
</div>
<div class="ml-4">
<div class="text-sm font-medium text-gray-900">Ana Souza</div>
<div class="text-sm text-gray-500">ana@email.com</div>
</div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm text-gray-900">456.789.123-45</div>
</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">
Comprador
</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
Leste
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">
Inativo
</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<button class="text-primary hover:text-dark mr-3"><i class="fas fa-edit"></i></button>
<button class="text-red-600 hover:text-red-800"><i class="fas fa-trash-alt"></i></button>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10">
<img class="h-10 w-10 rounded-full" src="https://randomuser.me/api/portraits/men/5.jpg" alt="">
</div>
<div class="ml-4">
<div class="text-sm font-medium text-gray-900">Carlos Mendes</div>
<div class="text-sm text-gray-500">carlos@email.com</div>
</div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm text-gray-900">789.123.456-78</div>
</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">
Produtor
</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
Sul
</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">
Ativo
</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<button class="text-primary hover:text-dark mr-3"><i class="fas fa-edit"></i></button>
<button class="text-red-600 hover:text-red-800"><i class="fas fa-trash-alt"></i></button>
</td>
</tr>
</tbody>
</table>
</div>
<div class="bg-gray-50 px-4 py-3 flex items-center justify-between border-t border-gray-200 sm:px-6">
<div class="flex-1 flex justify-between sm:hidden">
<a href="#" class="relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50">
Anterior
</a>
<a href="#" class="ml-3 relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50">
Próximo
</a>
</div>
<div class="hidden sm:flex-1 sm:flex sm:items-center sm:justify-between">
<div>
<p class="text-sm text-gray-700">
Mostrando
<span class="font-medium">1</span>
a
<span class="font-medium">5</span>
de
<span class="font-medium">1248</span>
resultados
</p>
</div>
<div>
<nav class="relative z-0 inline-flex rounded-md shadow-sm -space-x-px" aria-label="Pagination">
<a href="#" class="relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50">
<span class="sr-only">Anterior</span>
<i class="fas fa-chevron-left"></i>
</a>
<a href="#" aria-current="page" class="z-10 bg-primary border-primary text-white relative inline-flex items-center px-4 py-2 border text-sm font-medium">
1
</a>
<a href="#" class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium">
2
</a>
<a href="#" class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium">
3
</a>
<span class="relative inline-flex items-center px-4 py-2 border border-gray-300 bg-white text-sm font-medium text-gray-700">
...
</span>
<a href="#" class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium">
8
</a>
<a href="#" class="relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50">
<span class="sr-only">Próximo</span>
<i class="fas fa-chevron-right"></i>
</a>
</nav>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
</div>
<!-- Modal (hidden by default) -->
<div id="clientModal" class="fixed inset-0 overflow-y-auto hidden z-50">
<div class="flex items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
<div class="fixed inset-0 transition-opacity" aria-hidden="true">
<div class="absolute inset-0 bg-gray-500 opacity-75"></div>
</div>
<span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">&#8203;</span>
<div class="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full">
<div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4">
<div class="flex justify-between items-start">
<h3 class="text-lg leading-6 font-medium text-gray-900">Novo Cliente</h3>
<button id="closeModal" class="text-gray-400 hover:text-gray-500">
<i class="fas fa-times"></i>
</button>
</div>
<div class="mt-4">
<form>
<div class="grid grid-cols-1 gap-y-4">
<div>
<label for="name" class="block text-sm font-medium text-gray-700">Nome Completo</label>
<input type="text" id="name" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-primary focus:border-primary">
</div>
<div>
<label for="document" class="block text-sm font-medium text-gray-700">CPF/CNPJ</label>
<input type="text" id="document" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-primary focus:border-primary">
</div>
<div>
<label for="type" class="block text-sm font-medium text-gray-700">Tipo de Cliente</label>
<select id="type" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-primary focus:border-primary">
<option>Produtor</option>
<option>Comprador</option>
<option>Ambos</option>
</select>
</div>
<div>
<label for="region" class="block text-sm font-medium text-gray-700">Região</label>
<select id="region" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-primary focus:border-primary">
<option>Norte</option>
<option>Sul</option>
<option>Leste</option>
<option>Oeste</option>
</select>
</div>
<div>
<label for="email" class="block text-sm font-medium text-gray-700">Email</label>
<input type="email" id="email" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-primary focus:border-primary">
</div>
<div>
<label for="phone" class="block text-sm font-medium text-gray-700">Telefone</label>
<input type="tel" id="phone" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-primary focus:border-primary">
</div>
</div>
</form>
</div>
</div>
<div class="bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse">
<button type="button" class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-primary text-base font-medium text-white hover:bg-dark focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary sm:ml-3 sm:w-auto sm:text-sm">
Salvar
</button>
<button id="cancelModal" type="button" class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm">
Cancelar
</button>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script>
// Sidebar toggle
const toggleSidebar = document.getElementById('toggleSidebar');
const sidebar = document.querySelector('.sidebar');
const mobileMenuButton = document.getElementById('mobileMenuButton');
toggleSidebar.addEventListener('click', () => {
sidebar.classList.toggle('collapsed');
});
mobileMenuButton.addEventListener('click', () => {
sidebar.classList.toggle('open');
});
// Modal functionality
const newClientBtn = document.querySelector('button.bg-primary');
const modal = document.getElementById('clientModal');
const closeModal = document.getElementById('closeModal');
const cancelModal = document.getElementById('cancelModal');
newClientBtn.addEventListener('click', () => {
modal.classList.remove('hidden');
});
closeModal.addEventListener('click', () => {
modal.classList.add('hidden');
});
cancelModal.addEventListener('click', () => {
modal.classList.add('hidden');
});
// Charts
// Growth Chart
const growthCtx = document.getElementById('growthChart').getContext('2d');
const growthChart = new Chart(growthCtx, {
type: 'line',
data: {
labels: ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun'],
datasets: [{
label: 'Novos Clientes',
data: [12, 19, 15, 23, 28, 35],
backgroundColor: 'rgba(46, 125, 50, 0.2)',
borderColor: 'rgba(46, 125, 50, 1)',
borderWidth: 2,
tension: 0.3,
fill: true
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: {
display: false
}
},
scales: {
y: {
beginAtZero: true
}
}
}
});
// Region Chart
const regionCtx = document.getElementById('regionChart').getContext('2d');
const regionChart = new Chart(regionCtx, {
type: 'doughnut',
data: {
labels: ['Norte', 'Sul', 'Leste', 'Oeste'],
datasets: [{
data: [25, 35, 20, 20],
backgroundColor: [
'rgba(46, 125, 50, 0.8)',
'rgba(56, 142, 60, 0.8)',
'rgba(76, 175, 80, 0.8)',
'rgba(102, 187, 106, 0.8)'
],
borderColor: [
'rgba(46, 125, 50, 1)',
'rgba(56, 142, 60, 1)',
'rgba(76, 175, 80, 1)',
'rgba(102, 187, 106, 1)'
],
borderWidth: 1
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: {
position: 'right'
}
}
}
});
</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=moosee/aaaaaa22222" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>