perbaikan fominspeksi upload foto
This commit is contained in:
@@ -157,6 +157,7 @@
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (isset($formFoto['foto_lantai_lainnya']))
|
||||
<div class="card">
|
||||
<div class="card-header" id="basic_settings">
|
||||
<h3 class="card-title">
|
||||
@@ -181,6 +182,7 @@
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (isset($formFoto['foto_gerbang']))
|
||||
<div class="card">
|
||||
@@ -239,6 +241,25 @@
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@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');
|
||||
}
|
||||
$adaFoto = false;
|
||||
if (isset($forminspeksi)) {
|
||||
foreach ($fotoTypes as $type) {
|
||||
$imagePath = $forminspeksi[$type] ?? null;
|
||||
if ($imagePath && file_exists(storage_path('app/public/' . $imagePath))) {
|
||||
$adaFoto = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@endphp
|
||||
|
||||
@if ($adaFoto)
|
||||
<div class="card">
|
||||
<div class="card-header bg-agi-50" id="basic_settings">
|
||||
<h3 class="card-title">
|
||||
@@ -246,13 +267,7 @@
|
||||
</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@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>
|
||||
@if (isset($forminspeksi))
|
||||
@forelse ($fotoTypes as $type)
|
||||
@@ -274,3 +289,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
Reference in New Issue
Block a user