Perbaiki logika iterasi untuk legalitas dalam komponen dokumen
- Tambahkan pengecekan "if" untuk memastikan data "legalitas" ada sebelum iterasi dilakukan. - Susun ulang struktur iterasi untuk memastikan rendering elemen sesuai dengan kondisi data. - Kurangi kemungkinan error saat "legalitas" bernilai null atau undefined.
This commit is contained in:
@@ -349,6 +349,7 @@
|
|||||||
</div>
|
</div>
|
||||||
@php $n++; @endphp
|
@php $n++; @endphp
|
||||||
@endforeach
|
@endforeach
|
||||||
|
@if($legalitas)
|
||||||
@foreach($legalitas as $item)
|
@foreach($legalitas as $item)
|
||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
<label class="form-label max-w-56 font-bold">
|
<label class="form-label max-w-56 font-bold">
|
||||||
@@ -414,6 +415,7 @@
|
|||||||
@php $n++; @endphp
|
@php $n++; @endphp
|
||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
<div class="flex justify-end">
|
<div class="flex justify-end">
|
||||||
<button type="submit" class="btn btn-primary">
|
<button type="submit" class="btn btn-primary">
|
||||||
|
|||||||
Reference in New Issue
Block a user