Spaces:
Running
Running
| <html lang="pt-br"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Modern Dashboard</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"> | |
| <link rel="stylesheet" href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.css"> | |
| <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> | |
| <script src="https://code.jquery.com/jquery-3.7.0.min.js"></script> | |
| <script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></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 .menu-item { | |
| justify-content: center; | |
| } | |
| .main-content { | |
| transition: all 0.3s ease; | |
| } | |
| .main-content.expanded { | |
| margin-left: 70px; | |
| } | |
| .notification-dropdown { | |
| max-height: 400px; | |
| overflow-y: auto; | |
| } | |
| .card-gradient-1 { | |
| background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); | |
| } | |
| .card-gradient-2 { | |
| background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); | |
| } | |
| .card-gradient-3 { | |
| background: linear-gradient(135deg, #5ee7df 0%, #b490ca 100%); | |
| } | |
| .card-gradient-4 { | |
| background: linear-gradient(135deg, #d299c2 0%, #fef9d7 100%); | |
| } | |
| .chart-container { | |
| position: relative; | |
| height: 300px; | |
| } | |
| /* Dark Mode Styles */ | |
| .dark .sidebar { | |
| background-color: #1e293b; | |
| border-color: #334155; | |
| } | |
| .dark .sidebar .menu-item:hover { | |
| background-color: #334155; | |
| } | |
| .dark .sidebar .text-indigo-300 { | |
| color: #94a3b8; | |
| } | |
| .dark header { | |
| background-color: #1e293b; | |
| border-color: #334155; | |
| } | |
| .dark header h1 { | |
| color: #f8fafc; | |
| } | |
| .dark .bg-white { | |
| background-color: #1e293b ; | |
| border-color: #334155; | |
| } | |
| .dark .text-gray-800 { | |
| color: #f8fafc ; | |
| } | |
| .dark .text-gray-500 { | |
| color: #94a3b8 ; | |
| } | |
| .dark .text-gray-700 { | |
| color: #e2e8f0 ; | |
| } | |
| .dark .text-gray-900 { | |
| color: #f8fafc ; | |
| } | |
| .dark .bg-gray-50 { | |
| background-color: #334155 ; | |
| } | |
| .dark .bg-gray-100 { | |
| background-color: #334155 ; | |
| } | |
| .dark .divide-gray-200 { | |
| border-color: #334155 ; | |
| } | |
| .dark .hover\:bg-gray-50:hover { | |
| background-color: #334155 ; | |
| } | |
| .dark .bg-indigo-100 { | |
| background-color: #334155 ; | |
| } | |
| .dark .dataTables_wrapper .dataTables_filter input { | |
| background-color: #334155; | |
| color: #f8fafc; | |
| border-color: #475569; | |
| } | |
| .dark .dataTables_wrapper .dataTables_length select { | |
| background-color: #334155; | |
| color: #f8fafc; | |
| border-color: #475569; | |
| } | |
| .dark .dataTables_wrapper .dataTables_info { | |
| color: #94a3b8 ; | |
| } | |
| .dark .dataTables_wrapper .paginate_button { | |
| color: #e2e8f0 ; | |
| } | |
| .dark .dataTables_wrapper .paginate_button.current { | |
| background-color: #475569 ; | |
| border-color: #475569 ; | |
| } | |
| .dark .dataTables_wrapper .paginate_button:hover { | |
| background-color: #475569 ; | |
| border-color: #475569 ; | |
| } | |
| .dark .dataTables_wrapper .dataTables_paginate .paginate_button.disabled { | |
| color: #64748b ; | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-100 dark:bg-slate-900"> | |
| <div class="flex h-screen overflow-hidden"> | |
| <!-- Sidebar --> | |
| <div class="sidebar bg-indigo-800 dark:bg-slate-800 text-white w-64 flex-shrink-0 flex flex-col"> | |
| <div class="p-4 flex items-center justify-between border-b border-indigo-700 dark:border-slate-700"> | |
| <div class="flex items-center"> | |
| <i class="fas fa-chart-line text-2xl mr-3"></i> | |
| <span class="logo-text text-xl font-bold">DashboardPro</span> | |
| </div> | |
| <button id="toggleSidebar" class="text-white focus:outline-none"> | |
| <i class="fas fa-bars"></i> | |
| </button> | |
| </div> | |
| <div class="p-4 flex-1 overflow-y-auto"> | |
| <div class="mb-8"> | |
| <p class="sidebar-text text-indigo-300 dark:text-slate-400 uppercase text-xs font-semibold mb-4">Menu Principal</p> | |
| <ul> | |
| <li class="mb-2"> | |
| <a href="#" class="menu-item flex items-center p-2 rounded hover:bg-indigo-700 dark:hover:bg-slate-700"> | |
| <i class="fas fa-home mr-3"></i> | |
| <span class="sidebar-text">Dashboard</span> | |
| </a> | |
| </li> | |
| <li class="mb-2"> | |
| <a href="#" class="menu-item flex items-center p-2 rounded hover:bg-indigo-700 dark:hover:bg-slate-700"> | |
| <i class="fas fa-chart-bar mr-3"></i> | |
| <span class="sidebar-text">Relatórios</span> | |
| </a> | |
| </li> | |
| <li class="mb-2"> | |
| <a href="#" class="menu-item flex items-center p-2 rounded hover:bg-indigo-700 dark:hover:bg-slate-700"> | |
| <i class="fas fa-shopping-cart mr-3"></i> | |
| <span class="sidebar-text">Vendas</span> | |
| </a> | |
| </li> | |
| <li class="mb-2"> | |
| <a href="#" class="menu-item flex items-center p-2 rounded hover:bg-indigo-700 dark:hover:bg-slate-700"> | |
| <i class="fas fa-users mr-3"></i> | |
| <span class="sidebar-text">Clientes</span> | |
| </a> | |
| </li> | |
| <li class="mb-2"> | |
| <a href="#" class="menu-item flex items-center p-2 rounded hover:bg-indigo-700 dark:hover:bg-slate-700"> | |
| <i class="fas fa-cog mr-3"></i> | |
| <span class="sidebar-text">Configurações</span> | |
| </a> | |
| </li> | |
| </ul> | |
| </div> | |
| <div> | |
| <p class="sidebar-text text-indigo-300 dark:text-slate-400 uppercase text-xs font-semibold mb-4">Suporte</p> | |
| <ul> | |
| <li class="mb-2"> | |
| <a href="#" class="menu-item flex items-center p-2 rounded hover:bg-indigo-700 dark:hover:bg-slate-700"> | |
| <i class="fas fa-question-circle mr-3"></i> | |
| <span class="sidebar-text">Ajuda</span> | |
| </a> | |
| </li> | |
| <li class="mb-2"> | |
| <a href="#" class="menu-item flex items-center p-2 rounded hover:bg-indigo-700 dark:hover:bg-slate-700"> | |
| <i class="fas fa-envelope mr-3"></i> | |
| <span class="sidebar-text">Contato</span> | |
| </a> | |
| </li> | |
| </ul> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Main Content --> | |
| <div class="main-content flex-1 flex flex-col overflow-hidden"> | |
| <!-- Navbar --> | |
| <header class="bg-white dark:bg-slate-800 shadow-sm"> | |
| <div class="px-6 py-4 flex items-center justify-between"> | |
| <div class="flex items-center"> | |
| <button id="mobileMenuButton" class="md:hidden text-gray-500 dark:text-slate-400 focus:outline-none mr-4"> | |
| <i class="fas fa-bars text-xl"></i> | |
| </button> | |
| <h1 class="text-xl font-semibold text-gray-800 dark:text-white">Dashboard</h1> | |
| </div> | |
| <div class="flex items-center space-x-4"> | |
| <button id="darkModeToggle" class="text-gray-500 dark:text-slate-400 hover:text-gray-700 dark:hover:text-white focus:outline-none"> | |
| <i id="darkModeIcon" class="fas fa-moon text-xl"></i> | |
| </button> | |
| <div class="relative"> | |
| <button id="notificationButton" class="text-gray-500 dark:text-slate-400 hover:text-gray-700 dark:hover:text-white focus:outline-none relative"> | |
| <i class="fas fa-bell text-xl"></i> | |
| <span class="absolute -top-1 -right-1 bg-red-500 text-white text-xs rounded-full h-5 w-5 flex items-center justify-center">6</span> | |
| </button> | |
| <div id="notificationDropdown" class="hidden absolute right-0 mt-2 w-80 bg-white dark:bg-slate-800 rounded-md shadow-lg z-10 notification-dropdown"> | |
| <div class="p-4 border-b dark:border-slate-700"> | |
| <h3 class="font-semibold text-gray-800 dark:text-white">Notificações</h3> | |
| </div> | |
| <div class="divide-y divide-gray-100 dark:divide-slate-700"> | |
| <a href="#" class="flex items-center px-4 py-3 hover:bg-gray-50 dark:hover:bg-slate-700"> | |
| <div class="flex-shrink-0 bg-blue-100 dark:bg-slate-600 p-2 rounded-full"> | |
| <i class="fas fa-shopping-cart text-blue-500 dark:text-blue-400"></i> | |
| </div> | |
| <div class="ml-3"> | |
| <p class="text-sm font-medium text-gray-900 dark:text-white">Novo pedido recebido</p> | |
| <p class="text-xs text-gray-500 dark:text-slate-400">2 minutos atrás</p> | |
| </div> | |
| </a> | |
| <a href="#" class="flex items-center px-4 py-3 hover:bg-gray-50 dark:hover:bg-slate-700"> | |
| <div class="flex-shrink-0 bg-green-100 dark:bg-slate-600 p-2 rounded-full"> | |
| <i class="fas fa-user-plus text-green-500 dark:text-green-400"></i> | |
| </div> | |
| <div class="ml-3"> | |
| <p class="text-sm font-medium text-gray-900 dark:text-white">Novo cliente registrado</p> | |
| <p class="text-xs text-gray-500 dark:text-slate-400">1 hora atrás</p> | |
| </div> | |
| </a> | |
| <a href="#" class="flex items-center px-4 py-3 hover:bg-gray-50 dark:hover:bg-slate-700"> | |
| <div class="flex-shrink-0 bg-yellow-100 dark:bg-slate-600 p-2 rounded-full"> | |
| <i class="fas fa-exclamation-triangle text-yellow-500 dark:text-yellow-400"></i> | |
| </div> | |
| <div class="ml-3"> | |
| <p class="text-sm font-medium text-gray-900 dark:text-white">Pagamento atrasado</p> | |
| <p class="text-xs text-gray-500 dark:text-slate-400">3 horas atrás</p> | |
| </div> | |
| </a> | |
| <a href="#" class="flex items-center px-4 py-3 hover:bg-gray-50 dark:hover:bg-slate-700"> | |
| <div class="flex-shrink-0 bg-purple-100 dark:bg-slate-600 p-2 rounded-full"> | |
| <i class="fas fa-check-circle text-purple-500 dark:text-purple-400"></i> | |
| </div> | |
| <div class="ml-3"> | |
| <p class="text-sm font-medium text-gray-900 dark:text-white">Pedido entregue</p> | |
| <p class="text-xs text-gray-500 dark:text-slate-400">Ontem</p> | |
| </div> | |
| </a> | |
| <a href="#" class="flex items-center px-4 py-3 hover:bg-gray-50 dark:hover:bg-slate-700"> | |
| <div class="flex-shrink-0 bg-red-100 dark:bg-slate-600 p-2 rounded-full"> | |
| <i class="fas fa-times-circle text-red-500 dark:text-red-400"></i> | |
| </div> | |
| <div class="ml-3"> | |
| <p class="text-sm font-medium text-gray-900 dark:text-white">Pedido cancelado</p> | |
| <p class="text-xs text-gray-500 dark:text-slate-400">Ontem</p> | |
| </div> | |
| </a> | |
| <a href="#" class="flex items-center px-4 py-3 hover:bg-gray-50 dark:hover:bg-slate-700"> | |
| <div class="flex-shrink-0 bg-indigo-100 dark:bg-slate-600 p-2 rounded-full"> | |
| <i class="fas fa-truck text-indigo-500 dark:text-indigo-400"></i> | |
| </div> | |
| <div class="ml-3"> | |
| <p class="text-sm font-medium text-gray-900 dark:text-white">Pedido em transporte</p> | |
| <p class="text-xs text-gray-500 dark:text-slate-400">2 dias atrás</p> | |
| </div> | |
| </a> | |
| </div> | |
| <div class="p-3 text-center bg-gray-50 dark:bg-slate-700"> | |
| <a href="#" class="text-sm font-medium text-indigo-600 dark:text-indigo-400 hover:text-indigo-500 dark:hover:text-indigo-300">Ver todas as notificações</a> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="relative"> | |
| <button id="userMenuButton" class="flex items-center space-x-2 focus:outline-none"> | |
| <img class="h-8 w-8 rounded-full" src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80" alt="User avatar"> | |
| <span class="hidden md:block text-sm font-medium text-gray-700 dark:text-white">John Doe</span> | |
| </button> | |
| <div id="userDropdown" class="hidden absolute right-0 mt-2 w-48 bg-white dark:bg-slate-800 rounded-md shadow-lg z-10"> | |
| <div class="py-1 border-b dark:border-slate-700"> | |
| <a href="#" class="block px-4 py-2 text-sm text-gray-700 dark:text-white hover:bg-gray-100 dark:hover:bg-slate-700">Perfil</a> | |
| <a href="#" class="block px-4 py-2 text-sm text-gray-700 dark:text-white hover:bg-gray-100 dark:hover:bg-slate-700">Configurações</a> | |
| <a href="#" class="block px-4 py-2 text-sm text-gray-700 dark:text-white hover:bg-gray-100 dark:hover:bg-slate-700">Relatórios</a> | |
| </div> | |
| <div class="py-1 border-b dark:border-slate-700"> | |
| <a href="#" class="block px-4 py-2 text-sm text-gray-700 dark:text-white hover:bg-gray-100 dark:hover:bg-slate-700">Login</a> | |
| <a href="#" class="block px-4 py-2 text-sm text-gray-700 dark:text-white hover:bg-gray-100 dark:hover:bg-slate-700">Registrar</a> | |
| </div> | |
| <div class="py-1"> | |
| <a href="#" class="block px-4 py-2 text-sm text-gray-700 dark:text-white hover:bg-gray-100 dark:hover:bg-slate-700">Sair</a> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </header> | |
| <!-- Main Content Area --> | |
| <main class="flex-1 overflow-y-auto p-6"> | |
| <!-- Cards --> | |
| <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8"> | |
| <div class="card-gradient-1 rounded-lg shadow-md p-6 text-white"> | |
| <div class="flex justify-between items-center"> | |
| <div> | |
| <p class="text-sm font-medium">Orçamento</p> | |
| <h3 class="text-2xl font-bold mt-2">R$ 24,780</h3> | |
| <p class="text-xs mt-2 opacity-80">+12% desde o último mês</p> | |
| </div> | |
| <div class="bg-white bg-opacity-20 p-3 rounded-full"> | |
| <i class="fas fa-wallet text-xl"></i> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="card-gradient-2 rounded-lg shadow-md p-6 text-white"> | |
| <div class="flex justify-between items-center"> | |
| <div> | |
| <p class="text-sm font-medium">Pagos</p> | |
| <h3 class="text-2xl font-bold mt-2">R$ 18,650</h3> | |
| <p class="text-xs mt-2 opacity-80">+8% desde o último mês</p> | |
| </div> | |
| <div class="bg-white bg-opacity-20 p-3 rounded-full"> | |
| <i class="fas fa-check-circle text-xl"></i> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="card-gradient-3 rounded-lg shadow-md p-6 text-white"> | |
| <div class="flex justify-between items-center"> | |
| <div> | |
| <p class="text-sm font-medium">Cancelados</p> | |
| <h3 class="text-2xl font-bold mt-2">R$ 2,340</h3> | |
| <p class="text-xs mt-2 opacity-80">-3% desde o último mês</p> | |
| </div> | |
| <div class="bg-white bg-opacity-20 p-3 rounded-full"> | |
| <i class="fas fa-times-circle text-xl"></i> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="card-gradient-4 rounded-lg shadow-md p-6 text-gray-800"> | |
| <div class="flex justify-between items-center"> | |
| <div> | |
| <p class="text-sm font-medium">Entregues</p> | |
| <h3 class="text-2xl font-bold mt-2">R$ 15,430</h3> | |
| <p class="text-xs mt-2 opacity-80">+15% desde o último mês</p> | |
| </div> | |
| <div class="bg-gray-800 bg-opacity-10 p-3 rounded-full"> | |
| <i class="fas fa-truck text-xl"></i> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Charts --> | |
| <div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8"> | |
| <div class="bg-white dark:bg-slate-800 rounded-lg shadow-md p-6"> | |
| <h2 class="text-lg font-semibold text-gray-800 dark:text-white mb-4">Vendas Mensais</h2> | |
| <div class="chart-container"> | |
| <canvas id="salesChart"></canvas> | |
| </div> | |
| <div class="mt-4 text-sm text-gray-500 dark:text-slate-400"> | |
| <p><span class="inline-block w-3 h-3 rounded-full bg-indigo-500 mr-1"></span> Vendas totais: R$ 46,340</p> | |
| <p><span class="inline-block w-3 h-3 rounded-full bg-indigo-200 mr-1"></span> Meta: R$ 50,000</p> | |
| </div> | |
| </div> | |
| <div class="bg-white dark:bg-slate-800 rounded-lg shadow-md p-6"> | |
| <h2 class="text-lg font-semibold text-gray-800 dark:text-white mb-4">Distribuição de Vendas</h2> | |
| <div class="chart-container"> | |
| <canvas id="distributionChart"></canvas> | |
| </div> | |
| <div class="mt-4 grid grid-cols-2 gap-4 text-sm text-gray-500 dark:text-slate-400"> | |
| <div><span class="inline-block w-3 h-3 rounded-full bg-indigo-500 mr-1"></span> Eletrônicos: 35%</div> | |
| <div><span class="inline-block w-3 h-3 rounded-full bg-red-500 mr-1"></span> Roupas: 25%</div> | |
| <div><span class="inline-block w-3 h-3 rounded-full bg-green-500 mr-1"></span> Alimentos: 20%</div> | |
| <div><span class="inline-block w-3 h-3 rounded-full bg-yellow-500 mr-1"></span> Livros: 10%</div> | |
| <div><span class="inline-block w-3 h-3 rounded-full bg-gray-500 mr-1"></span> Outros: 10%</div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Recent Orders --> | |
| <div class="bg-white dark:bg-slate-800 rounded-lg shadow-md p-6"> | |
| <div class="flex justify-between items-center mb-6"> | |
| <h2 class="text-lg font-semibold text-gray-800 dark:text-white">Pedidos Recentes</h2> | |
| <button class="text-sm text-indigo-600 dark:text-indigo-400 hover:text-indigo-500 dark:hover:text-indigo-300">Ver todos</button> | |
| </div> | |
| <div class="overflow-x-auto"> | |
| <table id="ordersTable" class="min-w-full divide-y divide-gray-200 dark:divide-slate-700"> | |
| <thead class="bg-gray-50 dark:bg-slate-700"> | |
| <tr> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-slate-400 uppercase tracking-wider">ID</th> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-slate-400 uppercase tracking-wider">Cliente</th> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-slate-400 uppercase tracking-wider">Data</th> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-slate-400 uppercase tracking-wider">Valor</th> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-slate-400 uppercase tracking-wider">Status</th> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-slate-400 uppercase tracking-wider">Ações</th> | |
| </tr> | |
| </thead> | |
| <tbody class="bg-white dark:bg-slate-800 divide-y divide-gray-200 dark:divide-slate-700"> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900 dark:text-white">#ORD-0001</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-slate-400">Maria Silva</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-slate-400">15/07/2023</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-slate-400">R$ 1,250.00</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 dark:bg-green-900 dark:text-green-200">Entregue</span> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-slate-400"> | |
| <button class="text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-300 mr-3"><i class="fas fa-eye"></i></button> | |
| <button class="text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-300"><i class="fas fa-print"></i></button> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900 dark:text-white">#ORD-0002</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-slate-400">João Santos</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-slate-400">14/07/2023</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-slate-400">R$ 890.00</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 dark:bg-blue-900 dark:text-blue-200">Em transporte</span> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-slate-400"> | |
| <button class="text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-300 mr-3"><i class="fas fa-eye"></i></button> | |
| <button class="text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-300"><i class="fas fa-print"></i></button> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900 dark:text-white">#ORD-0003</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-slate-400">Ana Oliveira</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-slate-400">13/07/2023</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-slate-400">R$ 1,750.00</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 dark:bg-yellow-900 dark:text-yellow-200">Pendente</span> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-slate-400"> | |
| <button class="text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-300 mr-3"><i class="fas fa-eye"></i></button> | |
| <button class="text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-300"><i class="fas fa-print"></i></button> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900 dark:text-white">#ORD-0004</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-slate-400">Carlos Pereira</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-slate-400">12/07/2023</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-slate-400">R$ 2,300.00</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 dark:bg-red-900 dark:text-red-200">Cancelado</span> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-slate-400"> | |
| <button class="text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-300 mr-3"><i class="fas fa-eye"></i></button> | |
| <button class="text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-300"><i class="fas fa-print"></i></button> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900 dark:text-white">#ORD-0005</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-slate-400">Patricia Souza</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-slate-400">11/07/2023</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-slate-400">R$ 1,100.00</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 dark:bg-green-900 dark:text-green-200">Entregue</span> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-slate-400"> | |
| <button class="text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-300 mr-3"><i class="fas fa-eye"></i></button> | |
| <button class="text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-300"><i class="fas fa-print"></i></button> | |
| </td> | |
| </tr> | |
| </tbody> | |
| </table> | |
| </div> | |
| </div> | |
| </main> | |
| </div> | |
| </div> | |
| <script> | |
| // Toggle sidebar | |
| const toggleSidebar = document.getElementById('toggleSidebar'); | |
| const sidebar = document.querySelector('.sidebar'); | |
| const mainContent = document.querySelector('.main-content'); | |
| const mobileMenuButton = document.getElementById('mobileMenuButton'); | |
| toggleSidebar.addEventListener('click', () => { | |
| sidebar.classList.toggle('collapsed'); | |
| mainContent.classList.toggle('expanded'); | |
| }); | |
| mobileMenuButton.addEventListener('click', () => { | |
| sidebar.classList.toggle('collapsed'); | |
| mainContent.classList.toggle('expanded'); | |
| }); | |
| // Toggle notification dropdown | |
| const notificationButton = document.getElementById('notificationButton'); | |
| const notificationDropdown = document.getElementById('notificationDropdown'); | |
| notificationButton.addEventListener('click', () => { | |
| notificationDropdown.classList.toggle('hidden'); | |
| userDropdown.classList.add('hidden'); | |
| }); | |
| // Toggle user dropdown | |
| const userMenuButton = document.getElementById('userMenuButton'); | |
| const userDropdown = document.getElementById('userDropdown'); | |
| userMenuButton.addEventListener('click', () => { | |
| userDropdown.classList.toggle('hidden'); | |
| notificationDropdown.classList.add('hidden'); | |
| }); | |
| // Close dropdowns when clicking outside | |
| document.addEventListener('click', (event) => { | |
| if (!notificationButton.contains(event.target) && !notificationDropdown.contains(event.target)) { | |
| notificationDropdown.classList.add('hidden'); | |
| } | |
| if (!userMenuButton.contains(event.target) && !userDropdown.contains(event.target)) { | |
| userDropdown.classList.add('hidden'); | |
| } | |
| }); | |
| // Dark Mode Toggle | |
| const darkModeToggle = document.getElementById('darkModeToggle'); | |
| const darkModeIcon = document.getElementById('darkModeIcon'); | |
| const html = document.documentElement; | |
| // Check for saved user preference or use OS preference | |
| const userPrefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches; | |
| const savedMode = localStorage.getItem('darkMode'); | |
| if (savedMode === 'dark' || (!savedMode && userPrefersDark)) { | |
| html.classList.add('dark'); | |
| darkModeIcon.classList.replace('fa-moon', 'fa-sun'); | |
| } | |
| darkModeToggle.addEventListener('click', () => { | |
| const isDark = html.classList.contains('dark'); | |
| if (isDark) { | |
| html.classList.remove('dark'); | |
| darkModeIcon.classList.replace('fa-sun', 'fa-moon'); | |
| localStorage.setItem('darkMode', 'light'); | |
| } else { | |
| html.classList.add('dark'); | |
| darkModeIcon.classList.replace('fa-moon', 'fa-sun'); | |
| localStorage.setItem('darkMode', 'dark'); | |
| } | |
| // Update charts when theme changes | |
| salesChart.update(); | |
| distributionChart.update(); | |
| }); | |
| // Initialize DataTable | |
| $(document).ready(function() { | |
| $('#ordersTable').DataTable({ | |
| responsive: true, | |
| "order": [[2, "desc"]], | |
| "language": { | |
| "lengthMenu": "Mostrar _MENU_ registros por página", | |
| "zeroRecords": "Nenhum registro encontrado", | |
| "info": "Mostrando página _PAGE_ de _PAGES_", | |
| "infoEmpty": "Nenhum registro disponível", | |
| "infoFiltered": "(filtrado de _MAX_ registros totais)", | |
| "search": "Pesquisar:", | |
| "paginate": { | |
| "first": "Primeiro", | |
| "last": "Último", | |
| "next": "Próximo", | |
| "previous": "Anterior" | |
| }, | |
| } | |
| }); | |
| }); | |
| // Sales Chart | |
| const salesCtx = document.getElementById('salesChart').getContext('2d'); | |
| const salesChart = new Chart(salesCtx, { | |
| type: 'line', | |
| data: { | |
| labels: ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul'], | |
| datasets: [{ | |
| label: 'Vendas 2023', | |
| data: [6500, 5900, 8000, 8100, 5600, 5500, 7200], | |
| backgroundColor: 'rgba(99, 102, 241, 0.1)', | |
| borderColor: 'rgba(99, 102, 241, 1)', | |
| borderWidth: 2, | |
| tension: 0.3, | |
| fill: true | |
| }, | |
| { | |
| label: 'Meta', | |
| data: [7000, 7000, 7000, 7000, 7000, 7000, 7000], | |
| borderColor: 'rgba(99, 102, 241, 0.3)', | |
| borderWidth: 1, | |
| borderDash: [5, 5], | |
| pointRadius: 0, | |
| fill: false | |
| }] | |
| }, | |
| options: { | |
| responsive: true, | |
| maintainAspectRatio: false, | |
| plugins: { | |
| legend: { | |
| display: false | |
| }, | |
| tooltip: { | |
| callbacks: { | |
| label: function(context) { | |
| return context.dataset.label + ': R$ ' + context.raw.toLocaleString('pt-BR'); | |
| } | |
| } | |
| } | |
| }, | |
| scales: { | |
| y: { | |
| beginAtZero: true, | |
| grid: { | |
| drawBorder: false, | |
| color: function(context) { | |
| if (context.tick.value === 0) { | |
| return '#e2e8f0'; | |
| } | |
| return html.classList.contains('dark') ? 'rgba(255, 255, 255, 0.1)' : 'rgba(0, 0, 0, 0.05)'; | |
| } | |
| }, | |
| ticks: { | |
| color: html.classList.contains('dark') ? '#94a3b8' : '#64748b', | |
| callback: function(value) { | |
| return 'R$ ' + value.toLocaleString('pt-BR'); | |
| } | |
| } | |
| }, | |
| x: { | |
| grid: { | |
| display: false | |
| }, | |
| ticks: { | |
| color: html.classList.contains('dark') ? '#94a3b8' : '#64748b' | |
| } | |
| } | |
| } | |
| } | |
| }); | |
| // Distribution Chart | |
| const distributionCtx = document.getElementById('distributionChart').getContext('2d'); | |
| const distributionChart = new Chart(distributionCtx, { | |
| type: 'doughnut', | |
| data: { | |
| labels: ['Eletrônicos', 'Roupas', 'Alimentos', 'Livros', 'Outros'], | |
| datasets: [{ | |
| data: [35, 25, 20, 10, 10], | |
| backgroundColor: [ | |
| 'rgba(99, 102, 241, 0.8)', | |
| 'rgba(244, 63, 94, 0.8)', | |
| 'rgba(16, 185, 129, 0.8)', | |
| 'rgba(245, 158, 11, 0.8)', | |
| 'rgba(156, 163, 175, 0.8)' | |
| ], | |
| borderWidth: 0 | |
| }] | |
| }, | |
| options: { | |
| responsive: true, | |
| maintainAspectRatio: false, | |
| plugins: { | |
| legend: { | |
| position: 'right', | |
| labels: { | |
| color: html.classList.contains('dark') ? '#e2e8f0' : '#334155' | |
| } | |
| }, | |
| tooltip: { | |
| callbacks: { | |
| label: function(context) { | |
| return context.label + ': ' + context.raw + '%'; | |
| } | |
| } | |
| }, | |
| cutout: '70%' | |
| } | |
| } | |
| }); | |
| // Update charts when dark mode changes | |
| darkModeToggle.addEventListener('click', () => { | |
| salesChart.update(); | |
| distributionChart.update(); | |
| }); | |
| </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=gallabs/dashboard-lucas" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
| </html> |