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)
|
@if ($dokumen->id== $dokumen_jaminans->id)
|
||||||
@php
|
@php
|
||||||
$shouldExclude = false;
|
$shouldExclude = false;
|
||||||
|
$shouldExcludeNomor = false;
|
||||||
foreach ($excludedDocuments as $excludedDoc) {
|
foreach ($excludedDocuments as $excludedDoc) {
|
||||||
if (str_contains(strtolower($dokumen_jaminans->name), strtolower($excludedDoc))) {
|
if (str_contains(strtolower($dokumen_jaminans->name), strtolower($excludedDoc))) {
|
||||||
$shouldExclude = true;
|
$shouldExclude = true;
|
||||||
@@ -124,10 +125,21 @@
|
|||||||
@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_nomor)
|
@php
|
||||||
@foreach(json_decode($detail->dokumen_nomor) as $item)
|
$shouldExcludeNomor = false;
|
||||||
{{ $item }}<br>
|
foreach ($excludedDocuments as $excludedDoc) {
|
||||||
@endforeach
|
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
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
|
|||||||
@@ -130,6 +130,7 @@
|
|||||||
@if ($dokumen->id== $dokumen_jaminans->id)
|
@if ($dokumen->id== $dokumen_jaminans->id)
|
||||||
@php
|
@php
|
||||||
$shouldExclude = false;
|
$shouldExclude = false;
|
||||||
|
$shouldExcludeNomor = false;
|
||||||
foreach ($excludedDocuments as $excludedDoc) {
|
foreach ($excludedDocuments as $excludedDoc) {
|
||||||
if (str_contains(strtolower($dokumen_jaminans->name), strtolower($excludedDoc))) {
|
if (str_contains(strtolower($dokumen_jaminans->name), strtolower($excludedDoc))) {
|
||||||
$shouldExclude = true;
|
$shouldExclude = true;
|
||||||
@@ -141,10 +142,21 @@
|
|||||||
@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_nomor)
|
@php
|
||||||
@foreach(json_decode($detail->dokumen_nomor) as $item)
|
$shouldExcludeNomor = false;
|
||||||
{{ $item }}<br>
|
foreach ($excludedDocuments as $excludedDoc) {
|
||||||
@endforeach
|
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
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
|
|||||||
Reference in New Issue
Block a user