Sidebars
This commit is contained in:
@@ -98,7 +98,7 @@
|
||||
<td><?= htmlspecialchars(decrypt($ag['nombre_admin'] ?? '')) ?></td>
|
||||
<td>
|
||||
<?php if (isset($ag['activo']) && $ag['activo'] == 1): ?>
|
||||
<a href="/IMPORTADORES/administrador/suspenderAgencia?id=<?= $ag['id_agencia'] ?>&success=1" class="btn btn-sm btn-danger mt-auto w-auto btn-animated">Suspender</a>
|
||||
<a href="#" onclick="confirmSuspencion(<?= (int) ($ag['id_agencia'] ?? 0) ?>)" class="btn btn-sm btn-danger mt-auto w-auto btn-animated">Suspender</a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -119,6 +119,21 @@
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function confirmSuspencion(id) {
|
||||
Swal.fire({
|
||||
title: '¿Estás seguro?',
|
||||
text: 'Solo se suspenderá el perfil del usuario.',
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonText: 'Sí, suspender',
|
||||
cancelButtonText: 'Cancelar'
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
window.location.href = `/IMPORTADORES/administrador/suspenderAgencia?id=${id}`;
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php if (isset($_GET['success'])): ?>
|
||||
|
||||
Reference in New Issue
Block a user