Bloqueo de cuenta y config. resumen

This commit is contained in:
2025-05-29 15:47:42 -06:00
parent e08a813802
commit e17577dbd8
4 changed files with 181 additions and 41 deletions

View File

@@ -424,6 +424,13 @@ $mensajeMantenimiento = $config['mensaje_mantenimiento'] ?? 'El sistema se encue
})
.then(response => response.json())
.then(data => {
if (data.blocked) {
mostrarError(data.message); // <-- función personalizada con un div bonito
setTimeout(() => {
window.location.href = data.redirect;
}, 4000);
}
if (data.success) {
// Código correcto
mostrarExito(data.message);
@@ -454,6 +461,16 @@ $mensajeMantenimiento = $config['mensaje_mantenimiento'] ?? 'El sistema se encue
});
}
// Mostrar error de cuenta bloqueada
function mostrarError(mensaje) {
const mensajeDiv = document.getElementById('mensaje');
mensajeDiv.innerHTML = `
<div class="text-danger fade-in">
<i class="fas fa-exclamation-triangle me-2"></i> ${mensaje}
</div>
`;
}
// Manejar código incorrecto
function manejarCodigoIncorrecto(data) {
intentosRealizados++;