Tambahkan pengecekan untuk pengecualian nomor dokumen
- Menambahkan variabel `$shouldExcludeNomor` untuk memeriksa apakah nomor dokumen perlu dikecualikan. - Loop pengecekan ditambahkan untuk membandingkan `dokumen_nomor` dengan excludedDocuments. - Hanya menampilkan nomor dokumen jika tidak masuk dalam daftar pengecualian.
This commit is contained in:
@@ -113,6 +113,7 @@
|
||||
@if ($dokumen->id== $dokumen_jaminans->id)
|
||||
@php
|
||||
$shouldExclude = false;
|
||||
$shouldExcludeNomor = false;
|
||||
foreach ($excludedDocuments as $excludedDoc) {
|
||||
if (str_contains(strtolower($dokumen_jaminans->name), strtolower($excludedDoc))) {
|
||||
$shouldExclude = true;
|
||||
@@ -124,11 +125,22 @@
|
||||
@if(!$shouldExclude)
|
||||
@php $details = $dokumen_jaminans->detail; @endphp
|
||||
@foreach ($details as $index => $detail)
|
||||
@php
|
||||
$shouldExcludeNomor = false;
|
||||
foreach ($excludedDocuments as $excludedDoc) {
|
||||
if (str_contains(strtolower($detail->dokumen_nomor), strtolower($excludedDoc))) {
|
||||
$shouldExcludeNomor = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@endphp
|
||||
@if(!$shouldExcludeNomor)
|
||||
@if($detail->dokumen_nomor)
|
||||
@foreach(json_decode($detail->dokumen_nomor) as $item)
|
||||
{{ $item }}<br>
|
||||
@endforeach
|
||||
@endif
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@@ -130,6 +130,7 @@
|
||||
@if ($dokumen->id== $dokumen_jaminans->id)
|
||||
@php
|
||||
$shouldExclude = false;
|
||||
$shouldExcludeNomor = false;
|
||||
foreach ($excludedDocuments as $excludedDoc) {
|
||||
if (str_contains(strtolower($dokumen_jaminans->name), strtolower($excludedDoc))) {
|
||||
$shouldExclude = true;
|
||||
@@ -141,11 +142,22 @@
|
||||
@if(!$shouldExclude)
|
||||
@php $details = $dokumen_jaminans->detail; @endphp
|
||||
@foreach ($details as $index => $detail)
|
||||
@php
|
||||
$shouldExcludeNomor = false;
|
||||
foreach ($excludedDocuments as $excludedDoc) {
|
||||
if (str_contains(strtolower($detail->dokumen_nomor), strtolower($excludedDoc))) {
|
||||
$shouldExcludeNomor = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@endphp
|
||||
@if(!$shouldExcludeNomor)
|
||||
@if($detail->dokumen_nomor)
|
||||
@foreach(json_decode($detail->dokumen_nomor) as $item)
|
||||
{{ $item }}<br>
|
||||
@endforeach
|
||||
@endif
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
@endif
|
||||
|
||||
Reference in New Issue
Block a user