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

@@ -75,7 +75,7 @@
@endforeach
@endif
@if (isset($formFoto['foto_lingkungan']['foto_lingkungan']))
{{-- @if (isset($formFoto['foto_lingkungan']['foto_lingkungan']))
@foreach ($formFoto['foto_lingkungan']['foto_lingkungan'][0] as $index => $item)
<div class="border photo-item">
<h2 class="text-gray-600 font-semibold text-xl">
@@ -91,7 +91,7 @@
@endif
</div>
@endforeach
@endif
@endif --}}
@if (isset($formFoto['foto_basement']))
<div class="border photo-item">

View File

@@ -263,7 +263,7 @@
@endphp
@if ($imagePath && file_exists(storage_path('app/public/' . $imagePath)))
<img src="{{ asset('storage/' . $imagePath) }}" alt="{{ $type }}"
<img src="{{ Storage::url($imagePath) }}" alt="{{ $type }}"
class="photo-image">
@endif
<p class="mt-2 text-sm">{{ Str::title(str_replace('_', ' ', $type)) }}</p>

View File

@@ -1067,7 +1067,7 @@
@endphp
@if ($imagePath && file_exists(storage_path('app/public/' . $imagePath)))
<img src="{{ asset('storage/' . $imagePath) }}" alt="{{ $type }}"
<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>

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">

View File

@@ -116,7 +116,7 @@
{{ $surveyor->userPenilaiTeam->name }}
</p>
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $permohonan->region->name }}
<p class="flex w-full text-gray-600 font-medium text-sm">{{ checkRegionUserName($surveyor->userPenilaiTeam->id) }}
</p>
</div>
<label class="form-label max-w-56">
@@ -129,7 +129,7 @@
</p>
<p class="flex w-full text-gray-600 font-medium text-sm">
{{ $permohonan->region->name }}
{{ checkRegionUserName($penilai->userPenilaiTeam->id) }}
</p>
</div>
</div>