fix(spk): perbaiki tampilan dokumen jaminan

- Memperbaiki kondisi pengecekan ID dokumen jaminan.
- Menambahkan tampilan nama detail dokumen jaminan jika ada.
- Memperbaiki format tampilan nomor dokumen dengan pemisah koma.
This commit is contained in:
Daeng Deni Mardaeni
2025-02-27 15:38:32 +07:00
parent f6bae680af
commit 03b0ba4ac0

View File

@@ -126,7 +126,7 @@
@endphp @endphp
@foreach ($data->dokumenjaminan as $dokumen_jaminans) @foreach ($data->dokumenjaminan as $dokumen_jaminans)
@if ($dokumen->id== $dokumen_jaminans->id) @if ($dokumen->id == $dokumen_jaminans->id)
@php @php
$shouldExclude = false; $shouldExclude = false;
$shouldExcludeNomor = false; $shouldExcludeNomor = false;
@@ -141,6 +141,8 @@
@if(!$shouldExclude) @if(!$shouldExclude)
@php $details = $dokumen_jaminans->detail; @endphp @php $details = $dokumen_jaminans->detail; @endphp
@foreach ($details as $index => $detail) @foreach ($details as $index => $detail)
@if($detail->dokumen_jaminan)
{{ $detail->name }}
@php @php
$shouldExcludeNomor = false; $shouldExcludeNomor = false;
foreach ($excludedDocuments as $excludedDoc) { foreach ($excludedDocuments as $excludedDoc) {
@@ -152,11 +154,14 @@
@endphp @endphp
@if(!$shouldExcludeNomor) @if(!$shouldExcludeNomor)
@if($detail->dokumen_nomor) @if($detail->dokumen_nomor)
@foreach(json_decode($detail->dokumen_nomor) as $item) {{ " | " }}
{{ $item }}<br> @foreach(json_decode($detail->dokumen_nomor) as $key => $item)
{{ $item }}{{ $key < count(json_decode($detail->dokumen_nomor)) - 1 ? ',' : '' }}
@endforeach @endforeach
@endif @endif
@endif @endif
<br>
@endif
@endforeach @endforeach
@endif @endif
@endif @endif