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

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

{{ $permohonan->nomor_registrasi ?? "-" }}

@error('pemilik_jaminan_id') {{ $message }} @enderror
@if(isset($document->id)) @endif @error('jenis_jaminan_id') {{ $message }} @enderror
@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
@if(isset($document->id)) @php $n = 0; @endphp @foreach($document->detail as $detail)
@if(isset($detail->dokumen_jaminan)) @if(isset($detail->dokumen_jaminan)) @php $dokumen_jaminan = is_array(json_decode($detail->dokumen_jaminan)) ? json_decode($detail->dokumen_jaminan) : [$detail->dokumen_jaminan]; $dokumen_nomor = is_array(json_decode($detail->dokumen_nomor)) ? json_decode($detail->dokumen_nomor) : ($detail->dokumen_nomor ? [$detail->dokumen_nomor] : []); @endphp
@foreach($dokumen_jaminan as $index => $dokumen)
@if(!empty($dokumen_nomor)) Nomor Dokumen : {{ $dokumen_nomor[$index] }} @endif {{ basename($dokumen) }}
@endforeach
@endif @endif
@if($detail->details) @if($detail->jenisLegalitasJaminan->custom_field) @php $custom_field = json_decode($detail->details,true) @endphp
@endif @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 @if($legalitas) @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 @endif
@push('scripts') {{--Pemilik Jaminan--}} {{--Legalitas Jaminan--}} @endpush