Files
lpj/resources/views/penilai/components/footer.blade.php

35 lines
1.1 KiB
PHP

<footer id="footer">
Cabang : {{ $permohonan->debiture->branch->name ?? '' }}
</footer>
<script>
const datas = @json($forminspeksi);
console.log(datas);
const lpjData = @json($lpjData);
console.log(lpjData);
document.addEventListener('DOMContentLoaded', function() {
const checkboxes = document.querySelectorAll('.checkbox-lainnya');
checkboxes.forEach(checkbox => {
checkbox.addEventListener('change', function() {
const textLainnya = this.closest('label').querySelector('.text-lainnya');
if (this.checked && this.value === 'Lainnya') {
textLainnya.style.display = 'inline';
} else if (this.value === 'Lainnya') {
textLainnya.style.display = 'none';
}
});
// Atur visibilitas awal
if (checkbox.checked && checkbox.value === 'Lainnya') {
const textLainnya = checkbox.closest('label').querySelector('.text-lainnya');
textLainnya.style.display = 'inline';
}
});
});
</script>
</body>
</html>