Update Teruss

This commit is contained in:
atuy
2026-06-27 10:59:04 +07:00
parent 699225821d
commit 1249cdbb42
+5 -6
View File
@@ -577,9 +577,9 @@ $("#example10").DataTable({
<script> <script>
$(document).ready(function() { $(document).ready(function() {
// Aksi ketika tombol dengan ID tombol-logout ditekan // Apapun tombolnya, selama dia mengarah ke link logout, tangkap!
$(document).on('click', '.tombol-logout', function(e) { $('a[href*="login/logout"]').on('click', function(e) {
e.preventDefault(); // Mencegah link langsung pindah e.preventDefault();
var link = $(this).attr('href'); var link = $(this).attr('href');
Swal.fire({ Swal.fire({
@@ -590,11 +590,10 @@ $("#example10").DataTable({
confirmButtonColor: '#3085d6', confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33', cancelButtonColor: '#d33',
confirmButtonText: 'Ya, Keluar!', confirmButtonText: 'Ya, Keluar!',
cancelButtonText: 'Batal', cancelButtonText: 'Batal'
reverseButtons: true
}).then((result) => { }).then((result) => {
if (result.isConfirmed) { if (result.isConfirmed) {
window.location.href = link; // Lanjutkan proses logout jika klik Ya window.location.href = link;
} }
}); });
}); });