diff --git a/resources/assets/js/app.js b/resources/assets/js/app.js index c095698..ee307ba 100644 --- a/resources/assets/js/app.js +++ b/resources/assets/js/app.js @@ -31,5 +31,27 @@ function hitungHariKerja(tanggalMulai, tanggalSelesai) { return hariKerja; } +function showLoadingSwal(message, duration = 5000) { + Swal.fire({ + title: message, + allowOutsideClick: false, + didOpen: () => { + Swal.showLoading(); + }, + timer: duration, // Durasi dalam milidetik + timerProgressBar: true, // Menampilkan progres bar timer + }).then((result) => { + if (result.dismiss === Swal.DismissReason.timer) { + console.log("Dialog loading otomatis ditutup."); + } + }); +} + +function hideLoadingSwal() { + Swal.close(); +} + // Make the function available globally window.hitungHariKerja = hitungHariKerja; +window.showLoadingSwal = showLoadingSwal; +window.hideLoadingSwal = hideLoadingSwal; diff --git a/resources/views/penilai/index.blade.php b/resources/views/penilai/index.blade.php index 3082862..1551678 100644 --- a/resources/views/penilai/index.blade.php +++ b/resources/views/penilai/index.blade.php @@ -336,21 +336,5 @@ }); } - - function showLoadingSwal(message, duration = 5000) { - Swal.fire({ - title: message, - allowOutsideClick: false, - didOpen: () => { - Swal.showLoading(); - }, - timer: duration, // Durasi dalam milidetik - timerProgressBar: true, // Menampilkan progres bar timer - }).then((result) => { - if (result.dismiss === Swal.DismissReason.timer) { - console.log('Dialog loading otomatis ditutup.'); - } - }); - } @endpush diff --git a/resources/views/penilaian/otorisator/index-sla.blade.php b/resources/views/penilaian/otorisator/index-sla.blade.php index 37fd065..2000b3c 100644 --- a/resources/views/penilaian/otorisator/index-sla.blade.php +++ b/resources/views/penilaian/otorisator/index-sla.blade.php @@ -291,22 +291,5 @@ } }); } - - - function showLoadingSwal(message, duration = 5000) { - Swal.fire({ - title: message, - allowOutsideClick: false, - didOpen: () => { - Swal.showLoading(); - }, - timer: duration, // Durasi dalam milidetik - timerProgressBar: true, // Menampilkan progres bar timer - }).then((result) => { - if (result.dismiss === Swal.DismissReason.timer) { - console.log('Dialog loading otomatis ditutup.'); - } - }); - } @endpush diff --git a/resources/views/penilaian/otorisator/index.blade.php b/resources/views/penilaian/otorisator/index.blade.php index 4388321..31025c4 100644 --- a/resources/views/penilaian/otorisator/index.blade.php +++ b/resources/views/penilaian/otorisator/index.blade.php @@ -361,22 +361,5 @@ } }); } - - - function showLoadingSwal(message, duration = 5000) { - Swal.fire({ - title: message, - allowOutsideClick: false, - didOpen: () => { - Swal.showLoading(); - }, - timer: duration, // Durasi dalam milidetik - timerProgressBar: true, // Menampilkan progres bar timer - }).then((result) => { - if (result.dismiss === Swal.DismissReason.timer) { - console.log('Dialog loading otomatis ditutup.'); - } - }); - } @endpush diff --git a/resources/views/penilaian/paparan-so.blade.php b/resources/views/penilaian/paparan-so.blade.php index c36961e..c1bb1a1 100644 --- a/resources/views/penilaian/paparan-so.blade.php +++ b/resources/views/penilaian/paparan-so.blade.php @@ -348,22 +348,5 @@ } }); } - - - function showLoadingSwal(message, duration = 5000) { - Swal.fire({ - title: message, - allowOutsideClick: false, - didOpen: () => { - Swal.showLoading(); - }, - timer: duration, // Durasi dalam milidetik - timerProgressBar: true, // Menampilkan progres bar timer - }).then((result) => { - if (result.dismiss === Swal.DismissReason.timer) { - console.log('Dialog loading otomatis ditutup.'); - } - }); - } @endpush diff --git a/resources/views/surveyor/components/informasi.blade.php b/resources/views/surveyor/components/informasi.blade.php index 22b766c..71ca457 100644 --- a/resources/views/surveyor/components/informasi.blade.php +++ b/resources/views/surveyor/components/informasi.blade.php @@ -238,7 +238,6 @@ alt="Foto Argis Region" class="mt-2 max-w-full h-auto" style="{{ $argisRegionPath ? '' : 'display: none;' }} max-width: 30rem;"> - < diff --git a/resources/views/surveyor/js/utils.blade.php b/resources/views/surveyor/js/utils.blade.php index 8da858a..89c77bb 100644 --- a/resources/views/surveyor/js/utils.blade.php +++ b/resources/views/surveyor/js/utils.blade.php @@ -1,18 +1,4 @@