perbaikan name objek null

This commit is contained in:
majid
2024-12-31 17:10:13 +07:00
parent 0a5afe39e0
commit 08de0eeb00

View File

@@ -36,23 +36,34 @@
@endif
@if (isset($formFoto['object_jaminan']))
@if (!empty($formFoto['object_jaminan']))
@foreach ($formFoto['object_jaminan'] as $item)
<div class="border photo-item">
<h2 class="text-gray-600 font-semibold text-xl">
{{ $item['name_objek'] }}
</h2>
@php
$imagePath = storage_path('app/public/' . $item['foto_objek']);
$nameObjek = trim($item['name_objek'] ?? '');
$fotoObjek = trim($item['foto_objek'] ?? '');
$imagePath = storage_path('app/public/' . $fotoObjek);
@endphp
@if ($statusLpj || file_exists(storage_path('app/public/' . $item['foto_objek'])))
<img src="{{ $imagePath }}" alt="{{ $item['foto_objek'] }}" class="photo-image">
@if (!empty($nameObjek) || !empty($fotoObjek))
<div class="border photo-item">
@if (!empty($nameObjek))
<h2 class="text-gray-600 font-semibold text-xl">
{{ $nameObjek }}
</h2>
@endif
@if ($statusLpj || (!empty($fotoObjek) && file_exists($imagePath)))
<img src="{{ $imagePath }}" alt="{{ $nameObjek ?: 'Objek Foto' }}" class="photo-image">
@else
<p class="text-gray-500 italic">Foto tidak tersedia</p>
@endif
</div>
@endforeach
@endif
@endforeach
@else
<p class="text-gray-500 text-center italic">Tidak ada objek jaminan yang ditemukan</p>
@endif
@if (isset($formFoto['foto_lantai_unit']))