File size: 49,515 Bytes
594c12a 43497cd 594c12a 1b6be43 594c12a 1b6be43 594c12a 4b3dbcd 594c12a e1e1a39 43497cd e1e1a39 43497cd e1e1a39 43497cd e1e1a39 594c12a 1b6be43 e1e1a39 1b6be43 4b3dbcd 594c12a 1b6be43 e1e1a39 1b6be43 594c12a e1e1a39 4b3dbcd 594c12a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 | <!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> |