From ea4d5bde6420a228479d7c1ddf80ff9ab02f4575 Mon Sep 17 00:00:00 2001 From: majid Date: Sun, 29 Dec 2024 22:19:32 +0700 Subject: [PATCH] perbaikan error laporan --- .../penilai/components/foto-jaminan.blade.php | 4 +- .../components/foto-lampiran.blade.php | 4 +- .../components/print-out-sederhana.blade.php | 37 ++-- .../components/print-out-standard.blade.php | 177 +++++++----------- 4 files changed, 90 insertions(+), 132 deletions(-) diff --git a/resources/views/penilai/components/foto-jaminan.blade.php b/resources/views/penilai/components/foto-jaminan.blade.php index 63cf99b..37427c0 100644 --- a/resources/views/penilai/components/foto-jaminan.blade.php +++ b/resources/views/penilai/components/foto-jaminan.blade.php @@ -55,8 +55,8 @@ @endif - @if (isset($formFoto['foto_lantai_unit'])) - @foreach ($formFoto['foto_lantai_unit'] as $index => $floorPhotos) + @if (isset($formFoto['foto_lantai_unit']['foto_lantai_unit'] )) + @foreach ($formFoto['foto_lantai_unit']['foto_lantai_unit'] as $index => $floorPhotos) @foreach ($floorPhotos as $index => $item)

diff --git a/resources/views/penilai/components/foto-lampiran.blade.php b/resources/views/penilai/components/foto-lampiran.blade.php index 7d3ed81..b3d5f0f 100644 --- a/resources/views/penilai/components/foto-lampiran.blade.php +++ b/resources/views/penilai/components/foto-lampiran.blade.php @@ -82,8 +82,8 @@

Lantai

- @if (isset($formFoto['foto_lantai_unit'])) - @foreach ($formFoto['foto_lantai_unit'] as $floorIndex => $floorPhotos) + @if (isset($formFoto['foto_lantai_unit']['foto_lantai_unit'])) + @foreach ($formFoto['foto_lantai_unit']['foto_lantai_unit'] as $floorIndex => $floorPhotos)
@foreach ($floorPhotos as $index => $item)
diff --git a/resources/views/penilai/components/print-out-sederhana.blade.php b/resources/views/penilai/components/print-out-sederhana.blade.php index a5ca8ea..d183eff 100644 --- a/resources/views/penilai/components/print-out-sederhana.blade.php +++ b/resources/views/penilai/components/print-out-sederhana.blade.php @@ -132,7 +132,7 @@
- - - +
+ @@ -1053,28 +1053,29 @@ diff --git a/resources/views/penilai/components/print-out-standard.blade.php b/resources/views/penilai/components/print-out-standard.blade.php index 356f3d7..ffd18e2 100644 --- a/resources/views/penilai/components/print-out-standard.blade.php +++ b/resources/views/penilai/components/print-out-standard.blade.php @@ -498,34 +498,47 @@ @php - - $cekHub = - isset($forminspeksi['asset']['hub_cadeb']) && - $forminspeksi['asset']['hub_cadeb'] === 'sesuai' - ? 'sesuai' - : 'tidak sesuai'; - + $cekHub = isset($forminspeksi['asset']['hub_cadeb']) && $forminspeksi['asset']['hub_cadeb'] === 'sesuai' + ? 'sesuai' + : 'tidak sesuai'; + $hubCadeb = isset($forminspeksi['asset']['hub_cadeb'][$cekHub]) - ? $forminspeksi['asset']['hub_cadeb']['tidak sesuai'] - : $forminspeksi['asset']['hub_cadeb']['sesuai']; + ? $forminspeksi['asset']['hub_cadeb'][$cekHub] + : null; @endphp - + + @php @@ -823,68 +836,49 @@ @if (isset($basicData['spekKategoriBangunan'])) - @foreach ($basicData['spekKategoriBangunan'] as $index => $spesifikasi) - - -
Nama Debitur @php $fotoTypes = ['foto_gistaru', 'foto_bhumi', 'foto_argis_region', 'foto_tempat']; + if (($key = array_search('foto_tempat', $fotoTypes)) !== false) { + unset($fotoTypes[$key]); + array_unshift($fotoTypes, 'foto_tempat'); + } @endphp -
+ @if (isset($forminspeksi)) - @forelse ($fotoTypes as $type) -
- @php + @forelse ($fotoTypes as $type) +
+ @php + $imagePath = $forminspeksi[$type] ?? null; + @endphp - $imagePath = storage_path('app/public/' . $forminspeksi[$type]); - @endphp - - @if ($statusLpj || file_exists(storage_path('app/public/' . $imagePath))) - {{ $type }} - @endif -

{{ Str::title(str_replace('_', ' ', $type)) }}

- -
- @empty -

Tidak ada tipe foto yang tersedia

- @endforelse + @if ($imagePath && file_exists(storage_path('app/public/' . $imagePath))) + {{ $type }} @endif +

{{ Str::title(str_replace('_', ' ', $type)) }}

+ @empty +

Tidak ada tipe foto yang tersedia

+ @endforelse + @endif
Hubungan Pemilik Jaminan dengan DebiturHubungan Pemilik Jaminan dengan Debitur @if (isset($basicData['hubCadeb'])) + @php $count = 0; @endphp @foreach ($basicData['hubCadeb'] as $item) + @php $count++; @endphp + + @if ($count % 3 === 0) + + @endif @endforeach + + {{-- Isi kolom kosong jika tidak genap --}} + @if ($count % 3 !== 0) + @for ($i = 0; $i < (3 - $count % 3); $i++) + + @endfor + @endif
- name === $hubCadeb ? 'checked' : '' }}> - {{ $item->name }} +
@endif
{{ $spesifikasi->name }} - - @if (isset($basicData['spekBangunan'])) - @foreach ($basicData['spekBangunan'] as $kategori) - @if ($kategori->spek_kategori_bangunan_id == $spesifikasi->id) - @if ($loop->iteration % 3 == 1 && $loop->iteration > 1) - - + @foreach ($basicData['spekKategoriBangunan'] as $index => $spesifikasi) + + + - - @endforeach - @endif + + + @endforeach +@endif + - - -
{{ $spesifikasi->name }} + + @if (isset($basicData['spekBangunan'])) + @php $count = 0; @endphp + + @foreach ($basicData['spekBangunan'] as $kategori) + @if ($kategori->spek_kategori_bangunan_id == $spesifikasi->id) + + @php $count++; @endphp + + @if ($count % 3 == 0) + + @endif + @endif + @endforeach + @endif - - @endif - @endforeach - @endif
+ +
- -
-
Sarana Pelengkap - @if (isset($basicData['saranaPelengkap'])) - - - @foreach ($basicData['saranaPelengkap'] as $index => $item) - @if ($index % 3 == 0 && $index > 0) - - - @endif - - @endforeach - -
- -
- @endif + @if (isset($forminspeksi['bangunan']['sarana_pelengkap_input'])) @@ -899,7 +893,7 @@
- @elseif ($kategori === 'apartemen-kantor') + @elseif ($kategori === 'apartemen-kantor') @php @@ -1006,7 +1000,6 @@ @endif @endif @endforeach - @@ -1242,7 +1235,6 @@
Ada
-
@@ -1425,45 +1417,10 @@
- +
-
-
-
- PETA LOKASI -
-
- -
- @php - $fotoTypes = ['foto_gistaru', 'foto_bhumi', 'foto_argis_region', 'foto_tempat']; - if (($key = array_search('foto_tempat', $fotoTypes)) !== false) { - unset($fotoTypes[$key]); - array_unshift($fotoTypes, 'foto_tempat'); - } - @endphp -
- @if (isset($forminspeksi)) - @forelse ($fotoTypes as $type) -
- @php - $imagePath = $forminspeksi[$type] ?? null; - @endphp - - @if ($imagePath && file_exists(storage_path('app/public/' . $imagePath))) - {{ $type }} - @endif -

{{ Str::title(str_replace('_', ' ', $type)) }}

-
- @empty -

Tidak ada tipe foto yang tersedia

- @endforelse - @endif -
-