@if(isset($document->id)) @method('PUT') @endif @csrf

{{ $debitur->name }} | {{ formatAlamat($debitur) }}

@error('pemilik_jaminan_id') {{ $message }} @enderror
@if(isset($document->id)) @endif @error('jenis_jaminan_id') {{ $message }} @enderror
@if(isset($document->id)) @php $n = 0; @endphp @foreach($document->detail as $detail)
@if(isset($detail->dokumen_jaminan)) @php $dokumen_jaminan = is_array(json_decode($detail->dokumen_jaminan)) ? json_decode($detail->dokumen_jaminan) : [$detail->dokumen_jaminan]; @endphp @foreach($dokumen_jaminan as $index => $dokumen) {{ basename($dokumen) }} @endforeach @endif
@if($detail->details) @php $custom_field = json_decode($detail->details,true) @endphp
@else @if($detail->jenisLegalitasJaminan->custom_field)
@if($detail->jenisLegalitasJaminan->custom_field_type === "text") @elseif($detail->jenisLegalitasJaminan->custom_field_type === "number") @elseif($detail->jenisLegalitasJaminan->custom_field_type === "date") @elseif($detail->jenisLegalitasJaminan->custom_field_type === "textarea") @else @endif
@endif @endif
@php $n++; @endphp @endforeach @foreach($legalitas as $item)
@if($item->custom_field)
@if($item->custom_field_type === "text") @elseif($item->custom_field_type === "number") @elseif($item->custom_field_type === "date") @elseif($item->custom_field_type === "textarea") @else @endif
@endif
@php $n++; @endphp @endforeach
@endif
@error('province_code') {{ $message }} @enderror
@error('city_code') {{ $message }} @enderror
@error('district_code') {{ $message }} @enderror
@error('district_code') {{ $message }} @enderror
@error('postal_code') {{ $message }} @enderror
@error('address') {{ $message }} @enderror
@push('scripts') {{--Pemilik Jaminan--}} {{--Legalitas Jaminan--}} @endpush