feat(jaminan): tambahkan tampilan detail jaminan

- Menambahkan pengecekan untuk menampilkan detail jaminan jika tersedia.
- Menggunakan json_decode untuk mengurai data detail.
- Menampilkan setiap detail dalam format yang rapi dengan pemisah.
This commit is contained in:
Daeng Deni Mardaeni
2025-01-20 15:17:04 +07:00
parent 7c9b73b2bc
commit 0a38319d98
2 changed files with 145 additions and 114 deletions

View File

@@ -257,10 +257,24 @@
<td class="py-2 text-gray-600 font-normal max-w-[100px]">
{{ $loop->index + 1 }}. {{ $detail->jenisLegalitasJaminan->name }}
</td>
<td class="py-2 text-gray-800 font-normaltext-sm">
<td class="py-2 text-gray-800 font-normal text-2sm">
{{ $detail->name ?? '' }}
</td>
</tr>
@if(isset($detail->details))
@if(json_decode($detail->details))
@foreach (json_decode($detail->details) as $key => $value)
<tr>
<td class="py-3 capitalize">
{{ str_replace("_"," ",$key) ?? "" }}
</td>
<td class="py-2 text-gray-800 font-normal text-2sm">
{{ $value ?? "" }}
</td>
</tr>
@endforeach
@endif
@endif
<tr>
<td class="py-3 max-w-[100px] align-top">
Dokumen Jaminan

View File

@@ -102,6 +102,23 @@
</div>
<div class="border-t border-gray-300 border-dashed">
</div>
@if(isset($detail->details))
@if(json_decode($detail->details))
@foreach (json_decode($detail->details) as $key => $value)
<div class="flex items-start justify-between flex-wrap my-2.5 gap-2">
<span class="text-2xs text-gray-600 uppercase pl-3">
{{ str_replace("_"," ",$key) ?? "" }}
</span>
<p class="text-2xs text-gray-600 text-right max-w-[250px]">
{{ $value ?? "" }}
</p>
</div>
<div class="border-t border-gray-300 border-dashed">
</div>
@endforeach
@endif
@endif
<div class="flex items-start justify-between flex-wrap my-2.5 gap-2">
<span class="text-2xs text-gray-600 uppercase pl-3">
keterangan