added no escape button and remove loadermarhun

This commit is contained in:
hafifierahman
2025-01-21 01:42:32 +08:00
parent 0cc78c5043
commit a370adc2d0
2 changed files with 14 additions and 6 deletions
+3 -1
View File
@@ -202,7 +202,9 @@
showDenyButton: true,
showCancelButton: false,
confirmButtonText: "Pergi Ke Troli",
denyButtonText: `Buang Troli`
denyButtonText: `Buang Troli`,
allowOutsideClick: false,
allowEscapeKey: false,
}).then((result) => {
const loader = document.getElementById('load-arrahn');
loader.classList.remove('d-none');
+11 -5
View File
@@ -1,6 +1,6 @@
<link href="{{ asset('css/customportal.css') }}" rel="stylesheet">
<div id="marhunLoader" class="loader" style="display: none;"></div>
{{-- <div id="marhunLoader" class="loader" style="display: none;"></div> --}}
<div class="modal animate__animated animate__bounceInDown" id="marhunModal">
<div class="modal-dialog modal-lg modal-dialog-centered">
@@ -212,7 +212,7 @@
event.preventDefault();
document.getElementById('marhunLoader').style.display = 'flex';
// document.getElementById('marhunLoader').style.display = 'flex';
const norujukan = event.target.innerHTML;
try {
const data = await fetch('/api/pembiayaan-modal-data/' + norujukan + "/" + tagsyarikat)
@@ -272,12 +272,18 @@
]).draw(false)
});
document.getElementById('marhunLoader').style.display = 'none';
// document.getElementById('marhunLoader').style.display = 'none';
// const loader = document.getElementById('load-arrahn');
loader.classList.add('d-none');
} catch (error) {
const loader = document.getElementById('load-arrahn');
console.error('Error fetching data:', error);
// Hide loader in case of error
document.getElementById('marhunLoader').style.display = 'none';
// document.getElementById('marhunLoader').style.display = 'none';
loader.classList.add('d-none');
}
};
@@ -302,5 +308,5 @@
document.querySelector('#marhunModal').addEventListener('hidden.bs.modal', function(e) {
document.querySelector('#marhunModal .modal-header a[aria-controls="pills-marhun"]').click();
});
</script>')
</script>
@endpush