diff --git a/resources/views/surveyor/components/tanah.blade.php b/resources/views/surveyor/components/tanah.blade.php index 4e3d596..85d4366 100644 --- a/resources/views/surveyor/components/tanah.blade.php +++ b/resources/views/surveyor/components/tanah.blade.php @@ -1,5 +1,3 @@ - -

@@ -16,8 +14,12 @@ @foreach ($permohonan->debiture->documents as $item) @php $luas = $item->detail; - $details = json_decode($luas[0]->details, true); - $luas_tanah = isset($details['luas']) ? $details['luas'] : 'N/A'; + if(is_array($luas)){ + $details = json_decode($luas[0]->details, true); + $luas_tanah = isset($details['luas']) ? $details['luas'] : 'N/A'; + } else { + $luas_tanah = 'N/A'; + } @endphp

{{ $luas_tanah }} m2

@@ -25,30 +27,31 @@ @endif
-
- - -
- - -
+
+ + +
+ +
- - +
+ +

@@ -66,7 +69,7 @@ : 'N/A'; @endphp + value="{{ $hadap_mata_angin }}">

{{ $hadap_mata_angin }} m2

@endforeach @endif @@ -74,42 +77,42 @@
+ style="{{ old('hadap_mata_angin', isset($forminspeksi['tanah']['hadap_mata_angin']['tidak sesuai'])) ? '' : 'display: none;' }}"> - {{-- --}} + @endif + + {{-- --}}
@@ -126,22 +129,22 @@
@if (strcasecmp($item->name, 'lainnya') == 0) + style="{{ isset($forminspeksi['tanah']['bentuk_tanah']['lainnya']) && $forminspeksi['tanah']['bentuk_tanah']['lainnya'] ? '' : 'display: none;' }}" + name="bentuk_tanah_lainnya" class="input w-full mt-2" + placeholder="Masukkan bentuk tanah..." + value="{{ old('bentuk_tanah_lainnya', $forminspeksi['tanah']['bentuk_tanah']['lainnya'] ?? '') }}"/> @endif
@endforeach @@ -159,7 +162,7 @@ @foreach ($basicData['konturTanah'] as $item) @@ -179,24 +182,24 @@
@if (strcasecmp($item->name, 'Lebih Tinggi') == 0) + style="{{ isset($forminspeksi['tanah']['ketinggian_tanah']['lebih_tinggi']) && $forminspeksi['tanah']['ketinggian_tanah']['lebih_tinggi'] ? '' : 'display: none;' }}" + name="ketinggian_lebih_tinggi" class="input w-full mt-2" placeholder="m2" + value="{{ old('ketinggian_lebih_tinggi', $forminspeksi['tanah']['ketinggian_tanah']['lebih_tinggi'] ?? '') }}"/> @elseif (strcasecmp($item->name, 'Lebih Rendah') == 0) + style="{{ isset($forminspeksi['tanah']['ketinggian_tanah']['lebih_rendah']) && $forminspeksi['tanah']['ketinggian_tanah']['lebih_rendah'] ? '' : 'display: none;' }}" + name="ketinggian_lebih_rendah" class="input w-full mt-2" placeholder="m2" + value="{{ old('ketinggian_lebih_rendah', $forminspeksi['tanah']['ketinggian_tanah']['lebih_rendah'] ?? '') }}"/> @endif
@@ -246,17 +249,17 @@
@if (strcasecmp($item->name, 'Lainnya') == 0) + style="{{ $lainnyaValue ? '' : 'display: none' }}" + name="posisi_kavling_lainnya" class="input w-full mt-2" + placeholder="Masukkan Posisi Kavling lainnya..." + value="{{ $lainnyaValue }}"/> @endif
@endforeach @@ -315,9 +318,9 @@ @foreach ($basicData['kondisiFisikTanah'] as $item) @@ -325,9 +328,9 @@ @if (strcasecmp($item->name, 'lainnya') == 0)
+ id="kondisi_fisik_tanah_lainnya" class="input mt-2" + placeholder="Masukkan Kondisi Fisik Tanah..." style="display: none;" + value="{{ old('kondisi_fisik_tanah_lainnya', isset($forminspeksi['tanah']['kondisi_fisik_tanah']['lainnya'])) }}">
@endif @endforeach