perbaikan error laporan

This commit is contained in:
majid
2024-12-29 22:19:32 +07:00
parent c3362821c3
commit ea4d5bde64
4 changed files with 90 additions and 132 deletions

View File

@@ -132,7 +132,7 @@
<main class="content">
<table style="width: 100%">
<tr>
<td>
<td style="vertical-align: top;">
<table style="width: 100%; border-collapse: collapse;">
<tr>
<td style="width: 30%; padding: 2px;">Nama Debitur</td>
@@ -1053,28 +1053,29 @@
<td>
@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
<div class="">
@if (isset($forminspeksi))
@forelse ($fotoTypes as $type)
<div class="border photo-item">
@php
@forelse ($fotoTypes as $type)
<div class="border photo-item">
@php
$imagePath = $forminspeksi[$type] ?? null;
@endphp
$imagePath = storage_path('app/public/' . $forminspeksi[$type]);
@endphp
@if ($statusLpj || file_exists(storage_path('app/public/' . $imagePath)))
<img src="{{ $imagePath }}" alt="{{ $type }}"
class="photo-image">
@endif
<p class="mt-2 text-sm">{{ Str::title(str_replace('_', ' ', $type)) }}</p>
</div>
@empty
<p>Tidak ada tipe foto yang tersedia</p>
@endforelse
@if ($imagePath && file_exists(storage_path('app/public/' . $imagePath)))
<img src="{{ asset('storage/' . $imagePath) }}" alt="{{ $type }}"
class="photo-image">
@endif
<p class="mt-2 text-sm">{{ Str::title(str_replace('_', ' ', $type)) }}</p>
</div>
@empty
<p>Tidak ada tipe foto yang tersedia</p>
@endforelse
@endif
</td>
</tr>