fix(penilai/surveyor): perbaikkan print out dokument jaminan
This commit is contained in:
committed by
Daeng Deni Mardaeni
parent
d52edb9481
commit
340dce7ed7
@@ -44,6 +44,49 @@
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@php
|
||||
$fotoTypes = [
|
||||
'upload_gs',
|
||||
'foto_sentuh_tanahku',
|
||||
'foto_gistaru',
|
||||
'foto_bhumi',
|
||||
'foto_argis_region',
|
||||
'foto_tempat',
|
||||
];
|
||||
|
||||
$customLabels = [
|
||||
'upload_gs' => 'Gambar Situasi',
|
||||
'foto_sentuh_tanahku' => 'Sentuh Tanahku',
|
||||
'foto_gistaru' => 'Gistaru',
|
||||
'foto_bhumi' => 'Bhumi',
|
||||
'foto_argis_region' => 'Blad Tata Ruang ',
|
||||
'foto_tempat' => 'Tempat',
|
||||
];
|
||||
// Memindahkan foto_tempat ke depan jika ada
|
||||
if (($key = array_search('upload_gs', $fotoTypes)) !== false) {
|
||||
unset($fotoTypes[$key]);
|
||||
array_unshift($fotoTypes, 'upload_gs');
|
||||
}
|
||||
// Filter fotoTypes untuk memastikan hanya yang memiliki imagePath valid
|
||||
$validPhotoTypes = array_filter($fotoTypes, function ($type) use ($forminspeksi) {
|
||||
return isset($forminspeksi[$type]) && file_exists(storage_path('app/public/' . $forminspeksi[$type]));
|
||||
});
|
||||
@endphp
|
||||
@foreach ($validPhotoTypes as $type)
|
||||
@php
|
||||
$imagePath = $forminspeksi[$type] ?? null;
|
||||
@endphp
|
||||
@if ($imagePath && file_exists(storage_path('app/public/' . $imagePath)))
|
||||
<tr>
|
||||
<td style="20%"> {{ $customLabels[$type] ?? '' }}</td>
|
||||
<td width="1%" style="vertical-align: top;"></td>
|
||||
<td style="width: 79%">
|
||||
<img src="{{ storage_path('app/public/' . $imagePath) }}" alt="{{ $imagePath }}"
|
||||
style="max-height: 400px; height: auto; max-width: 100%;">
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
<tr>
|
||||
<td width="20%" style="vertical-align: top;">Catatan yang Perlu Diperhatikan </td>
|
||||
<td width="1%" style="vertical-align: top;">:</td>
|
||||
|
||||
Reference in New Issue
Block a user