prbaikan output foto di laporan dan penilai dan surveyor by region

This commit is contained in:
majid
2024-12-30 09:28:06 +07:00
parent fa0a864a10
commit f60a4c558e
6 changed files with 343 additions and 298 deletions

View File

@@ -501,7 +501,7 @@
$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'][$cekHub]
: null;
@@ -515,18 +515,18 @@
@foreach ($basicData['hubCadeb'] as $item)
<td>
<label>
<input type="checkbox"
<input type="checkbox"
{{ $item->name === $hubCadeb ? 'checked' : '' }}>
{{ $item->name }}
</label>
</td>
@php $count++; @endphp
@if ($count % 3 === 0)
@if ($count % 3 === 0)
</tr><tr> <!-- Membuka baris baru setelah 3 kolom -->
@endif
@endforeach
{{-- Isi kolom kosong jika tidak genap --}}
@if ($count % 3 !== 0)
@for ($i = 0; $i < (3 - $count % 3); $i++)
@@ -538,7 +538,7 @@
@endif
</td>
</tr>
<tr>
@php
@@ -848,8 +848,8 @@
@if ($kategori->spek_kategori_bangunan_id == $spesifikasi->id)
<td class="checkbox-item">
<label class="checkbox-label">
<input
type="checkbox"
<input
type="checkbox"
style="margin-right: 3px;"
name="spesifikasi_bangunan[{{ $index }}][{{ $spesifikasi->name }}][]"
value="{{ $kategori->name }}"
@@ -878,7 +878,7 @@
<!-- Sarana Pelengkap -->
<!-- Input tambahan untuk Sarana Pelengkap -->
@if (isset($forminspeksi['bangunan']['sarana_pelengkap_input']))
@@ -1420,8 +1420,44 @@
</div>
</div>
<div class="page-break"></div>
<div class="section">
<div class="judul">
<h6 class="border">
PETA
</h6>
</div>
<div>
@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)
<div class="border photo-item">
@php
$imagePath = $forminspeksi[$type] ?? null;
@endphp
@if ($imagePath && file_exists(storage_path('app/public/' . $imagePath)))
<img src="{{ storage_path('app/public/' . $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
</div>
</div>
<div class="section">
<div class="judul">
<h6 class="border">