Merge pull request 'fix: handle empty jenis_aset_id array in KJPP data display' (#58) from tender into staging

Reviewed-on: #58
This commit is contained in:
putrakuningan
2024-12-10 09:50:55 +00:00

View File

@@ -250,7 +250,7 @@
Pengalaman (Jenis Aset)
</label>
<div class="flex flex-wrap items-baseline w-full gap-1">
@if (isset($kjpp->jenis_aset_id))
@if (isset($kjpp->jenis_aset_id) && !empty(json_decode($kjpp->jenis_aset_id, true)))
@foreach (json_decode($kjpp->jenis_aset_id, true) as $aset_code)
@php
$jenis_aset = $jenis_jaminan->firstWhere('code', $aset_code);
@@ -263,8 +263,8 @@
@endif
@endforeach
@else
<span class="flex flex-row space-x-4 text-white font-medium text-sm dark-mode:text-gray-600">
No asset type selected.
<span class="flex flex-row space-x-4 text-gray-600 font-medium text-sm dark-mode:text-gray-600">
-
</span>
@endif
</div>