diff --git a/resources/views/penilai/show.blade.php b/resources/views/penilai/show.blade.php index c7c0403..54f7fa2 100644 --- a/resources/views/penilai/show.blade.php +++ b/resources/views/penilai/show.blade.php @@ -220,7 +220,7 @@
- Lampiran Foto dan Dokument + Lampiran Foto dan Dokumen @if (strtolower($permohonan->tujuanPenilaian->name) != 'rap') diff --git a/resources/views/surveyor/components/data-pembanding.blade.php b/resources/views/surveyor/components/data-pembanding.blade.php index c65278a..1d8b88f 100644 --- a/resources/views/surveyor/components/data-pembanding.blade.php +++ b/resources/views/surveyor/components/data-pembanding.blade.php @@ -702,8 +702,8 @@ console.log( 'Current route matches'); } else { - window.location.href = - "{{ route('surveyor.show', ['id' => $permohonan->id]) }}"; + // window.location.href = + // "{{ route('surveyor.show', ['id' => $permohonan->id]) }}"; } } @@ -743,6 +743,75 @@ input.value = formatCurrency(input.value); } }); + + + // hide the "Lihat Objek Penilaian" toggle + const tableContainer = document.querySelector('.scrollable-x-auto'); + const toggleContainer = document.createElement('div'); + toggleContainer.className = 'flex items-center gap-4 mb-4 p-3 bg-gray-50 rounded'; + + const objekToggle = createCustomSwitch('Lihat Objek Penilaian', false, function(checked) { + toggleColumn(1, checked); + }); + + toggleContainer.appendChild(objekToggle); + + tableContainer.parentNode.insertBefore(toggleContainer, tableContainer); + + function createCustomSwitch(label, initialState, onChangeCallback) { + const container = document.createElement('div'); + + const switchLabel = document.createElement('label'); + switchLabel.className = 'switch'; + + const input = document.createElement('input'); + input.name = "check"; + input.type = "checkbox"; + input.value = "1"; + input.checked = initialState; + + const span = document.createElement('span'); + span.className = 'switch-label'; + span.textContent = label; + + switchLabel.appendChild(input); + switchLabel.appendChild(span); + container.appendChild(switchLabel); + + + input.addEventListener('change', function() { + onChangeCallback(this.checked); + }); + + return container; + } + + function toggleColumn(columnIndex, show) { + const table = document.getElementById('dataTable'); + const rows = table.querySelectorAll('tr'); + + rows.forEach(row => { + + const cells = row.querySelectorAll('td, th'); + if (cells.length === 1 && cells[0].hasAttribute('colspan')) { + return; + } + + + if (cells[columnIndex]) { + cells[columnIndex].style.display = show ? '' : 'none'; + } + }); + + + const headerRow = table.querySelector('thead tr'); + const headerCells = headerRow.querySelectorAll('th'); + if (headerCells[columnIndex]) { + headerCells[columnIndex].style.display = show ? '' : 'none'; + } + } + + toggleColumn(1, false); }); @endpush diff --git a/resources/views/surveyor/components/denah.blade.php b/resources/views/surveyor/components/denah.blade.php index 668ec21..b8aff28 100644 --- a/resources/views/surveyor/components/denah.blade.php +++ b/resources/views/surveyor/components/denah.blade.php @@ -98,7 +98,7 @@
@@ -351,8 +351,8 @@ confirmButtonText: 'OK' }).then((response) => { if (response.isConfirmed) { - window.location.href = - '{{ route('surveyor.show', ['id' => $permohonan->id]) }}'; + // window.location.href = + // '{{ route('surveyor.show', ['id' => $permohonan->id]) }}'; } }); } else { diff --git a/resources/views/surveyor/components/print-out/bangunan.blade.php b/resources/views/surveyor/components/print-out/bangunan.blade.php index fdd9460..06503df 100644 --- a/resources/views/surveyor/components/print-out/bangunan.blade.php +++ b/resources/views/surveyor/components/print-out/bangunan.blade.php @@ -39,7 +39,7 @@ diff --git a/resources/views/surveyor/components/print-out/lingkungan.blade.php b/resources/views/surveyor/components/print-out/lingkungan.blade.php index dee2338..889b231 100644 --- a/resources/views/surveyor/components/print-out/lingkungan.blade.php +++ b/resources/views/surveyor/components/print-out/lingkungan.blade.php @@ -207,7 +207,7 @@ - Nama Makam: {{ $forminspeksi['lingkungan']['nama_makam'] ?? '' }} , Jarak Makam: - {{ $forminspeksi['lingkungan']['jarak_makam'] ?? '' }} + {{ $forminspeksi['lingkungan']['jarak_makam'] ?? '' }} @endif