diff --git a/app/Helpers/Lpj.php b/app/Helpers/Lpj.php index 347d9c7..7049c2a 100644 --- a/app/Helpers/Lpj.php +++ b/app/Helpers/Lpj.php @@ -373,13 +373,14 @@ function checkRegionUserName($userId) } } -function getNomorLaporan($permohonanId, $documentId) +function getNomorLaporan($permohonanId, $documentId, $type = 'nomor_laporan') { + $laporan = Laporan::where([ 'permohonan_id' => $permohonanId, 'dokumen_jaminan_id' => $documentId, ])->first(); - return $laporan->nomor_laporan ?? null; + return $type == 'nomor_laporan' ? $laporan->nomor_laporan : $laporan->created_at; } function getCustomField($param) diff --git a/resources/views/penilai/components/foto-lampiran.blade.php b/resources/views/penilai/components/foto-lampiran.blade.php index 63cf78a..4ee7bc8 100644 --- a/resources/views/penilai/components/foto-lampiran.blade.php +++ b/resources/views/penilai/components/foto-lampiran.blade.php @@ -116,7 +116,7 @@ 'foto_sentuh_tanahku' => 'Sentuh Tanahku', 'foto_gistaru' => 'Gistaru', 'foto_bhumi' => 'Bhumi', - 'foto_argis_region' => 'Region', + 'foto_argis_region' => 'Blad Tata Ruang', 'foto_tempat' => 'Tempat', ]; @@ -139,8 +139,8 @@ @if ($adaFoto)
-

- Peta, dan tata ruang, blad +

+ GS, Tata Ruang dan Peta

diff --git a/resources/views/penilai/show.blade.php b/resources/views/penilai/show.blade.php index c7c0403..c8d856a 100644 --- a/resources/views/penilai/show.blade.php +++ b/resources/views/penilai/show.blade.php @@ -168,7 +168,7 @@

- {{ formatTanggalIndonesia($permohonan->created_at) }}

+ {{ formatTanggalIndonesia($permohonan->penilaian->waktu_penilaian) }}

@@ -177,7 +177,12 @@

- {{ formatTanggalIndonesia($permohonan->created_at) }}

+ + @php + $tglLaporan = getNomorLaporan($permohonan->id, $dokumen->id, 'tanggal_laporan'); + @endphp + + {{ isset($tglLaporan) ? formatTanggalIndonesia($tglLaporan) : '-' }}

@@ -220,7 +225,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/informasi.blade.php b/resources/views/surveyor/components/print-out/informasi.blade.php index b5f3dac..680a015 100644 --- a/resources/views/surveyor/components/print-out/informasi.blade.php +++ b/resources/views/surveyor/components/print-out/informasi.blade.php @@ -60,7 +60,7 @@ 'foto_gistaru' => 'Gistaru', 'foto_bhumi' => 'Bhumi', 'foto_argis_region' => 'Blad Tata Ruang ', - 'foto_tempat' => 'Tempat', + 'foto_tempat' => 'Peta Lokasi', ]; // Memindahkan foto_tempat ke depan jika ada if (($key = array_search('upload_gs', $fotoTypes)) !== false) { 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