From 63c97938a462bd303763209831eb23ac502b4ddb Mon Sep 17 00:00:00 2001 From: mvilcaqui Date: Sat, 5 Jul 2025 08:30:59 -0500 Subject: [PATCH 01/52] Primer commit de la parte de perfil de usuario --- PAGINA WEB/conexion.php | 2 +- PAGINA WEB/main.html | 30 ++++++++++++++++++++- PAGINA WEB/main.php | 59 ++++++++++++++++++++++++++++++++--------- 3 files changed, 76 insertions(+), 15 deletions(-) diff --git a/PAGINA WEB/conexion.php b/PAGINA WEB/conexion.php index d295c5d..e27ec77 100644 --- a/PAGINA WEB/conexion.php +++ b/PAGINA WEB/conexion.php @@ -1,7 +1,7 @@ + PRODIGIOS @@ -232,12 +233,39 @@ background: #007bff; color: #ffffff; } + .profile-icon { + position: absolute; + top: 15px; + right: 20px; + font-size: 26px; + color: white; + z-index: 1101; + background: transparent; + border: none; + } + + .profile-icon a { + color: white; + text-decoration: none; + } + + .profile-icon a:hover { + color: #ffcc00; + } - + +
-
+

Mi Perfil

- +
+
From 1f2131e4159fb86150e58a897e0e7e5f8972ccba Mon Sep 17 00:00:00 2001 From: mvilcaqui Date: Sat, 5 Jul 2025 10:01:50 -0500 Subject: [PATCH 08/52] =?UTF-8?q?se=20a=C3=B1adio=20subir=20imagen=20de=20?= =?UTF-8?q?usuario?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PAGINA WEB/perfil.php | 69 ++++++++++++++++++++++++++++--------------- 1 file changed, 45 insertions(+), 24 deletions(-) diff --git a/PAGINA WEB/perfil.php b/PAGINA WEB/perfil.php index 0448ede..2daf922 100644 --- a/PAGINA WEB/perfil.php +++ b/PAGINA WEB/perfil.php @@ -6,21 +6,6 @@ $query = "SELECT nombre, correo, telefono FROM usuarios WHERE id = $usuario_id"; $result = mysqli_query($conn, $query); $usuario = mysqli_fetch_assoc($result) ?? ['nombre'=>'', 'correo'=>'', 'telefono'=>'']; - -// Guardar cambios -if ($_SERVER["REQUEST_METHOD"] == "POST") { - $nombre = $_POST['nombre']; - $correo = $_POST['correo']; - $telefono = $_POST['telefono']; - - $update = "UPDATE usuarios SET nombre='$nombre', correo='$correo', telefono='$telefono' WHERE id = $usuario_id"; - mysqli_query($conn, $update); - - // Aquí podrías procesar la imagen más adelante si lo deseas - - header("Location: perfil.php"); - exit; -} ?> @@ -119,15 +104,34 @@ .profile-avatar { text-align: center; margin-bottom: 20px; + position: relative; } - .profile-avatar i { + #avatarPreview { + width: 100px; + height: 100px; + border-radius: 50%; + object-fit: cover; + display: none; + margin: 0 auto 10px; + } + + .default-icon { font-size: 80px; color: #2c3e50; } - .profile-avatar input[type="file"] { - margin-top: 10px; + .custom-file-input { + display: none; + } + + .custom-label { + background-color: #007bff; + color: white; + padding: 6px 12px; + border-radius: 5px; + cursor: pointer; + font-size: 14px; display: none; } @@ -168,12 +172,10 @@ @@ -205,8 +223,11 @@ function cancelEdit() {

Mi Perfil

-
- + Vista previa de foto + +
+ +
From df8ad8ee09fb42ba0570f69d705165234ea6e9a1 Mon Sep 17 00:00:00 2001 From: gchambillala Date: Sat, 5 Jul 2025 10:19:04 -0500 Subject: [PATCH 09/52] Agrega forma para identificar error en sql --- PAGINA WEB/conexion.php | 2 +- PAGINA WEB/perfil.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/PAGINA WEB/conexion.php b/PAGINA WEB/conexion.php index e27ec77..d295c5d 100644 --- a/PAGINA WEB/conexion.php +++ b/PAGINA WEB/conexion.php @@ -1,7 +1,7 @@ '', 'correo'=>'', 'telefono'=>'']; ?> From 243fc584957a722d7a63365b1e8555c72099ae16 Mon Sep 17 00:00:00 2001 From: gchambillala Date: Sat, 5 Jul 2025 10:38:49 -0500 Subject: [PATCH 10/52] =?UTF-8?q?Divisi=C3=B3n=20de=20archivos=20para=20un?= =?UTF-8?q?a=20mejor=20lectura?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PAGINA WEB/perfil.css | 168 +++++++++++++++++++++++++++++++++++++ PAGINA WEB/perfil.js | 29 +++++++ PAGINA WEB/perfil.php | 190 +----------------------------------------- 3 files changed, 199 insertions(+), 188 deletions(-) create mode 100644 PAGINA WEB/perfil.css create mode 100644 PAGINA WEB/perfil.js diff --git a/PAGINA WEB/perfil.css b/PAGINA WEB/perfil.css new file mode 100644 index 0000000..5c9d03e --- /dev/null +++ b/PAGINA WEB/perfil.css @@ -0,0 +1,168 @@ +body { + margin: 0; + font-family: Arial, sans-serif; + background-color: #ecf0f1; +} + +.navbar { + position: fixed; + top: 0; + left: 0; + width: 100%; + background-color: #2c3e50; + color: white; + padding: 20px; + font-size: 18px; + font-weight: bold; + z-index: 1000; + display: flex; + justify-content: space-between; + align-items: center; +} + +.profile-icon { + margin-left: auto; + margin-right: 40px; + font-size: 26px; +} + +.profile-icon a { + color: white; + text-decoration: none; +} + +.sidebar { + position: fixed; + top: 60px; + left: 0; + width: 250px; + height: 100%; + background-color: #2c3e50; + color: white; + padding-top: 20px; +} + +.sidebar h2 { + text-align: center; + font-size: 20px; + color: #ecf0f1; +} + +.sidebar .menu { + list-style: none; + padding: 0; +} + +.sidebar .menu li a { + color: #ecf0f1; + text-decoration: none; + display: block; + padding: 10px 20px; +} + +.sidebar .menu li a:hover { + background-color: #2980b9; +} + +.main-content { + margin-left: 250px; + margin-top: 80px; + padding: 20px; +} + +.profile-card { + background-color: #fff; + padding: 30px; + border-radius: 8px; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); + max-width: 500px; + margin: auto; +} + +.profile-card h2 { + color: #2c3e50; + margin-bottom: 10px; + text-align: center; +} + +.profile-avatar { + text-align: center; + margin-bottom: 20px; + position: relative; +} + +#avatarPreview { + width: 100px; + height: 100px; + border-radius: 50%; + object-fit: cover; + display: none; + margin: 0 auto 10px; +} + +.default-icon { + font-size: 80px; + color: #2c3e50; +} + +.custom-file-input { + display: none; +} + +.custom-label { + background-color: #007bff; + color: white; + padding: 6px 12px; + border-radius: 5px; + cursor: pointer; + font-size: 14px; + display: none; +} + +.profile-info { + margin-bottom: 15px; +} + +.profile-info label { + display: inline-block; + width: 150px; + font-weight: bold; + color: #2c3e50; +} + +.profile-info input { + padding: 5px; + width: 60%; + border: 1px solid #ccc; + border-radius: 4px; +} + +.buttons { + text-align: center; + margin-top: 20px; +} + +.buttons button { + padding: 8px 15px; + border: none; + border-radius: 5px; + cursor: pointer; + margin: 0 5px; +} + +.edit-btn { + background-color: #007bff; + color: white; +} + +.cancel-btn { + background-color: #6c757d; + color: white; + display: none; +} + +.save-btn { + background-color: #28a745; + color: white; + display: none; +} \ No newline at end of file diff --git a/PAGINA WEB/perfil.js b/PAGINA WEB/perfil.js new file mode 100644 index 0000000..090abd0 --- /dev/null +++ b/PAGINA WEB/perfil.js @@ -0,0 +1,29 @@ +function enableEdit() { + const inputs = document.querySelectorAll("input[type='text'], input[type='email']"); + inputs.forEach(input => input.removeAttribute("readonly")); + + document.querySelector('.custom-label').style.display = 'inline-block'; + document.querySelector('.save-btn').style.display = 'inline-block'; + document.querySelector('.cancel-btn').style.display = 'inline-block'; + document.querySelector('.edit-btn').style.display = 'none'; +} + +function cancelEdit() { + window.location.reload(); +} + +function previewImage(event) { + const file = event.target.files[0]; + const preview = document.getElementById("avatarPreview"); + const icon = document.querySelector(".default-icon"); + + if (file) { + const reader = new FileReader(); + reader.onload = function (e) { + preview.src = e.target.result; + preview.style.display = "block"; + icon.style.display = "none"; + }; + reader.readAsDataURL(file); + } +} \ No newline at end of file diff --git a/PAGINA WEB/perfil.php b/PAGINA WEB/perfil.php index f33e684..1c4c05a 100644 --- a/PAGINA WEB/perfil.php +++ b/PAGINA WEB/perfil.php @@ -16,194 +16,7 @@ Perfil de Usuario - - +
+ From e008e27b928c1bbddf412cfc47d09dd837524cfb Mon Sep 17 00:00:00 2001 From: Aracely Lema Date: Sat, 5 Jul 2025 13:26:48 -0500 Subject: [PATCH 11/52] Vista perfil --- PAGINA WEB/perfil.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/PAGINA WEB/perfil.php b/PAGINA WEB/perfil.php index 1c4c05a..7d19ea2 100644 --- a/PAGINA WEB/perfil.php +++ b/PAGINA WEB/perfil.php @@ -2,12 +2,14 @@ include("conexion.php"); $usuario_id = 1; -// Obtener datos +// Obtener datos del usuario $query = "SELECT nombre, correo, telefono FROM usuarios WHERE id = $usuario_id"; $result = mysqli_query($conn, $query); + if (!$result) { die("Error en la consulta SQL: " . mysqli_error($conn)); } + $usuario = mysqli_fetch_assoc($result) ?? ['nombre'=>'', 'correo'=>'', 'telefono'=>'']; ?> From fc84fee8596d0ff9e68525d259d219c881926ce7 Mon Sep 17 00:00:00 2001 From: alemaal Date: Sat, 5 Jul 2025 13:34:00 -0500 Subject: [PATCH 12/52] Vista perfil --- PAGINA WEB/perfil.php | 1 + 1 file changed, 1 insertion(+) diff --git a/PAGINA WEB/perfil.php b/PAGINA WEB/perfil.php index 7d19ea2..97cc646 100644 --- a/PAGINA WEB/perfil.php +++ b/PAGINA WEB/perfil.php @@ -70,3 +70,4 @@ + From 5994904a788000bcd2b8fd2f12441ad2344a7a63 Mon Sep 17 00:00:00 2001 From: alemaal Date: Sat, 5 Jul 2025 13:44:28 -0500 Subject: [PATCH 13/52] Vista perfil --- PAGINA WEB/perfil.css | 80 ++++++++++++++++++++++++------------------- 1 file changed, 45 insertions(+), 35 deletions(-) diff --git a/PAGINA WEB/perfil.css b/PAGINA WEB/perfil.css index 5c9d03e..81cdf75 100644 --- a/PAGINA WEB/perfil.css +++ b/PAGINA WEB/perfil.css @@ -1,9 +1,11 @@ +/* Reset básico */ body { margin: 0; font-family: Arial, sans-serif; background-color: #ecf0f1; } +/* Barra de navegación superior */ .navbar { position: fixed; top: 0; @@ -11,7 +13,7 @@ body { width: 100%; background-color: #2c3e50; color: white; - padding: 20px; + padding: 15px 20px; font-size: 18px; font-weight: bold; z-index: 1000; @@ -21,8 +23,6 @@ body { } .profile-icon { - margin-left: auto; - margin-right: 40px; font-size: 26px; } @@ -31,12 +31,13 @@ body { text-decoration: none; } +/* Barra lateral */ .sidebar { position: fixed; top: 60px; left: 0; - width: 250px; - height: 100%; + width: 220px; + height: calc(100% - 60px); background-color: #2c3e50; color: white; padding-top: 20px; @@ -44,8 +45,8 @@ body { .sidebar h2 { text-align: center; - font-size: 20px; - color: #ecf0f1; + font-size: 22px; + margin-bottom: 20px; } .sidebar .menu { @@ -54,54 +55,55 @@ body { } .sidebar .menu li a { + display: block; + padding: 12px 20px; color: #ecf0f1; text-decoration: none; - display: block; - padding: 10px 20px; + transition: background 0.3s; } .sidebar .menu li a:hover { background-color: #2980b9; } +/* Contenido principal */ .main-content { - margin-left: 250px; + margin-left: 220px; margin-top: 80px; padding: 20px; } +/* Tarjeta de perfil */ .profile-card { - background-color: #fff; - padding: 30px; + background: #fff; border-radius: 8px; - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); + padding: 30px; max-width: 500px; margin: auto; + box-shadow: 0 4px 12px rgba(0,0,0,0.1); } .profile-card h2 { - color: #2c3e50; - margin-bottom: 10px; text-align: center; + margin-bottom: 20px; + color: #2c3e50; } .profile-avatar { text-align: center; margin-bottom: 20px; - position: relative; } #avatarPreview { - width: 100px; - height: 100px; + width: 120px; + height: 120px; border-radius: 50%; object-fit: cover; display: none; - margin: 0 auto 10px; } .default-icon { - font-size: 80px; + font-size: 100px; color: #2c3e50; } @@ -110,44 +112,47 @@ body { } .custom-label { + display: inline-block; background-color: #007bff; color: white; - padding: 6px 12px; + padding: 6px 15px; border-radius: 5px; cursor: pointer; - font-size: 14px; - display: none; + margin-top: 10px; } +/* Información del perfil */ .profile-info { margin-bottom: 15px; } .profile-info label { - display: inline-block; - width: 150px; + display: block; font-weight: bold; color: #2c3e50; + margin-bottom: 5px; } .profile-info input { - padding: 5px; - width: 60%; + width: 100%; + padding: 8px; border: 1px solid #ccc; border-radius: 4px; } +/* Botones */ .buttons { text-align: center; margin-top: 20px; } .buttons button { - padding: 8px 15px; + padding: 10px 20px; border: none; - border-radius: 5px; - cursor: pointer; margin: 0 5px; + border-radius: 4px; + cursor: pointer; + font-weight: bold; } .edit-btn { @@ -155,14 +160,19 @@ body { color: white; } -.cancel-btn { - background-color: #6c757d; +.save-btn { + background-color: #28a745; color: white; display: none; } -.save-btn { - background-color: #28a745; +.cancel-btn { + background-color: #6c757d; color: white; display: none; -} \ No newline at end of file +} + +/* Efectos hover */ +.buttons button:hover { + opacity: 0.9; +} From 93635c214507375ee6886455db2f657db52734e2 Mon Sep 17 00:00:00 2001 From: alemaal Date: Sat, 5 Jul 2025 13:46:47 -0500 Subject: [PATCH 14/52] Estructura del perfil --- PAGINA WEB/perfil.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/PAGINA WEB/perfil.php b/PAGINA WEB/perfil.php index 97cc646..2231691 100644 --- a/PAGINA WEB/perfil.php +++ b/PAGINA WEB/perfil.php @@ -1,16 +1,21 @@ '', 'correo'=>'', 'telefono'=>'']; +$usuario = mysqli_fetch_assoc($result) ?? ['nombre' => '', 'correo' => '', 'telefono' => '']; ?> @@ -47,6 +52,7 @@ +
@@ -59,6 +65,7 @@
+
@@ -70,4 +77,3 @@ - From 31f7525503c99952e6944c4ce99095c499872e6f Mon Sep 17 00:00:00 2001 From: alemaal Date: Sat, 5 Jul 2025 13:52:40 -0500 Subject: [PATCH 15/52] Se agrego seccion biografia --- PAGINA WEB/perfil.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/PAGINA WEB/perfil.php b/PAGINA WEB/perfil.php index 2231691..f11a283 100644 --- a/PAGINA WEB/perfil.php +++ b/PAGINA WEB/perfil.php @@ -1,10 +1,8 @@
  • Dashboard
  • Perfil
  • +
  • Configuración
  • @@ -66,6 +65,11 @@
    +
    + + +
    +
    From 9655fcd8e26cfd6cc0b4ba83b278dcabc23cd801 Mon Sep 17 00:00:00 2001 From: alemaal Date: Sat, 5 Jul 2025 13:55:01 -0500 Subject: [PATCH 16/52] =?UTF-8?q?Dise=C3=B1o=20y=20usabilidad=20del=20perf?= =?UTF-8?q?il?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PAGINA WEB/perfil.css | 203 +++++++++++++++++++++++++++++------------- 1 file changed, 139 insertions(+), 64 deletions(-) diff --git a/PAGINA WEB/perfil.css b/PAGINA WEB/perfil.css index 81cdf75..036594a 100644 --- a/PAGINA WEB/perfil.css +++ b/PAGINA WEB/perfil.css @@ -1,110 +1,148 @@ -/* Reset básico */ body { margin: 0; - font-family: Arial, sans-serif; - background-color: #ecf0f1; + font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; + background-color: #f4f7fa; + color: #34495e; } -/* Barra de navegación superior */ +/* Navbar */ .navbar { position: fixed; top: 0; left: 0; width: 100%; - background-color: #2c3e50; - color: white; - padding: 15px 20px; - font-size: 18px; - font-weight: bold; + background: linear-gradient(90deg, #34495e, #2c3e50); + color: #ecf0f1; + padding: 16px 24px; + font-size: 20px; + font-weight: 700; z-index: 1000; display: flex; justify-content: space-between; align-items: center; + box-shadow: 0 2px 8px rgba(0,0,0,0.15); } .profile-icon { - font-size: 26px; + font-size: 28px; } .profile-icon a { - color: white; - text-decoration: none; + color: #ecf0f1; + transition: color 0.3s ease; } -/* Barra lateral */ +.profile-icon a:hover { + color: #1abc9c; +} + +/* Sidebar */ .sidebar { position: fixed; top: 60px; left: 0; - width: 220px; + width: 240px; height: calc(100% - 60px); background-color: #2c3e50; - color: white; - padding-top: 20px; + color: #ecf0f1; + padding-top: 30px; + box-shadow: 2px 0 8px rgba(0,0,0,0.1); + transition: width 0.3s ease; } .sidebar h2 { text-align: center; - font-size: 22px; - margin-bottom: 20px; + font-size: 24px; + margin-bottom: 30px; + letter-spacing: 1.5px; + font-weight: 800; } .sidebar .menu { list-style: none; padding: 0; + margin: 0; } .sidebar .menu li a { - display: block; - padding: 12px 20px; + display: flex; + align-items: center; + padding: 14px 24px; color: #ecf0f1; text-decoration: none; - transition: background 0.3s; + font-weight: 600; + font-size: 16px; + border-left: 4px solid transparent; + transition: background-color 0.3s, border-color 0.3s; } -.sidebar .menu li a:hover { - background-color: #2980b9; +.sidebar .menu li a i { + margin-right: 12px; + font-size: 18px; +} + +.sidebar .menu li a:hover, +.sidebar .menu li a.active { + background-color: #1abc9c; + border-left-color: #16a085; + color: white; } -/* Contenido principal */ +/* Main content */ .main-content { - margin-left: 220px; + margin-left: 240px; margin-top: 80px; - padding: 20px; + padding: 30px 40px; + background: #fff; + min-height: calc(100vh - 80px); } -/* Tarjeta de perfil */ +/* Profile card */ .profile-card { - background: #fff; - border-radius: 8px; - padding: 30px; - max-width: 500px; + max-width: 550px; margin: auto; - box-shadow: 0 4px 12px rgba(0,0,0,0.1); + background: #ffffff; + border-radius: 12px; + padding: 40px 35px; + box-shadow: 0 8px 20px rgba(0,0,0,0.1); + transition: box-shadow 0.3s ease; +} + +.profile-card:hover { + box-shadow: 0 12px 30px rgba(0,0,0,0.15); } .profile-card h2 { text-align: center; - margin-bottom: 20px; color: #2c3e50; + font-weight: 700; + margin-bottom: 25px; + letter-spacing: 1.2px; } .profile-avatar { text-align: center; - margin-bottom: 20px; + margin-bottom: 30px; + position: relative; } #avatarPreview { - width: 120px; - height: 120px; + width: 130px; + height: 130px; border-radius: 50%; object-fit: cover; display: none; + box-shadow: 0 0 8px rgba(26, 188, 156, 0.5); } .default-icon { - font-size: 100px; - color: #2c3e50; + font-size: 110px; + color: #16a085; + transition: color 0.3s ease; +} + +.profile-avatar:hover .default-icon { + color: #1abc9c; } .custom-file-input { @@ -113,66 +151,103 @@ body { .custom-label { display: inline-block; - background-color: #007bff; + background-color: #16a085; color: white; - padding: 6px 15px; - border-radius: 5px; + padding: 10px 18px; + border-radius: 8px; cursor: pointer; - margin-top: 10px; + font-weight: 600; + font-size: 14px; + margin-top: 15px; + transition: background-color 0.3s ease; } -/* Información del perfil */ +.custom-label:hover { + background-color: #1abc9c; +} + +/* Profile info */ .profile-info { - margin-bottom: 15px; + margin-bottom: 20px; } .profile-info label { display: block; - font-weight: bold; - color: #2c3e50; - margin-bottom: 5px; + font-weight: 700; + color: #34495e; + margin-bottom: 8px; + font-size: 15px; } -.profile-info input { +.profile-info input, +.profile-info textarea { width: 100%; - padding: 8px; - border: 1px solid #ccc; - border-radius: 4px; + padding: 12px 15px; + border: 1.8px solid #ccc; + border-radius: 8px; + font-size: 15px; + transition: border-color 0.3s ease, box-shadow 0.3s ease; + resize: vertical; + background-color: #fafafa; } -/* Botones */ +.profile-info input:focus, +.profile-info textarea:focus { + border-color: #16a085; + box-shadow: 0 0 8px rgba(22, 160, 133, 0.3); + outline: none; + background-color: #fff; +} + +/* Buttons */ .buttons { text-align: center; - margin-top: 20px; + margin-top: 30px; } .buttons button { - padding: 10px 20px; + padding: 12px 25px; border: none; - margin: 0 5px; - border-radius: 4px; + margin: 0 8px; + border-radius: 25px; cursor: pointer; - font-weight: bold; + font-weight: 700; + font-size: 15px; + transition: background-color 0.3s ease, transform 0.2s ease; + box-shadow: 0 3px 8px rgba(22, 160, 133, 0.3); + color: white; } .edit-btn { - background-color: #007bff; - color: white; + background-color: #2980b9; +} + +.edit-btn:hover { + background-color: #3498db; + transform: scale(1.05); } .save-btn { - background-color: #28a745; - color: white; + background-color: #27ae60; display: none; } +.save-btn:hover { + background-color: #2ecc71; + transform: scale(1.05); +} + .cancel-btn { - background-color: #6c757d; - color: white; + background-color: #7f8c8d; display: none; } -/* Efectos hover */ +.cancel-btn:hover { + background-color: #95a5a6; + transform: scale(1.05); +} + +/* Hover effect for all buttons */ .buttons button:hover { opacity: 0.9; } From 6d26cc97aefa808707192e4d38078817ae44bd65 Mon Sep 17 00:00:00 2001 From: gchambillala Date: Sun, 6 Jul 2025 09:58:50 -0500 Subject: [PATCH 17/52] Modificaion para evitar inyeccion SQL --- PAGINA WEB/perfil.php | 37 +++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/PAGINA WEB/perfil.php b/PAGINA WEB/perfil.php index 1c4c05a..f95ac0d 100644 --- a/PAGINA WEB/perfil.php +++ b/PAGINA WEB/perfil.php @@ -1,14 +1,35 @@ '', 'correo'=>'', 'telefono'=>'']; + +$resultado = mysqli_stmt_get_result($stmt); + +if (!$resultado) { + die("Error al obtener el resultado: " . mysqli_error($conn)); +} +$usuario = mysqli_fetch_assoc($resultado); +$usuario = $usuario ?: [ + 'nombre' => '', + 'correo' => '', + 'telefono' => '' +]; + +mysqli_stmt_close($stmt); + ?> From cda64fef36f251fc5d82a87a38f46c5872dd030e Mon Sep 17 00:00:00 2001 From: gchambillala Date: Sun, 6 Jul 2025 10:26:56 -0500 Subject: [PATCH 18/52] Mejora en backend para consulta de usuario 1 --- PAGINA WEB/perfil.php | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/PAGINA WEB/perfil.php b/PAGINA WEB/perfil.php index 519986c..8aa71f3 100644 --- a/PAGINA WEB/perfil.php +++ b/PAGINA WEB/perfil.php @@ -1,20 +1,36 @@ '', 'correo' => '', 'telefono' => '']; +$usuario = mysqli_fetch_assoc($resultado); +$usuario = $usuario ?: [ + 'nombre' => '', + 'correo' => '', + 'telefono' => '' +]; + +mysqli_stmt_close($stmt); ?> From 46681ac38e343c06a633c004c410fdb22d7f5a44 Mon Sep 17 00:00:00 2001 From: gchambillala Date: Sun, 6 Jul 2025 10:40:33 -0500 Subject: [PATCH 19/52] Comentario para error SQL --- PAGINA WEB/perfil.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PAGINA WEB/perfil.php b/PAGINA WEB/perfil.php index 519986c..573e606 100644 --- a/PAGINA WEB/perfil.php +++ b/PAGINA WEB/perfil.php @@ -11,7 +11,7 @@ $result = mysqli_stmt_get_result($stmt); if (!$result) { - die("Error en la consulta SQL: " . mysqli_error($conn)); + die("Error en la consulta SQL: " . mysqli_error($conn)); //Error para saber el error } $usuario = mysqli_fetch_assoc($result) ?? ['nombre' => '', 'correo' => '', 'telefono' => '']; From c15bff15579b7156bb08a5baf36738792bd63e5f Mon Sep 17 00:00:00 2001 From: mvilcaqui Date: Sun, 6 Jul 2025 16:07:39 -0500 Subject: [PATCH 20/52] Version 1.0.0 incluye modulo perfil --- PAGINA WEB/conexion.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PAGINA WEB/conexion.php b/PAGINA WEB/conexion.php index d295c5d..4056005 100644 --- a/PAGINA WEB/conexion.php +++ b/PAGINA WEB/conexion.php @@ -1,7 +1,7 @@ Date: Sat, 12 Jul 2025 10:49:00 -0500 Subject: [PATCH 21/52] Separacion de codigo css en otro archivos y creacion de carpeta --- NEWPAGE/asistencia.html | 0 NEWPAGE/cambios.css | 850 ++++++++++++++++++++++ NEWPAGE/cambios.html | 1529 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 2379 insertions(+) create mode 100644 NEWPAGE/asistencia.html create mode 100644 NEWPAGE/cambios.css create mode 100644 NEWPAGE/cambios.html diff --git a/NEWPAGE/asistencia.html b/NEWPAGE/asistencia.html new file mode 100644 index 0000000..e69de29 diff --git a/NEWPAGE/cambios.css b/NEWPAGE/cambios.css new file mode 100644 index 0000000..5c37593 --- /dev/null +++ b/NEWPAGE/cambios.css @@ -0,0 +1,850 @@ +:root { + --primary: #2c3e50; + --secondary: #3498db; + --accent: #ff9900; + --light: #ecf0f1; + --dark: #2c3e50; + --success: #2ecc71; + --warning: #f39c12; + --info: #1abc9c; + --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); + --transition: all 0.3s ease; +} + +body { + font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; + margin: 0; + background-color: #f5f7fa; + color: #333; + display: flex; + flex-direction: column; + min-height: 100vh; +} + +/* Formulario de registro de estudiantes */ +.form-container { + background-color: #ffffff; + padding: 30px; + border-radius: 8px; + box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); + margin-bottom: 30px; +} + +.form-container h3 { + margin-bottom: 20px; +} + +/* Navbar superior */ +.navbar { + background: linear-gradient(135deg, var(--primary) 0%, #1a2a3a 100%); + box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); + z-index: 1030; + padding: 12px 25px; + height: 70px; + position: fixed; + top: 0; + left: 0; + right: 0; +} + +.navbar-brand { + font-weight: 100; + font-size: 1.8rem; + letter-spacing: 1px; + color: white !important; + display: flex; + align-items: center; +} + +.navbar-brand i { + margin-right: 10px; + color: var(--accent); +} + +/* Sidebar izquierdo */ +.sidebar { + width: 250px; + background: linear-gradient(180deg, var(--primary) 0%, #1a2a3a 100%); + position: fixed; + top: 70px; + bottom: 0; + left: 0; + box-shadow: 3px 0 15px rgba(0, 0, 0, 0.1); + transition: var(--transition); + z-index: 1020; + overflow-y: auto; +} + +.sidebar h2 { + margin: 20px 0; + font-size: 1.4rem; + text-align: center; + color: var(--light); + padding: 15px 0; + border-bottom: 1px solid rgba(255, 255, 255, 0.15); + font-weight: 600; +} + +.sidebar .menu { + padding: 0; +} + +.sidebar .menu li { + overflow: hidden; +} + +.sidebar .menu li a, +.sidebar .menu li summary { + color: var(--light); + text-decoration: none; + font-size: 1rem; + padding: 14px 20px; + display: block; + transition: var(--transition); + border-left: 4px solid transparent; + font-weight: 500; + padding-left: 18px !important; +} + +.sidebar .menu li a:hover, +.sidebar .menu li summary:hover, +.sidebar .menu li a.active { + background-color: rgba(255, 255, 255, 0.1); + border-left-color: var(--accent); +} + +.sidebar .menu li a i, +.sidebar .menu li summary i { + width: 25px; + text-align: center; + margin-right: 12px; + font-size: 1.1rem; +} + +.sidebar .submenu { + background-color: rgba(0, 0, 0, 0.15); + padding: 0; +} + +.sidebar .submenu li a { + font-size: 0.95rem; +} + +.sidebar .submenu li a:hover { + background-color: rgba(255, 255, 255, 0.08); +} + +/* Panel de contenido principal */ +.main-content { + margin-left: 250px; + margin-top: 70px; + padding: 30px; + flex: 1; + transition: var(--transition); +} + +.suboption-panel { + display: flex; + flex-direction: column; + height: 100%; +} + +/* Secciones de contenido */ +.dashboard, +.gestion-estudiante, +.gestion-docente, +.gestion-curso, +.reporte, +.configuracion { + display: none; +} + +.dashboard { + display: block; +} + +/* Títulos de sección */ +.section-title { + font-size: 1.8rem; + font-weight: 700; + margin-bottom: 30px; + color: var(--primary); + position: relative; +} + +/* Tarjetas */ +.dashboard-cards { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); + gap: 25px; + margin-bottom: 40px; +} + +.card { + background: white; + border: none; + border-radius: 12px; + padding: 25px; + box-shadow: var(--card-shadow); + transition: var(--transition); + position: relative; + overflow: hidden; +} + +.card:hover { + box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15); +} + +.card::before { + content: ''; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 5px; + background: var(--accent); +} + +.card h3 { + font-size: 1.1rem; + margin-bottom: 15px; + color: #555; + font-weight: 600; +} + +.card p { + font-size: 2.3rem; + font-weight: 700; + color: var(--secondary); + margin: 0; +} + +.card small { + display: block; + color: #777; + font-size: 0.95rem; + margin-top: 5px; +} + +/* Gráficos */ +.dashboard-charts { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); + gap: 30px; + margin-bottom: 40px; +} + +.chart-container { + background: white; + border: none; + border-radius: 12px; + padding: 25px; + box-shadow: var(--card-shadow); +} + +.chart-container h4 { + font-size: 1.25rem; + margin-bottom: 25px; + color: var(--primary); + display: flex; + align-items: center; + gap: 10px; + font-weight: 600; +} + +.chart-container h4 i { + color: var(--accent); + background: rgba(231, 76, 60, 0.1); + width: 40px; + height: 40px; + border-radius: 50%; + display: inline-flex; + align-items: center; + justify-content: center; +} + +/* Tablas y actividades */ +.recent-activities { + background: white; + border-radius: 12px; + padding: 25px; + box-shadow: var(--card-shadow); +} + +.recent-activities h3 { + font-size: 1.35rem; + margin-bottom: 25px; + color: var(--primary); + display: flex; + align-items: center; + gap: 10px; + font-weight: 600; +} + +.recent-activities h3 i { + color: var(--accent); + background: rgba(231, 76, 60, 0.1); + width: 40px; + height: 40px; + border-radius: 50%; + display: inline-flex; + align-items: center; + justify-content: center; +} + +/* Botones personalizados */ +.btn-custom { + padding: 10px 25px; + background: linear-gradient(135deg, var(--secondary) 0%, #2980b9 100%); + color: white; + border: none; + border-radius: 8px; + cursor: pointer; + transition: var(--transition); + font-weight: 500; +} + +.btn-custom:hover { + background: linear-gradient(135deg, #2980b9 0%, #1a5a8a 100%); + background-color: #0056b3; + color: #fff; +} + +.dataTables_length { + padding: 5px 10px; +} + +/* Responsividad */ +@media (max-width: 1200px) { + .dashboard-charts { + grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); + } +} + +/* Nuevos estilos para el navbar */ +.navbar-icons { + display: flex; + align-items: center; + gap: 15px; + margin-right: 20px; +} + +.notification-icon, +.chat-icon { + position: relative; + color: white; + font-size: 1.2rem; + cursor: pointer; + transition: var(--transition); +} + +.notification-icon:hover, +.chat-icon:hover { + color: var(--accent); +} + +.notification-badge { + position: absolute; + top: -5px; + right: -8px; + background-color: var(--accent); + color: white; + border-radius: 50%; + width: 18px; + height: 18px; + font-size: 0.7rem; + display: flex; + align-items: center; + justify-content: center; +} + +/* Perfil de usuario en sidebar */ +.profile-section { + padding: 20px 15px; + text-align: center; + border-bottom: 1px solid rgba(255, 255, 255, 0.15); +} + +.profile-img { + width: 80px; + height: 80px; + border-radius: 50%; + object-fit: cover; + border: 3px solid var(--accent); + margin-bottom: 15px; +} + +.profile-name { + color: var(--light); + font-size: 1.1rem; + margin-bottom: 5px; + font-weight: 600; +} + +.profile-role { + color: var(--accent); + font-size: 0.9rem; + margin-bottom: 0; +} + +/* Ajuste para acomodar el perfil */ +.sidebar h2 { + margin: 10px 0; +} + +/* Otros ajustes menores */ +.navbar-brand { + font-size: 1.6rem; + /* Ligeramente más pequeño */ +} + +.config-container { + max-width: 1400px; + margin: 0 auto; + padding: 20px; +} + +.config-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 30px; + padding-bottom: 15px; + border-bottom: 2px solid var(--primary); +} + +.config-card { + background: white; + border-radius: 12px; + box-shadow: var(--card-shadow); + margin-bottom: 25px; + height: 100%; + transition: var(--transition); + overflow: hidden; +} + +.card-header { + padding: 18px 25px; + font-weight: 600; + display: flex; + align-items: center; + gap: 12px; +} + +.card-body { + padding: 25px; +} + +.config-card:hover { + box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15); +} + +.form-control-lg { + border-radius: 8px; + border: 1px solid #ddd; +} + +.form-control-lg:focus { + border-color: var(--secondary); + box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.25); +} + +.btn-lg { + padding: 12px 25px; + border-radius: 8px; + font-weight: 500; + transition: var(--transition); +} + +.btn-info { + background: linear-gradient(135deg, var(--info) 0%, #16a085 100%); + border: none; + color: white; +} + +.btn-info:hover { + background: linear-gradient(135deg, #16a085 0%, #138a72 100%); +} + +.btn-warning { + background: linear-gradient(135deg, var(--warning) 0%, #e67e22 100%); + border: none; + color: white; +} + +.btn-warning:hover { + background: linear-gradient(135deg, #e67e22 0%, #d35400 100%); +} + +.btn-primary { + background: linear-gradient(135deg, var(--primary) 0%, #1a2a3a 100%); + border: none; + color: white; +} + +.btn-primary:hover { + background: linear-gradient(135deg, #1a2a3a 0%, #0e1a25 100%); +} + +.btn-secondary { + background: linear-gradient(135deg, var(--secondary) 0%, #2980b9 100%); + border: none; + color: white; +} + +.btn-secondary:hover { + background: linear-gradient(135deg, #2980b9 0%, #1a5a8a 100%); +} + +.progress { + height: 10px; + border-radius: 5px; +} + +.progress-bar { + background: var(--secondary); +} + +.config-row { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 20px; + margin-bottom: 30px; +} + +.system-card { + grid-column: span 3; +} + +.toggle-switch { + position: relative; + display: inline-block; + width: 60px; + height: 30px; +} + +.toggle-switch input { + opacity: 0; + width: 0; + height: 0; +} + +.slider { + position: absolute; + cursor: pointer; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: #ccc; + transition: .4s; + border-radius: 34px; +} + +.slider:before { + position: absolute; + content: ""; + height: 22px; + width: 22px; + left: 4px; + bottom: 4px; + background-color: white; + transition: .4s; + border-radius: 50%; +} + +input:checked+.slider { + background-color: var(--success); +} + +input:checked+.slider:before { + transform: translateX(30px); +} + +.switch-container { + display: flex; + justify-content: space-between; + align-items: center; + padding: 15px 0; + border-bottom: 1px solid #eee; +} + +.switch-label { + flex: 1; +} + +.system-metric { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 15px; + padding: 12px; + background: #f8f9fa; + border-radius: 8px; +} + +.metric-label { + font-weight: 500; +} + +.metric-value { + font-weight: 600; + color: var(--primary); +} + +.theme-selector { + border: 2px solid transparent; + border-radius: 10px; + padding: 20px; + text-align: center; + cursor: pointer; + transition: var(--transition); +} + +.theme-selector:hover, +.theme-selector.active { + border-color: var(--accent); + background: rgba(255, 153, 0, 0.05); +} + +.theme-selector i { + font-size: 2.5rem; + margin-bottom: 15px; +} + +.status-badge { + display: inline-block; + padding: 5px 12px; + border-radius: 20px; + font-size: 0.85rem; + font-weight: 500; +} + +.status-active { + background: rgba(46, 204, 113, 0.15); + color: var(--success); +} + +.status-warning { + background: rgba(243, 156, 18, 0.15); + color: var(--warning); +} + +.card-title { + font-size: 1.25rem; + font-weight: 600; + margin-bottom: 15px; + color: var(--primary); +} + +.card-subtitle { + color: #777; + margin-bottom: 20px; +} + +/* Estilos para modo oscuro */ +body.theme-dark { + background-color: #18191a; + color: #e4e6eb; +} + +body.theme-dark .navbar { + background: linear-gradient(135deg, #242526 0%, #18191a 100%); +} + +body.theme-dark .sidebar { + background: linear-gradient(180deg, #242526 0%, #18191a 100%); +} + +body.theme-dark .card, +body.theme-dark .chart-container, +body.theme-dark .recent-activities, +body.theme-dark .form-container, +body.theme-dark .config-card { + background-color: #242526; + color: #e4e6eb; + border: 1px solid #3a3b3c; +} + +body.theme-dark .table { + color: #e4e6eb; +} + +body.theme-dark .table thead { + background-color: #3a3b3c; +} + +body.theme-dark .table-hover tbody tr:hover { + background-color: #3a3b3c; + color: #e4e6eb; +} + +body.theme-dark .section-title { + color: #e4e6eb; +} + +body.theme-dark .card h3, +body.theme-dark .card p, +body.theme-dark .card small { + color: #e4e6eb; +} + +body.theme-dark .card small { + color: #b0b3b8; +} + +body.theme-dark .form-control, +body.theme-dark .form-select { + background-color: #3a3b3c; + color: #e4e6eb; + border: 1px solid #3a3b3c; +} + +body.theme-dark .form-control:focus, +body.theme-dark .form-select:focus { + background-color: #3a3b3c; + color: #e4e6eb; + border-color: #4a4b4c; + box-shadow: 0 0 0 0.25rem rgba(65, 66, 68, 0.25); +} + +body.theme-dark .dropdown-menu { + background-color: #242526; + border: 1px solid #3a3b3c; +} + +body.theme-dark .dropdown-item { + color: #e4e6eb; +} + +body.theme-dark .dropdown-item:hover { + background-color: #3a3b3c; + color: #e4e6eb; +} + +body.theme-dark .progress { + background-color: #3a3b3c; +} + +body.theme-dark .dt-buttons .btn { + background-color: #3a3b3c !important; + color: #e4e6eb !important; + border: 1px solid #4a4b4c !important; +} + +body.theme-dark .config-card .card-header { + color: #e4e6eb; +} + +body.theme-dark .switch-label h6, +body.theme-dark .metric-label, +body.theme-dark .metric-value { + color: #e4e6eb; +} + +body.theme-dark .form-control-color { + background-color: #3a3b3c; +} + +body.theme-dark { + --light: #e4e6eb; + --dark: #b0b3b8; +} + +#theme-toggle i { + transition: color 0.3s ease; +} + +@media (max-width: 1200px) { + .config-row { + grid-template-columns: repeat(2, 1fr); + } + + .system-card { + grid-column: span 2; + } +} + +@media (max-width: 992px) { + .sidebar { + width: 70px; + } + + .sidebar h2 span, + .sidebar .menu li a span, + .sidebar .menu li summary span { + display: none; + } + + .sidebar h2 { + font-size: 1.8rem; + padding: 15px 0; + } + + .sidebar .menu li a, + .sidebar .menu li summary { + text-align: center; + padding: 15px 10px; + } + + .sidebar .menu li a i, + .sidebar .menu li summary i { + margin-right: 0; + font-size: 1.4rem; + display: block; + margin: 0 auto 5px; + } + + .sidebar .submenu { + position: absolute; + left: 70px; + width: 200px; + display: none; + } + + .sidebar .menu li details[open] .submenu { + display: block; + } + + .main-content { + margin-left: 70px; + } + + .dashboard-charts { + grid-template-columns: 1fr; + } +} + +@media (max-width: 768px) { + .main-content { + padding: 20px; + } + + .dashboard-cards { + grid-template-columns: 1fr; + } + + .config-row { + grid-template-columns: 1fr; + } + + .system-card { + grid-column: span 1; + } + + .config-header { + flex-direction: column; + align-items: flex-start; + gap: 15px; + } +} + +@media (max-width: 576px) { + .navbar { + padding: 10px 15px; + } + + .navbar-brand { + font-size: 1.5rem; + } +} \ No newline at end of file diff --git a/NEWPAGE/cambios.html b/NEWPAGE/cambios.html new file mode 100644 index 0000000..78aff6a --- /dev/null +++ b/NEWPAGE/cambios.html @@ -0,0 +1,1529 @@ + + + + + + PRODIGIOS - Academia de Música + + + + + + + + + + + + + + + + +
    +
    + + +
    +

    Panel de Control

    +
    +
    +

    Estudiantes Registrados

    +

    0

    + Total en el sistema +
    +
    +

    Docentes Activos

    +

    0

    + Enseñando actualmente +
    +
    +

    Cursos Disponibles

    +

    0

    + Ofertados este semestre +
    +
    +

    Clases Esta Semana

    +

    42

    + Programadas +
    +
    + +
    +
    +

    Distribución por Niveles

    + +
    +
    +

    Cursos por Categoría

    + +
    +
    +

    Estudiantes por Curso

    + +
    +
    + +
    +

    Actividades Recientes

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FechaDescripciónUsuario
    2023-11-15Nuevo estudiante registrado: María RodríguezAdmin
    2023-11-14Curso de Piano Avanzado creadoAdmin
    2023-11-13Pago registrado: Carlos MendozaAdmin
    2023-11-12Actualización de horariosAdmin
    2023-11-10Nueva docente: Laura MéndezAdmin
    +
    +
    +
    + + +
    + +
    +

    Registrar Nuevo Estudiante

    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + +
    IDNombreDNIFecha Nac.DirecciónContactoCursoNivelHorarioEstadoAcciones
    +
    + + +
    +
    +

    Registrar Nuevo Docente

    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + +
    + + + + + + + + + + + + + + + + + + +
    IDNombresDNIFecha Nac.EspecialidadGrado AcadémicoExperienciaHorarioContactoSalarioAcciones
    +
    + + +
    +
    +

    Registrar Nuevo Curso

    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + +
    IDNombresDescripciónDuraciónNivelHorarioDocenteN° de PlazasCostoMaterialAcciones
    +
    + + + + + + +
    +
    + + + + + + + + + + + + + + \ No newline at end of file From e36a8e67739dfdb368c807dbc5cbd5e444be0270 Mon Sep 17 00:00:00 2001 From: gchambillaala Date: Sat, 12 Jul 2025 10:52:07 -0500 Subject: [PATCH 22/52] Separacion codigo js --- NEWPAGE/cambios.html | 815 +------------------------------------------ NEWPAGE/cambios.js | 813 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 814 insertions(+), 814 deletions(-) create mode 100644 NEWPAGE/cambios.js diff --git a/NEWPAGE/cambios.html b/NEWPAGE/cambios.html index 78aff6a..07079aa 100644 --- a/NEWPAGE/cambios.html +++ b/NEWPAGE/cambios.html @@ -711,819 +711,6 @@
    Memoria
    - + \ No newline at end of file diff --git a/NEWPAGE/cambios.js b/NEWPAGE/cambios.js new file mode 100644 index 0000000..ba4f73f --- /dev/null +++ b/NEWPAGE/cambios.js @@ -0,0 +1,813 @@ + +let nivelEstudiantesChart; +let categoriaCursosChart; +let estudiantesPorCursoChart; + +let nextIds = { estudiantes: 1, docentes: 1, cursos: 1 }; + +let editingInfo = { tipo: null, id: null }; + +// Estado de la aplicación +const state = { + estudiantes: [], + docentes: [], + cursos: [], + actividades: [] +}; + +// Inicialización +document.addEventListener('DOMContentLoaded', () => { + initCharts(); + + initializeDataTable(); + initializeDataTableDocente(); + initializeDataTableCurso(); + + updateCounters(); + updateCharts(); + initEventListeners(); + + loadTheme(); + document.getElementById('theme-toggle').addEventListener('click', toggleTheme); +}); + + +const registrarBtn = document.getElementById('registrar'); +const registrarBtnDocente = document.getElementById('registrarDocente'); +const registrarBtnCurso = document.getElementById('registrarCurso'); + +// Funciones auxiliares +function updateStateFromTable(type) { + + const tableId = type === 'docentes' ? '#tablaDinamicaDocente' : + type === 'cursos' ? '#tablaDinamicaCurso' : '#tablaDinamica'; + + if ($.fn.DataTable.isDataTable(tableId)) { + const table = $(tableId).DataTable(); + state[type] = table.rows().data().map(row => ({ + id: parseInt(row[0]), + nombre: row[1], + dni: row[2], + fecha_nacimiento: row[3], + direccion: row[4], + contacto: row[5], + curso: row[6], + nivel: row[7], + horario: row[8], + estado: row[9] + })).toArray(); + } +} + +// FUNCIÓN updateCharts +function updateCharts() { + // 1. Distribución por niveles + const niveles = { Principiante: 0, Intermedio: 0, Avanzado: 0 }; + const estudiantesPorCurso = {}; + + // Verificar SI EXISTE la tabla de estudiantes + if ($.fn.DataTable.isDataTable('#tablaDinamica')) { + const studentTable = $('#tablaDinamica').DataTable(); + const studentRows = studentTable.rows().data().toArray(); + + studentRows.forEach(row => { + const nivel = row[7]; + const curso = row[6]; + + // Contar niveles + if (nivel) niveles[nivel]++; + + // Contar cursos (dinámico) + if (curso) { + if (!estudiantesPorCurso[curso]) { + estudiantesPorCurso[curso] = 0; + } + estudiantesPorCurso[curso]++; + } + }); + } + + // 2. Actualizar gráfica de niveles + if (nivelEstudiantesChart) { + nivelEstudiantesChart.data.datasets[0].data = Object.values(niveles); + nivelEstudiantesChart.update(); + } + + // 3. Actualizar gráfica de estudiantes por curso (CORREGIDO) + if (estudiantesPorCursoChart) { + // Actualizar etiquetas Y datos + estudiantesPorCursoChart.data.labels = Object.keys(estudiantesPorCurso); + estudiantesPorCursoChart.data.datasets[0].data = Object.values(estudiantesPorCurso); + estudiantesPorCursoChart.update(); + } + + // 4. Cursos por categoría + + const cursosPorCategoria = {}; + + // Verificar SI EXISTE la tabla de cursos + if ($.fn.DataTable.isDataTable('#tablaDinamicaCurso')) { + const courseTable = $('#tablaDinamicaCurso').DataTable(); + const courseRows = courseTable.rows().data().toArray(); + + courseRows.forEach(row => { + const categoria = row[1]; + if (categoria) { + if (!cursosPorCategoria[categoria]) { + cursosPorCategoria[categoria] = 0; + } + cursosPorCategoria[categoria]++; + } + }); + } + + // 5. Actualizar gráfica de cursos + if (categoriaCursosChart) { + // Actualizar etiquetas Y datos + categoriaCursosChart.data.labels = Object.keys(cursosPorCategoria); + categoriaCursosChart.data.datasets[0].data = Object.values(cursosPorCategoria); + categoriaCursosChart.update(); + } +} + +function initializeDataTable() { + if ($.fn.DataTable.isDataTable('#tablaDinamica')) $('#tablaDinamica').DataTable().destroy(); + + $('#tablaDinamica').DataTable({ + dom: 'Blfrtip', + buttons: [ + { + extend: "excelHtml5", + text: "", + titleAttr: "Exportar a Excel", + className: "btn btn-success", + exportOptions: { + columns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + } + }, + { + extend: "pdfHtml5", + text: "", + titleAttr: "Esportar a PDF", + className: "btn btn-danger", + exportOptions: { + columns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + } + }, + { + extend: "print", + text: "", + titleAttr: "Imprimir", + className: "btn btn-info", + exportOptions: { + columns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + }, + }, + ], + language: { + url: "https://cdn.datatables.net/plug-ins/1.13.6/i18n/es-ES.json" + }, + lengthMenu: [3, 6, 9, 12], + columnDefs: [ + { orderable: false, targets: [10] }, + { searchable: false, targets: [10] }, + { width: "10%", targets: [5] }, + { targets: -1 }, + { data: null }, + ], + pageLength: 5, + }); +} + +registrarBtn.addEventListener('click', function () { + const nombre = document.getElementById('nombre').value; + const dni = document.getElementById('dni').value; + const fecha_nacimiento = document.getElementById('fecha_nacimiento').value; + const direccion = document.getElementById('direccion').value; + const contacto = document.getElementById('contacto').value; + const curso = document.getElementById('curso').value; + const nivel = document.getElementById('nivel').value; + const horario = document.getElementById('horario').value; + const estado = document.getElementById('estado').value; + + if (nombre && dni && fecha_nacimiento && direccion && contacto && curso && nivel && horario && estado) { + const table = $('#tablaDinamica').DataTable(); + if (editingInfo.tipo === 'estudiante' && editingInfo.id !== null) { + // Actualizar estudiante existente + table.rows().every(function () { + const data = this.data(); + if (parseInt(data[0]) === editingInfo.id) { + this.data([editingInfo.id, nombre, dni, fecha_nacimiento, direccion, contacto, curso, nivel, horario, estado, + ' ' + ]); + } + }); + } else { + table.row.add([nextIds.estudiantes++, nombre, dni, fecha_nacimiento, direccion, contacto, curso, nivel, horario, estado, + ' ']).draw(); + } + + document.getElementById('nombre').value = ''; + document.getElementById('dni').value = ''; + document.getElementById('fecha_nacimiento').value = ''; + document.getElementById('direccion').value = ''; + document.getElementById('contacto').value = ''; + document.getElementById('curso').value = ''; + document.getElementById('nivel').value = ''; + document.getElementById('horario').value = ''; + document.getElementById('estado').value = ''; + + // Resetear estado + editingInfo = { tipo: null, id: null }; + $('#registrar').text('Registrar Estudiante'); + + } else { + alert("Por favor, complete todos los campos antes de registrar."); + } + + updateAll(); +}); + +$('#tablaDinamica').on('click', '.btn-edit', function () { + const row = $(this).closest('tr'); + const data = $('#tablaDinamica').DataTable().row(row).data(); + editingInfo = { tipo: 'estudiante', id: parseInt(data[0]) }; + document.getElementById('nombre').value = data[1]; + document.getElementById('dni').value = data[2]; + document.getElementById('fecha_nacimiento').value = data[3]; + document.getElementById('direccion').value = data[4]; + document.getElementById('contacto').value = data[5]; + document.getElementById('curso').value = data[6]; + document.getElementById('nivel').value = data[7]; + document.getElementById('horario').value = data[8]; + document.getElementById('estado').value = data[9]; + $('#registrar').text('Actualizar'); + updateAll(); +}); +$('#tablaDinamica').on('click', '.btn-delete', function () { + const row = $(this).closest('tr'); + $('#tablaDinamica').DataTable().row(row).remove().draw(); + updateAll(); +}); + +function initializeDataTableDocente() { + if ($.fn.DataTable.isDataTable('#tablaDinamicaDocente')) { + $('#tablaDinamicaDocente').DataTable().destroy(); + } + + $('#tablaDinamicaDocente').DataTable({ + dom: 'Blfrtip', + buttons: [ + { + extend: "excelHtml5", + text: "", + titleAttr: "Exportar a Excel", + className: "btn btn-success", + exportOptions: { + columns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + } + }, + { + extend: "pdfHtml5", + text: "", + titleAttr: "Exportar a PDF", + className: "btn btn-danger", + exportOptions: { + columns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + } + }, + { + extend: "print", + text: "", + titleAttr: "Imprimir", + className: "btn btn-info", + exportOptions: { + columns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + } + } + ], + language: { + url: "https://cdn.datatables.net/plug-ins/1.13.6/i18n/es-ES.json" + }, + lengthMenu: [3, 6, 9, 12], + columnDefs: [ + { orderable: false, targets: [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] }, // Deshabilitar ordenación en la última columna (Acciones) + { searchable: false, targets: -1 }, // Deshabilitar búsqueda en la última columna + { width: "10%", target: [6] } + ], + pageLength: 5, + }); +} + +registrarBtnDocente.addEventListener('click', function () { + const nombre = document.getElementById('nombreDocente').value; + const dni = document.getElementById('dniDocente').value; + const fechaNac = document.getElementById('fechaNacDocente').value; + const especialidad = document.getElementById('especialidadDocente').value; + const grado = document.getElementById('gradoDocente').value; + const experiencia = document.getElementById('experienciaDocente').value; + const horario = document.getElementById('horarioDocente').value; + const contacto = document.getElementById('contactoDocente').value; + const salario = document.getElementById('salarioDocente').value; + + if (nombre && dni && fechaNac && especialidad && grado && experiencia && horario && contacto && salario) { + const table = $('#tablaDinamicaDocente').DataTable(); + if (editingInfo.tipo === 'docente' && editingInfo.id !== null) { + // Actualizar la fila por ID + table.rows().every(function (rowIdx, tableLoop, rowLoop) { + const data = this.data(); + if (parseInt(data[0]) === editingInfo.id) { + this.data([ + editingInfo.id, nombre, dni, fechaNac, especialidad, grado, experiencia, horario, contacto, salario, + ' ' + ]); + } + }); + } else { + table.row.add([ + nextIds.docentes++, nombre, dni, fechaNac, especialidad, grado, experiencia, horario, contacto, salario, + ' ' + ]).draw(); + } + + document.getElementById('nombreDocente').value = ''; + document.getElementById('dniDocente').value = ''; + document.getElementById('fechaNacDocente').value = ''; + document.getElementById('especialidadDocente').value = ''; + document.getElementById('gradoDocente').value = ''; + document.getElementById('experienciaDocente').value = ''; + document.getElementById('horarioDocente').value = ''; + document.getElementById('contactoDocente').value = ''; + document.getElementById('salarioDocente').value = ''; + editingInfo = { tipo: null, id: null }; + $('#registrarDocente').text('Registrar Docente'); + + } else { + alert("Por favor, complete todos los campos antes de registrar."); + } + updateAll(); +}); + +$('#tablaDinamicaDocente').on('click', '.btn-edit', function () { + const row = $(this).closest('tr'); + const data = $('#tablaDinamicaDocente').DataTable().row(row).data(); + editingInfo = { tipo: 'docente', id: parseInt(data[0]) }; + document.getElementById('nombreDocente').value = data[1]; + document.getElementById('dniDocente').value = data[2]; + document.getElementById('fechaNacDocente').value = data[3]; + document.getElementById('especialidadDocente').value = data[4]; + document.getElementById('gradoDocente').value = data[5]; + document.getElementById('experienciaDocente').value = data[6]; + document.getElementById('horarioDocente').value = data[7]; + document.getElementById('contactoDocente').value = data[8]; + document.getElementById('salarioDocente').value = data[9]; + $('#registrarDocente').text('Actualizar'); + updateAll(); +}); +$('#tablaDinamicaDocente').on('click', '.btn-delete', function () { + const row = $(this).closest('tr'); + $('#tablaDinamicaDocente').DataTable().row(row).remove().draw(); + updateAll(); +}); + +function initializeDataTableCurso() { + if ($.fn.DataTable.isDataTable('#tablaDinamicaCurso')) { + $('#tablaDinamicaCurso').DataTable().destroy(); + } + + $('#tablaDinamicaCurso').DataTable({ + dom: 'Blfrtip', + buttons: [ + { + extend: "excelHtml5", + text: "", + titleAttr: "Exportar a Excel", + className: "btn btn-success", + exportOptions: { + columns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + } + }, + { + extend: "pdfHtml5", + text: "", + titleAttr: "Esportar a PDF", + className: "btn btn-danger", + exportOptions: { + columns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + } + }, + { + extend: "print", + text: "", + titleAttr: "Imprimir", + className: "btn btn-info", + exportOptions: { + columns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + } + } + ], + language: { + url: "https://cdn.datatables.net/plug-ins/1.13.6/i18n/es-ES.json" + }, + lengthMenu: [3, 6, 9, 12], + columnDefs: [ + { orderable: false, targets: [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] }, + { searchable: false, targets: -1 }, + { width: "1%", targets: [5] }, + { targets: -1 }, + { data: null } + ], + pageLength: 5 + }); +}; + +registrarBtnCurso.addEventListener('click', function () { + const nombreCurso = document.getElementById('nombreCurso').value; + const descripcionCurso = document.getElementById('descripcionCurso').value; + const duracionCurso = document.getElementById('duracionCurso').value; + const nivelCurso = document.getElementById('nivelCurso').value; + const horarioCurso = document.getElementById('horarioCurso').value; + const docenteCurso = document.getElementById('docenteCurso').value; + const numPlazaCurso = document.getElementById('numPlazaCurso').value; + const costoCurso = document.getElementById('costoCurso').value; + const materialCurso = document.getElementById('materialCurso').value; + if (nombreCurso && descripcionCurso && duracionCurso && nivelCurso && horarioCurso && docenteCurso && numPlazaCurso && costoCurso && materialCurso) { + const table = $('#tablaDinamicaCurso').DataTable(); + if (editingInfo.tipo === 'curso' && editingInfo.id !== null) { + // Actualizar la fila por ID + table.rows().every(function (rowIdx, tableLoop, rowLoop) { + const data = this.data(); + if (parseInt(data[0]) === editingInfo.id) { + this.data([editingInfo.id, nombreCurso, descripcionCurso, duracionCurso, nivelCurso, horarioCurso, docenteCurso, numPlazaCurso, costoCurso, materialCurso, + ' ']); + } + }); + } else { + table.row.add([nextIds.cursos++, nombreCurso, descripcionCurso, duracionCurso, nivelCurso, horarioCurso, docenteCurso, numPlazaCurso, costoCurso, materialCurso, + ' ']).draw(); + } + document.getElementById('nombreCurso').value = ''; + document.getElementById('descripcionCurso').value = ''; + document.getElementById('duracionCurso').value = ''; + document.getElementById('nivelCurso').value = ''; + document.getElementById('horarioCurso').value = ''; + document.getElementById('docenteCurso').value = ''; + document.getElementById('numPlazaCurso').value = ''; + document.getElementById('costoCurso').value = ''; + document.getElementById('materialCurso').value = ''; + editingInfo = { tipo: null, id: null }; + $('#registrarCurso').text('Registrar Curso'); + } else { + alert('Por favor, complete todos los campos antes de registrar.'); + } + updateAll(); +}); + +$('#tablaDinamicaCurso').on('click', '.btn-edit', function () { + const row = $(this).closest('tr'); + const data = $('#tablaDinamicaCurso').DataTable().row(row).data(); + editingInfo = { tipo: 'curso', id: parseInt(data[0]) }; + document.getElementById('nombreCurso').value = data[1]; + document.getElementById('descripcionCurso').value = data[2]; + document.getElementById('duracionCurso').value = data[3]; + document.getElementById('nivelCurso').value = data[4]; + document.getElementById('horarioCurso').value = data[5]; + document.getElementById('docenteCurso').value = data[6]; + document.getElementById('numPlazaCurso').value = data[7]; + document.getElementById('costoCurso').value = data[8]; + document.getElementById('materialCurso').value = data[9]; + $('#registrarCurso').text('Actualizar'); + updateAll(); +}); +$('#tablaDinamicaCurso').on('click', '.btn-delete', function () { + const row = $(this).closest('tr'); + $('#tablaDinamicaCurso').DataTable().row(row).remove().draw(); + updateAll(); +}); + +function initEventListeners() { + // Event listener para logout + document.getElementById('logoutBtn').addEventListener('click', function () { + localStorage.removeItem('loggedIn'); + window.location.href = 'index.html'; + }); + + // Event listeners para menú + document.querySelectorAll('.sidebar a').forEach(link => { + link.addEventListener('click', function () { + document.querySelectorAll('.sidebar a').forEach(el => el.classList.remove('active')); + this.classList.add('active'); + }); + }); +} + +function updateCounters() { + let totalEst = 0; + if ($.fn.DataTable.isDataTable('#tablaDinamica')) { + totalEst = $('#tablaDinamica').DataTable().rows().count(); + } + document.getElementById('total-estudiantes').textContent = totalEst; + + let totalDoc = 0; + if ($.fn.DataTable.isDataTable('#tablaDinamicaDocente')) { + totalDoc = $('#tablaDinamicaDocente').DataTable().rows().count(); + } + document.getElementById('total-docentes').textContent = totalDoc; + + let totalCur = 0; + if ($.fn.DataTable.isDataTable('#tablaDinamicaCurso')) { + totalCur = $('#tablaDinamicaCurso').DataTable().rows().count(); + } + document.getElementById('total-cursos').textContent = totalCur; +} + + +function toggleVisibility(mainOption, subOption, title) { + // Ocultar todas las secciones + document.querySelectorAll('.suboption-panel > div').forEach(div => { + div.style.display = 'none'; + }); + + // Mostrar la sección seleccionada + if (mainOption) { + const section = document.querySelector(`.${mainOption.toLowerCase()}`); + if (section) section.style.display = 'block'; + } + + if (subOption) { + const section = document.querySelector(`.gestion-${subOption}`); + if (section) section.style.display = 'block'; + } + + // Actualizar título + if (title) document.querySelector('.navbar-brand').innerHTML = `${title}`; + + // Inicializar DataTables solo cuando se muestra la sección + if (subOption === 'estudiante') { + initializeDataTable(); + } else if (subOption === 'docente') { + initializeDataTableDocente(); + } else if (subOption === 'curso') { + initializeDataTableCurso(); + } + + // Reiniciar estado de edición al cambiar de sección + editingInfo = { tipo: null, id: null }; + + // Restaurar texto de botones + document.querySelectorAll('#registrar, #registrarDocente, #registrarCurso') + .forEach(btn => { + if (btn.id === 'registrar') btn.textContent = 'Registrar Estudiante'; + if (btn.id === 'registrarDocente') btn.textContent = 'Registrar Docente'; + if (btn.id === 'registrarCurso') btn.textContent = 'Registrar Curso'; + }); + + if (mainOption === 'dashboard') updateAll(); +} + +function initCharts() { + // Gráfico de distribución por niveles + const ctxNivel = document.getElementById('nivelEstudiantesChart'); + nivelEstudiantesChart = new Chart(ctxNivel, { + type: 'doughnut', + data: { + labels: ['Principiante', 'Intermedio', 'Avanzado'], + datasets: [{ + label: "Estudiantes por Nivel", + data: [0, 0, 0], // Datos iniciales vacíos + backgroundColor: ['#4e73df', '#1cc88a', '#36b9cc'], + borderWidth: 0 + }] + }, + options: { + maintainAspectRatio: true, + plugins: { + legend: { + position: 'bottom', + labels: { font: { size: 14 } } + }, + tooltip: { + bodyFont: { size: 14 }, + titleFont: { size: 16 } + } + } + } + }); + + // Gráfico de categorías de cursos + const ctxCategoria = document.getElementById('categoriaCursosChart'); + categoriaCursosChart = new Chart(ctxCategoria, { + type: 'bar', + data: { + labels: [''], + datasets: [{ + label: 'Cursos por categoría', + data: [0, 0, 0, 0, 0], // Datos iniciales vacíos + backgroundColor: ['#4e73df', '#1cc88a', '#36b9cc', '#f6c23e', '#e74c3c'], + borderWidth: 0 + }] + }, + options: { + maintainAspectRatio: true, + scales: { + y: { + beginAtZero: true, + ticks: { font: { size: 12 } } + }, + x: { + ticks: { font: { size: 12 } } + } + }, + plugins: { legend: { display: false } } + } + }); + + //Gráfico de Estudiantes por Curso + estudiantesPorCursoChart = new Chart( + document.getElementById('estudiantesPorCursoChart'), + { + type: 'bar', + data: { + labels: [''], + datasets: [{ + label: 'Estudiantes por Curso', + data: [0, 0, 0, 0, 0], + backgroundColor: [ + '#4e73df', + '#1cc88a', + '#36b9cc', + '#f6c23e', + '#e74c3c' + ], + borderRadius: 5, + barThickness: 20 + }] + }, + options: { + maintainAspectRatio: true, + scales: { + y: { + beginAtZero: true, + ticks: { + font: { size: 12 } + } + }, + x: { + ticks: { + font: { size: 12 } + } + } + }, + plugins: { + legend: { display: false }, + tooltip: { + bodyFont: { size: 14 }, + titleFont: { size: 16 } + } + } + } + } + ); + + + // Gráfico para reportes + new Chart( + document.getElementById('reporteEstudiantesCurso'), + { + type: 'pie', + data: { + labels: ['Guitarra', 'Piano', 'Canto', 'Violín', 'Teoría'], + datasets: [{ + label: 'Estudiantes por Curso', + data: [15, 12, 8, 5, 3], + backgroundColor: [ + '#4e73df', + '#1cc88a', + '#36b9cc', + '#f6c23e', + '#e74c3c' + ], + borderWidth: 0 + }] + }, + options: { + maintainAspectRatio: false, + plugins: { + legend: { + position: 'bottom', + labels: { + font: { + size: 14 + } + } + }, + tooltip: { + bodyFont: { + size: 14 + }, + titleFont: { + size: 16 + } + } + } + } + } + ); + + new Chart( + document.getElementById('reporteNiveles'), + { + type: 'polarArea', + data: { + labels: ['Principiante', 'Intermedio', 'Avanzado'], + datasets: [{ + label: 'Distribución de Niveles', + data: [25, 15, 10], + backgroundColor: [ + 'rgba(78, 115, 223, 0.7)', + 'rgba(28, 200, 138, 0.7)', + 'rgba(54, 185, 204, 0.7)' + ], + borderWidth: 0 + }] + }, + options: { + maintainAspectRatio: false, + plugins: { + legend: { + position: 'bottom', + labels: { + font: { + size: 14 + } + } + }, + tooltip: { + bodyFont: { + size: 14 + }, + titleFont: { + size: 16 + } + } + } + } + } + ); + updateCharts(); +} + +function updateAll() { + updateStateFromTable('estudiantes'); + updateStateFromTable('docentes'); + updateStateFromTable('cursos'); + updateCounters(); + updateCharts(); +} + +document.querySelectorAll('.theme-selector').forEach(selector => { + selector.addEventListener('click', function () { + const theme = this.dataset.theme; + applyTheme(theme); + + document.querySelectorAll('.theme-selector').forEach(el => { + el.classList.remove('active'); + }); + this.classList.add('active'); + }); +}); + +// Sistema de temas +const themeToggle = document.getElementById('theme-toggle'); +const themeToggleIcon = document.getElementById('theme-icon'); +console.log(themeToggleIcon) + +// Función para aplicar el tema +function applyTheme(theme) { + document.body.classList.remove('theme-light', 'theme-dark'); + document.querySelectorAll('.theme-selector').forEach(el => { + el.classList.remove('theme-light', 'theme-dark', 'theme-auto'); + }); + + if (theme !== 'default') { + document.body.classList.add(`theme-${theme}`); + } + + localStorage.setItem('theme', theme); + + const themeIcon = document.getElementById('theme-icon'); + themeIcon.className = theme === 'dark' ? 'fas fa-sun' : 'fas fa-moon'; +} + +// Cargar tema guardado o detectar preferencia del sistema +function loadTheme() { + const savedTheme = localStorage.getItem('theme') || 'default'; + applyTheme(savedTheme); +} + +// Alternar entre temas +function toggleTheme() { + const currentTheme = localStorage.getItem('theme') || 'default'; + const newTheme = currentTheme === 'dark' ? 'light' : 'dark'; + applyTheme(newTheme) +} From ec4e43d63b2a8b1458674db5e840cb886a293cf7 Mon Sep 17 00:00:00 2001 From: gchambillaala Date: Sat, 12 Jul 2025 11:46:32 -0500 Subject: [PATCH 23/52] =?UTF-8?q?Se=20a=C3=B1adio=20funcion=20asistencia?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NEWPAGE/asistencia.html | 882 +++++++++++++++ NEWPAGE/cambios.html | 5 + NEWPAGE/cambios_of.html | 2375 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 3262 insertions(+) create mode 100644 NEWPAGE/cambios_of.html diff --git a/NEWPAGE/asistencia.html b/NEWPAGE/asistencia.html index e69de29..15868f4 100644 --- a/NEWPAGE/asistencia.html +++ b/NEWPAGE/asistencia.html @@ -0,0 +1,882 @@ + + + + + + PRODIGIOS - Academia de Música + + + + + + + + + + + + + + + + + +
    +
    + + +
    +

    Panel de Control

    +
    +
    +

    Estudiantes Registrados

    +

    0

    + Total en el sistema +
    +
    +

    Docentes Activos

    +

    0

    + Enseñando actualmente +
    +
    +

    Cursos Disponibles

    +

    0

    + Ofertados este semestre +
    +
    +

    Clases Esta Semana

    +

    42

    + Programadas +
    +
    + +
    +
    +

    Distribución por Niveles

    + +
    +
    +

    Cursos por Categoría

    + +
    +
    +

    Estudiantes por Curso

    + +
    +
    + +
    +

    Actividades Recientes

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FechaDescripciónUsuario
    2023-11-15Nuevo estudiante registrado: María RodríguezAdmin
    2023-11-14Curso de Piano Avanzado creadoAdmin
    2023-11-13Pago registrado: Carlos MendozaAdmin
    2023-11-12Actualización de horariosAdmin
    2023-11-10Nueva docente: Laura MéndezAdmin
    +
    +
    +
    + + +
    + +
    +

    Registrar Nuevo Estudiante

    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + +
    IDNombreDNIFecha Nac.DirecciónContactoCursoNivelHorarioEstadoAcciones
    +
    + + +
    +
    +

    Registrar Nuevo Docente

    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + +
    + + + + + + + + + + + + + + + + + + +
    IDNombresDNIFecha Nac.EspecialidadGrado AcadémicoExperienciaHorarioContactoSalarioAcciones
    +
    + + +
    +
    +

    Registrar Nuevo Curso

    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + +
    IDNombresDescripciónDuraciónNivelHorarioDocenteN° de PlazasCostoMaterialAcciones
    +
    + + + + + + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/NEWPAGE/cambios.html b/NEWPAGE/cambios.html index 07079aa..8077f5b 100644 --- a/NEWPAGE/cambios.html +++ b/NEWPAGE/cambios.html @@ -57,6 +57,7 @@

    Luis Miguel Roque Huacca

    @@ -698,6 +700,9 @@
    Memoria
    + + + diff --git a/NEWPAGE/cambios_of.html b/NEWPAGE/cambios_of.html new file mode 100644 index 0000000..4fb4c38 --- /dev/null +++ b/NEWPAGE/cambios_of.html @@ -0,0 +1,2375 @@ + + + + + + PRODIGIOS - Academia de Música + + + + + + + + + + + + + + + + +
    +
    + + +
    +

    Panel de Control

    +
    +
    +

    Estudiantes Registrados

    +

    0

    + Total en el sistema +
    +
    +

    Docentes Activos

    +

    0

    + Enseñando actualmente +
    +
    +

    Cursos Disponibles

    +

    0

    + Ofertados este semestre +
    +
    +

    Clases Esta Semana

    +

    42

    + Programadas +
    +
    + +
    +
    +

    Distribución por Niveles

    + +
    +
    +

    Cursos por Categoría

    + +
    +
    +

    Estudiantes por Curso

    + +
    +
    + +
    +

    Actividades Recientes

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FechaDescripciónUsuario
    2023-11-15Nuevo estudiante registrado: María RodríguezAdmin
    2023-11-14Curso de Piano Avanzado creadoAdmin
    2023-11-13Pago registrado: Carlos MendozaAdmin
    2023-11-12Actualización de horariosAdmin
    2023-11-10Nueva docente: Laura MéndezAdmin
    +
    +
    +
    + + +
    + +
    +

    Registrar Nuevo Estudiante

    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + +
    IDNombreDNIFecha Nac.DirecciónContactoCursoNivelHorarioEstadoAcciones
    +
    + + +
    +
    +

    Registrar Nuevo Docente

    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + +
    + + + + + + + + + + + + + + + + + + +
    IDNombresDNIFecha Nac.EspecialidadGrado AcadémicoExperienciaHorarioContactoSalarioAcciones
    +
    + + +
    +
    +

    Registrar Nuevo Curso

    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + +
    IDNombresDescripciónDuraciónNivelHorarioDocenteN° de PlazasCostoMaterialAcciones
    +
    + + + + + + +
    +
    + + + + + + + + + + + + + + \ No newline at end of file From b95bc41da7b29211326187117a00b53eedcd89be Mon Sep 17 00:00:00 2001 From: gchambillaala Date: Sat, 12 Jul 2025 15:05:50 -0500 Subject: [PATCH 24/52] Asistencia interfaz basico --- NEWPAGE/asistencia.css | 17 ++++ NEWPAGE/asistencia.html | 207 +++++++++++----------------------------- NEWPAGE/asistencia.js | 27 ++++++ 3 files changed, 102 insertions(+), 149 deletions(-) create mode 100644 NEWPAGE/asistencia.css create mode 100644 NEWPAGE/asistencia.js diff --git a/NEWPAGE/asistencia.css b/NEWPAGE/asistencia.css new file mode 100644 index 0000000..e45d4c6 --- /dev/null +++ b/NEWPAGE/asistencia.css @@ -0,0 +1,17 @@ +/* +.estado { + font-weight: bold; + font-size: 0.95rem; +} + +.estado-presente { + color: var(--success); +} + +.estado-ausente { + color: var(--warning); +} + +.estado-pendiente { + color: #888; +} \ No newline at end of file diff --git a/NEWPAGE/asistencia.html b/NEWPAGE/asistencia.html index 15868f4..d6c0c87 100644 --- a/NEWPAGE/asistencia.html +++ b/NEWPAGE/asistencia.html @@ -9,90 +9,8 @@ + - @@ -786,49 +704,61 @@
    Memoria
    -