Spaces:
t
Running

t / index.html
moosee's picture
Adicione um botão na barra lateral com relatórios, e faça a tela de quando clicar nele - Follow Up Deployment
4b3dbcd verified
Raw History Blame Contribute Delete
49.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>EduTrack - Gestão de Alunos</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: '#4F46E5',
secondary: '#10B981',
danger: '#EF4444',
warning: '#F59E0B',
info: '#3B82F6'
}
}
}
}
</script>
<style>
.sidebar {
transition: all 0.3s ease;
}
.chart-container {
position: relative;
height: 300px;
}
@media (max-width: 768px) {
.sidebar {
transform: translateX(-100%);
position: absolute;
z-index: 50;
}
.sidebar.open {
transform: translateX(0);
}
}
</style>
</head>
<body class="bg-gray-50 font-sans">
<div class="flex h-screen overflow-hidden">
<!-- Sidebar -->
<div class="sidebar bg-white w-64 border-r border-gray-200 flex flex-col">
<div class="p-4 border-b border-gray-200">
<h1 class="text-2xl font-bold text-primary flex items-center">
<i class="fas fa-graduation-cap mr-2"></i>
EduTrack
</h1>
</div>
<nav class="flex-1 overflow-y-auto p-4">
<div class="space-y-2">
<a href="#" class="flex items-center p-2 rounded-lg bg-primary text-white" id="dashboardLink">
<i class="fas fa-tachometer-alt mr-3"></i>
Dashboard
</a>
<a href="#" class="flex items-center p-2 rounded-lg text-gray-700 hover:bg-gray-100" id="classesLink">
<i class="fas fa-users mr-3"></i>
Turmas
</a>
<a href="#" class="flex items-center p-2 rounded-lg text-gray-700 hover:bg-gray-100">
<i class="fas fa-calendar-alt mr-3"></i>
Aulas
</a>
<a href="#" class="flex items-center p-2 rounded-lg text-gray-700 hover:bg-gray-100">
<i class="fas fa-clipboard-list mr-3"></i>
Frequência
</a>
<a href="#" class="flex items-center p-2 rounded-lg text-gray-700 hover:bg-gray-100">
<i class="fas fa-cog mr-3"></i>
Configurações
</a>
<a href="#" class="flex items-center p-2 rounded-lg text-gray-700 hover:bg-gray-100" id="reportsLink">
<i class="fas fa-file-alt mr-3"></i>
Relatórios
</a>
</div>
</nav>
<div class="p-4 border-t border-gray-200">
<div class="flex items-center">
<img src="https://randomuser.me/api/portraits/women/44.jpg" alt="User" class="w-10 h-10 rounded-full">
<div class="ml-3">
<p class="text-sm font-medium">Prof. Ana Silva</p>
<p class="text-xs text-gray-500">admin</p>
</div>
</div>
</div>
</div>
<!-- Main Content -->
<div class="flex-1 flex flex-col overflow-hidden">
<!-- Top Navigation -->
<header class="bg-white border-b border-gray-200 p-4 flex items-center justify-between">
<div class="flex items-center">
<button id="sidebarToggle" class="md:hidden mr-4 text-gray-500">
<i class="fas fa-bars text-xl"></i>
</button>
<h2 class="text-xl font-semibold text-gray-800">Dashboard</h2>
</div>
<div class="flex items-center space-x-4">
<div class="relative">
<button class="text-gray-500 hover:text-gray-700">
<i class="fas fa-bell text-xl"></i>
<span class="absolute -top-1 -right-1 bg-danger text-white text-xs rounded-full h-5 w-5 flex items-center justify-center">3</span>
</button>
</div>
<div class="relative">
<button class="text-gray-500 hover:text-gray-700">
<i class="fas fa-envelope text-xl"></i>
<span class="absolute -top-1 -right-1 bg-primary text-white text-xs rounded-full h-5 w-5 flex items-center justify-center">5</span>
</button>
</div>
</div>
</header>
<!-- Main Content Area -->
<main class="flex-1 overflow-y-auto p-6 bg-gray-50">
<div class="flex items-center justify-between mb-6">
<h2 class="text-2xl font-semibold text-gray-800">Dashboard</h2>
<div class="flex items-center space-x-2">
<span class="text-sm text-gray-500">Atualizado agora</span>
<button class="text-gray-400 hover:text-gray-600">
<i class="fas fa-sync-alt"></i>
</button>
</div>
</div>
<!-- Dashboard Metrics -->
<div class="bg-white rounded-lg shadow p-6 mb-6">
<h3 class="text-lg font-semibold mb-4">Filtros</h3>
<div class="grid grid-cols-1 md:grid-cols-4 gap-4">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Tipo de Relatório</label>
<select class="w-full border border-gray-300 rounded-md px-3 py-2">
<option>Frequência</option>
<option>Desempenho</option>
<option>Financeiro</option>
<option selected>Consolidado</option>
</select>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Turma</label>
<select class="w-full border border-gray-300 rounded-md px-3 py-2">
<option>Todas</option>
<option>Turma A</option>
<option>Turma B</option>
<option>Turma C</option>
</select>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Período Inicial</label>
<input type="date" class="w-full border border-gray-300 rounded-md px-3 py-2">
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Período Final</label>
<input type="date" class="w-full border border-gray-300 rounded-md px-3 py-2">
</div>
</div>
<div class="flex justify-end mt-4">
<button class="px-4 py-2 bg-primary text-white rounded-md text-sm font-medium hover:bg-primary-dark">
Gerar Relatório
</button>
</div>
</div>
<!-- Dashboard Metrics -->
<div class="bg-white rounded-lg shadow p-6">
<h3 class="text-lg font-semibold mb-4">Relatório Detalhado</h3>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Turma</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Alunos</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Frequência</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Aprovação</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Média</th>
<th 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">
<div class="text-sm font-medium text-gray-900">Turma A</div>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">25</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">92%</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">96%</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">8.7</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">
Excelente
</span>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm font-medium text-gray-900">Turma B</div>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">30</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">87%</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">90%</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">8.1</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">
Bom
</span>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm font-medium text-gray-900">Turma C</div>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">22</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">85%</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">88%</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">7.8</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">
Regular
</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- Charts and Tables -->
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-6">
<!-- Attendance Chart -->
<div class="bg-white rounded-lg shadow p-6 lg:col-span-2">
<div class="flex items-center justify-between mb-4">
<h3 class="text-lg font-semibold">Frequência por Turma</h3>
<select class="border border-gray-300 rounded-md px-3 py-1 text-sm">
<option>Últimos 7 dias</option>
<option>Últimos 30 dias</option>
<option selected>Este mês</option>
</select>
</div>
<div class="chart-container">
<canvas id="attendanceChart"></canvas>
</div>
</div>
<!-- Recent Absences -->
<div class="bg-white rounded-lg shadow p-6">
<h3 class="text-lg font-semibold mb-4">Ausências Recentes</h3>
<div class="space-y-4">
<div class="flex items-center p-2 hover:bg-gray-50 rounded-lg">
<div class="bg-danger bg-opacity-10 p-2 rounded-full mr-3">
<i class="fas fa-user-times text-danger"></i>
</div>
<div>
<p class="font-medium">Carlos Oliveira</p>
<p class="text-sm text-gray-500">Turma A - 2 ausências</p>
</div>
</div>
<div class="flex items-center p-2 hover:bg-gray-50 rounded-lg">
<div class="bg-danger bg-opacity-10 p-2 rounded-full mr-3">
<i class="fas fa-user-times text-danger"></i>
</div>
<div>
<p class="font-medium">Mariana Santos</p>
<p class="text-sm text-gray-500">Turma B - 3 ausências</p>
</div>
</div>
<div class="flex items-center p-2 hover:bg-gray-50 rounded-lg">
<div class="bg-warning bg-opacity-10 p-2 rounded-full mr-3">
<i class="fas fa-exclamation-triangle text-warning"></i>
</div>
<div>
<p class="font-medium">Pedro Henrique</p>
<p class="text-sm text-gray-500">Turma C - 1 ausência</p>
</div>
</div>
<div class="flex items-center p-2 hover:bg-gray-50 rounded-lg">
<div class="bg-warning bg-opacity-10 p-2 rounded-full mr-3">
<i class="fas fa-exclamation-triangle text-warning"></i>
</div>
<div>
<p class="font-medium">Juliana Costa</p>
<p class="text-sm text-gray-500">Turma A - 1 ausência</p>
</div>
</div>
<div class="flex items-center p-2 hover:bg-gray-50 rounded-lg">
<div class="bg-warning bg-opacity-10 p-2 rounded-full mr-3">
<i class="fas fa-exclamation-triangle text-warning"></i>
</div>
<div>
<p class="font-medium">Rafael Silva</p>
<p class="text-sm text-gray-500">Turma B - 1 ausência</p>
</div>
</div>
</div>
<button class="mt-4 text-primary text-sm font-medium flex items-center">
Ver todas <i class="fas fa-chevron-right ml-1 text-xs"></i>
</button>
</div>
</div>
<!-- Upcoming Classes -->
<div class="bg-white rounded-lg shadow p-6 mb-6">
<div class="flex items-center justify-between mb-4">
<h3 class="text-lg font-semibold">Próximas Aulas</h3>
<button class="text-primary text-sm font-medium flex items-center">
Ver calendário completo <i class="fas fa-chevron-right ml-1 text-xs"></i>
</button>
</div>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Data/Hora</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Turma</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Matéria</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Alunos</th>
<th 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="text-sm font-medium text-gray-900">Hoje, 14:00</div>
<div class="text-sm text-gray-500">Sala 203</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">Turma A</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Matemática</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">25 alunos</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<button class="text-primary hover:text-primary-dark mr-3">Chamada</button>
<button class="text-gray-600 hover:text-gray-900">Detalhes</button>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm font-medium text-gray-900">Amanhã, 10:00</div>
<div class="text-sm text-gray-500">Sala 105</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">Turma B</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">História</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">30 alunos</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<button class="text-primary hover:text-primary-dark mr-3">Chamada</button>
<button class="text-gray-600 hover:text-gray-900">Detalhes</button>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm font-medium text-gray-900">Amanhã, 16:00</div>
<div class="text-sm text-gray-500">Sala 301</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-purple-100 text-purple-800">Turma C</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Ciências</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">22 alunos</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<button class="text-primary hover:text-primary-dark mr-3">Chamada</button>
<button class="text-gray-600 hover:text-gray-900">Detalhes</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- Student Performance -->
<div class="bg-white rounded-lg shadow p-6">
<div class="flex items-center justify-between mb-4">
<h3 class="text-lg font-semibold">Desempenho por Aluno</h3>
<select class="border border-gray-300 rounded-md px-3 py-1 text-sm">
<option>Turma A</option>
<option selected>Turma B</option>
<option>Turma C</option>
</select>
</div>
<div class="chart-container">
<canvas id="performanceChart"></canvas>
</div>
</div>
</main>
</div>
</div>
<!-- Classes Modal -->
<!-- Attendance Modal -->
<div id="attendanceModal" class="fixed inset-0 bg-gray-600 bg-opacity-50 flex items-center justify-center hidden">
<div class="bg-white rounded-lg shadow-xl w-full max-w-4xl max-h-[90vh] overflow-hidden">
<div class="p-6">
<div class="flex justify-between items-center mb-4">
<h3 class="text-xl font-semibold">Registro de Frequência</h3>
<button id="closeAttendanceModal" class="text-gray-500 hover:text-gray-700">
<i class="fas fa-times"></i>
</button>
</div>
<div class="mb-6">
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Selecione a Turma</label>
<select id="attendanceClassSelect" class="w-full border border-gray-300 rounded-md px-3 py-2">
<option>Turma A</option>
<option>Turma B</option>
<option>Turma C</option>
</select>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Data da Aula</label>
<input type="date" class="w-full border border-gray-300 rounded-md px-3 py-2">
</div>
</div>
<div class="overflow-auto max-h-[50vh] border border-gray-200 rounded-lg">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Aluno</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Presença</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Total Presenças</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Justificativa</th>
</tr>
</thead>
<tbody id="attendanceStudents" class="bg-white divide-y divide-gray-200">
<!-- Students will be populated here -->
<tr>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm font-medium text-gray-900">Ana Silva</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<label class="inline-flex items-center">
<input type="checkbox" class="form-checkbox h-5 w-5 text-primary rounded" checked>
</label>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
18/20
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
15/20
</td>
<td class="px-6 py-4 whitespace-nowrap">
<input type="text" class="border border-gray-300 rounded-md px-3 py-1 text-sm w-full" placeholder="Motivo da ausência">
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm font-medium text-gray-900">Carlos Oliveira</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<label class="inline-flex items-center">
<input type="checkbox" class="form-checkbox h-5 w-5 text-primary rounded">
</label>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<input type="text" class="border border-gray-300 rounded-md px-3 py-1 text-sm w-full" placeholder="Motivo da ausência">
</td>
</tr>
<!-- More students would be added dynamically -->
</tbody>
</table>
</div>
</div>
<div class="flex justify-end space-x-3">
<button class="px-4 py-2 border border-gray-300 rounded-md text-sm font-medium text-gray-700 hover:bg-gray-50">
Cancelar
</button>
<button class="px-4 py-2 bg-primary text-white rounded-md text-sm font-medium hover:bg-primary-dark">
Salvar Frequência
</button>
</div>
</div>
</div>
</div>
<div id="classesModal" class="fixed inset-0 bg-gray-600 bg-opacity-50 flex items-center justify-center hidden">
<div class="bg-white rounded-lg shadow-xl w-full max-w-4xl max-h-[90vh] overflow-hidden">
<div class="p-6">
<div class="flex justify-between items-center mb-4">
<h3 class="text-xl font-semibold">Turmas Cadastradas</h3>
<button id="closeClassesModal" class="text-gray-500 hover:text-gray-700">
<i class="fas fa-times"></i>
</button>
</div>
<div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-6">
<div class="bg-blue-50 p-4 rounded-lg cursor-pointer hover:bg-blue-100 class-card" data-class="Turma A">
<h4 class="font-medium text-blue-800">Turma A</h4>
<p class="text-sm text-blue-600">25 alunos</p>
</div>
<div class="bg-green-50 p-4 rounded-lg cursor-pointer hover:bg-green-100 class-card" data-class="Turma B">
<h4 class="font-medium text-green-800">Turma B</h4>
<p class="text-sm text-green-600">30 alunos</p>
</div>
<div class="bg-purple-50 p-4 rounded-lg cursor-pointer hover:bg-purple-100 class-card" data-class="Turma C">
<h4 class="font-medium text-purple-800">Turma C</h4>
<p class="text-sm text-purple-600">22 alunos</p>
</div>
</div>
<div id="classDetails" class="hidden">
<h4 id="selectedClassName" class="text-lg font-semibold mb-4"></h4>
<div class="overflow-auto max-h-[50vh]">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Aluno</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Total Aulas</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Presente</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Frequência</th>
</tr>
</thead>
<tbody id="classStudents" class="bg-white divide-y divide-gray-200">
<!-- Students will be populated here by JavaScript -->
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- Reports Modal -->
<div id="reportsModal" class="fixed inset-0 bg-gray-600 bg-opacity-50 flex items-center justify-center hidden">
<div class="bg-white rounded-lg shadow-xl w-full max-w-4xl max-h-[90vh] overflow-hidden">
<div class="p-6">
<div class="flex justify-between items-center mb-4">
<h3 class="text-xl font-semibold">Gerar Relatórios</h3>
<button id="closeReportsModal" class="text-gray-500 hover:text-gray-700">
<i class="fas fa-times"></i>
</button>
</div>
<div class="mb-6">
<div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-6">
<div class="bg-blue-50 p-4 rounded-lg cursor-pointer hover:bg-blue-100 report-type" data-report="attendance">
<div class="bg-blue-100 p-3 rounded-full w-12 h-12 flex items-center justify-center mb-3">
<i class="fas fa-user-check text-blue-600"></i>
</div>
<h4 class="font-medium text-blue-800">Frequência</h4>
<p class="text-sm text-blue-600">Relatório de presença dos alunos</p>
</div>
<div class="bg-green-50 p-4 rounded-lg cursor-pointer hover:bg-green-100 report-type" data-report="performance">
<div class="bg-green-100 p-3 rounded-full w-12 h-12 flex items-center justify-center mb-3">
<i class="fas fa-chart-line text-green-600"></i>
</div>
<h4 class="font-medium text-green-800">Desempenho</h4>
<p class="text-sm text-green-600">Relatório de notas e avaliações</p>
</div>
<div class="bg-purple-50 p-4 rounded-lg cursor-pointer hover:bg-purple-100 report-type" data-report="financial">
<div class="bg-purple-100 p-3 rounded-full w-12 h-12 flex items-center justify-center mb-3">
<i class="fas fa-money-bill-wave text-purple-600"></i>
</div>
<h4 class="font-medium text-purple-800">Financeiro</h4>
<p class="text-sm text-purple-600">Relatório de pagamentos e mensalidades</p>
</div>
</div>
<div id="reportFilters" class="hidden">
<h4 class="text-lg font-semibold mb-4">Filtros do Relatório</h4>
<div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-4">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Turma</label>
<select class="w-full border border-gray-300 rounded-md px-3 py-2">
<option>Todas</option>
<option>Turma A</option>
<option>Turma B</option>
<option>Turma C</option>
</select>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Período Inicial</label>
<input type="date" class="w-full border border-gray-300 rounded-md px-3 py-2">
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Período Final</label>
<input type="date" class="w-full border border-gray-300 rounded-md px-3 py-2">
</div>
</div>
<div class="flex justify-end">
<button class="px-4 py-2 bg-primary text-white rounded-md text-sm font-medium hover:bg-primary-dark">
Gerar Relatório
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Scripts -->
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script>
// Sample data for classes and students
const classesData = {
'Turma A': [
{ name: 'Ana Silva', totalClasses: 20, attended: 18 },
{ name: 'Carlos Oliveira', totalClasses: 20, attended: 15 },
{ name: 'Mariana Santos', totalClasses: 20, attended: 19 },
{ name: 'Pedro Henrique', totalClasses: 20, attended: 17 },
{ name: 'Juliana Costa', totalClasses: 20, attended: 20 }
],
'Turma B': [
{ name: 'Rafael Silva', totalClasses: 18, attended: 16 },
{ name: 'Fernanda Lima', totalClasses: 18, attended: 18 },
{ name: 'Lucas Pereira', totalClasses: 18, attended: 15 },
{ name: 'Camila Rocha', totalClasses: 18, attended: 17 },
{ name: 'Bruno Almeida', totalClasses: 18, attended: 14 }
],
'Turma C': [
{ name: 'Patricia Souza', totalClasses: 22, attended: 20 },
{ name: 'Gustavo Martins', totalClasses: 22, attended: 19 },
{ name: 'Isabela Ferreira', totalClasses: 22, attended: 21 },
{ name: 'Rodrigo Barbosa', totalClasses: 22, attended: 18 },
{ name: 'Tatiana Gomes', totalClasses: 22, attended: 22 }
]
};
// Classes Modal functionality
document.getElementById('classesLink').addEventListener('click', function() {
document.getElementById('classesModal').classList.remove('hidden');
document.getElementById('classDetails').classList.add('hidden');
});
document.getElementById('closeClassesModal').addEventListener('click', function() {
document.getElementById('classesModal').classList.add('hidden');
});
// Handle class selection
document.querySelectorAll('.class-card').forEach(card => {
card.addEventListener('click', function() {
const className = this.getAttribute('data-class');
const students = classesData[className];
document.getElementById('selectedClassName').textContent = className;
const studentsTable = document.getElementById('classStudents');
studentsTable.innerHTML = '';
students.forEach(student => {
const attendancePercentage = Math.round((student.attended / student.totalClasses) * 100);
const row = document.createElement('tr');
row.innerHTML = `
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm font-medium text-gray-900">${student.name}</div>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">${student.totalClasses}</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">${student.attended}</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full
${attendancePercentage >= 90 ? 'bg-green-100 text-green-800' :
attendancePercentage >= 70 ? 'bg-yellow-100 text-yellow-800' :
'bg-red-100 text-red-800'}">
${attendancePercentage}%
</span>
</td>
`;
studentsTable.appendChild(row);
});
document.getElementById('classDetails').classList.remove('hidden');
});
});
// Summary Chart for Reports
const summaryCtx = document.getElementById('summaryChart').getContext('2d');
const summaryChart = new Chart(summaryCtx, {
type: 'bar',
data: {
labels: ['Turma A', 'Turma B', 'Turma C'],
datasets: [
{
label: 'Frequência',
data: [92, 87, 85],
backgroundColor: '#4F46E5',
borderRadius: 4
},
{
label: 'Aprovação',
data: [96, 90, 88],
backgroundColor: '#10B981',
borderRadius: 4
},
{
label: 'Média',
data: [87, 81, 78],
backgroundColor: '#3B82F6',
borderRadius: 4
}
]
},
options: {
responsive: true,
maintainAspectRatio: false,
scales: {
x: {
grid: {
display: false
}
},
y: {
beginAtZero: true,
max: 100,
ticks: {
callback: function(value) {
return value + '%';
}
}
}
},
plugins: {
legend: {
position: 'top',
},
tooltip: {
callbacks: {
label: function(context) {
let label = context.dataset.label || '';
if (label === 'Média') {
return label + ': ' + context.raw;
}
return label + ': ' + context.raw + '%';
}
}
}
}
}
});
</script>
<script>
// Toggle sidebar on mobile
document.getElementById('sidebarToggle').addEventListener('click', function() {
document.querySelector('.sidebar').classList.toggle('open');
});
// Attendance Chart
const attendanceCtx = document.getElementById('attendanceChart').getContext('2d');
const attendanceChart = new Chart(attendanceCtx, {
type: 'bar',
data: {
labels: ['Turma A', 'Turma B', 'Turma C', 'Turma D', 'Turma E'],
datasets: [
{
label: 'Presentes',
data: [85, 78, 92, 88, 76],
backgroundColor: '#10B981',
borderRadius: 4
},
{
label: 'Ausentes',
data: [15, 22, 8, 12, 24],
backgroundColor: '#EF4444',
borderRadius: 4
}
]
},
options: {
responsive: true,
maintainAspectRatio: false,
scales: {
x: {
grid: {
display: false
}
},
y: {
beginAtZero: true,
max: 100,
ticks: {
callback: function(value) {
return value + '%';
}
}
}
},
plugins: {
legend: {
position: 'top',
},
tooltip: {
callbacks: {
label: function(context) {
return context.dataset.label + ': ' + context.raw + '%';
}
}
}
}
}
});
// Attendance Modal functionality
document.querySelector('a[href="#"]:nth-child(4)').addEventListener('click', function(e) {
e.preventDefault();
document.getElementById('attendanceModal').classList.remove('hidden');
});
document.getElementById('closeAttendanceModal').addEventListener('click', function() {
document.getElementById('attendanceModal').classList.add('hidden');
});
// Reports Modal functionality
document.getElementById('reportsLink').addEventListener('click', function() {
document.getElementById('reportsModal').classList.remove('hidden');
document.getElementById('reportFilters').classList.add('hidden');
});
document.getElementById('closeReportsModal').addEventListener('click', function() {
document.getElementById('reportsModal').classList.add('hidden');
});
document.querySelectorAll('.report-type').forEach(report => {
report.addEventListener('click', function() {
document.getElementById('reportFilters').classList.remove('hidden');
// Here you would set up the specific filters for each report type
// based on the data-report attribute
});
});
// Performance Chart
const performanceCtx = document.getElementById('performanceChart').getContext('2d');
const performanceChart = new Chart(performanceCtx, {
type: 'line',
data: {
labels: ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul'],
datasets: [
{
label: 'Média da Turma',
data: [75, 78, 82, 80, 85, 83, 88],
borderColor: '#4F46E5',
backgroundColor: 'rgba(79, 70, 229, 0.05)',
tension: 0.3,
fill: true
},
{
label: 'Melhor Aluno',
data: [92, 95, 90, 94, 96, 98, 100],
borderColor: '#10B981',
backgroundColor: 'rgba(16, 185, 129, 0.05)',
tension: 0.3,
borderDash: [5, 5],
fill: true
},
{
label: 'Pior Aluno',
data: [60, 58, 55, 62, 65, 60, 68],
borderColor: '#EF4444',
backgroundColor: 'rgba(239, 68, 68, 0.05)',
tension: 0.3,
borderDash: [5, 5],
fill: true
}
]
},
options: {
responsive: true,
maintainAspectRatio: false,
scales: {
y: {
beginAtZero: false,
min: 50,
max: 100,
ticks: {
callback: function(value) {
return value + '%';
}
}
}
},
plugins: {
legend: {
position: 'top',
},
tooltip: {
callbacks: {
label: function(context) {
return context.dataset.label + ': ' + context.raw + '%';
}
}
}
}
}
});
</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/t" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>