// ------------------------- // Cargar secciones al inicio // ------------------------- /* function cargarSecciones() { axios.get( `https://facturahacienda.com/asistencia2025/API/secciones/getSecciones.php?correo=${encodeURIComponent(correoProfesor)}` ) .then(res => { if (res.data.success && res.data.datos.length > 0) { const options = res.data.datos.map(sec => ``).join(''); selectSeccion.innerHTML += options; const id_seccion_url = new URLSearchParams(window.location.search).get('id_seccion'); if (id_seccion_url) { selectSeccion.value = id_seccion_url; localStorage.setItem('seccionSeleccionada', id_seccion_url); consultarSeccion(id_seccion_url); } else { Swal.fire({ title: 'Seleccione una sección', position: "top", html: ``, showCancelButton: true, confirmButtonText: 'Consultar', preConfirm: () => Swal.getPopup().querySelector('#swalSelect').value }).then(result => { if (result.isConfirmed) { const id_seccion = result.value; selectSeccion.value = id_seccion; localStorage.setItem('seccionSeleccionada', id_seccion); actualizarNombreSeccion(); consultarSeccion(id_seccion); } }); } } else { Swal.fire({ icon: 'info', title: 'No hay secciones', text: 'No se encontraron secciones para este profesor.' }); } }) .catch(err => console.error(err)); } */