<script>
function showAlert(title, text, icon, callback) {
Swal.fire({
title: title,
text: text,
icon: icon,
button: 'OK'
}).then((result) => {
if (result.isConfirmed && typeof callback === "function") {
callback();
}
})
}
function deleteAlert(callback) {
Swal.fire({
title: 'Hapus Data',
text: 'Apakah Anda ingin menghapus Data?',
icon: 'warning',
showCancelButton: true,
confirmButtonText: 'OK',
cancelButtonText: 'Cancel',
reverseButtons: true
}).then((result) => {
if (result.isConfirmed && typeof callback === "function") {
callback(); // Panggil callback jika pengguna menekan "OK"
}
})
}
function confirmAlert(callback) {
Swal.fire({
title: 'Berlangganan',
text: 'apakah anda ingin berlangganan Sekarang?',
icon: 'question',
showCancelButton: true,
confirmButtonText: 'OK',
cancelButtonText: 'Cancel',
reverseButtons: true
}).then((result) => {
if (result.isConfirmed && typeof callback === "function") {
callback(); // Panggil callback jika pengguna menekan "OK"
}
})
}
</script>
@push('styles')
<link rel="stylesheet" href="{{ url('assets/extensions/sweetalert2/sweetalert2.min.css') }}">
<link rel="stylesheet" crossorigin href="{{ url('assets/compiled/css/extra-component-sweetalert.css') }}">
@endpush
@push('scripts')
<script src="{{ url('assets/extensions/sweetalert2/sweetalert2.min.js') }}"></script>
<script src="{{ url('assets/static/js/pages/sweetalert2.js') }}"></script>
@endpush
Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]