main
Ilham Wara Nugroho 2026-03-04 09:24:53 +07:00
parent 09c1fca0aa
commit 5097d918d7
1 changed files with 39 additions and 18 deletions

View File

@ -98,24 +98,45 @@
<div class="flex items-center p-2 rounded" style="overflow-x:auto;">
<div class="w-full">
@if(@$item->tahun >= 2026)
<table id="table"
class="w-full border text-left border-collapse"
data-toggle="table"
data-search="false"
data-pagination="false"
data-side-pagination="server"
data-url="{{ route($route.'.gridDetail', ['id' => $keyId]) }}"
>
<thead class="bg-slate-100 border-b border-slate-100">
<tr>
<th data-field="no" data-width="3%" class="text-[10px] border font-bold text-slate-900 text-center tengah">No</th>
@foreach ($tabel as $k => $key)
<th data-field="{{$key->order}}" class="text-[10px] border font-bold text-slate-900 text-center">{{ $key->name }}</th>
@endforeach
</tr>
</thead>
</table>
<table id="table"
class="w-full border text-left border-collapse"
data-toggle="table"
data-search="false"
data-pagination="false"
data-side-pagination="server"
data-url="{{ route($route.'.gridDetail', ['id' => $keyId]) }}"
>
<thead class="bg-slate-100 border-b border-slate-100">
<tr>
<th data-field="no" data-width="3%" class="text-[10px] border font-bold text-slate-900 text-center tengah">No</th>
@foreach ($tabel as $k => $key)
<th data-field="{{$key->order}}" class="text-[10px] border font-bold text-slate-900 text-center">{{ $key->name }}</th>
@endforeach
</tr>
</thead>
</table>
@else
<?php $data = json_decode($item->data); ?>
<table class="w-full text-left border-collapse" id="table"
data-toggle="table"
data-search="false"
data-pagination="true"
data-side-pagination="server"
data-url="{{ url('dataset/Griddetail2025?id='.@$item->DatasetId) }}"
>
<thead class="bg-slate-100 border-b border-slate-100">
<tr>
@if (!empty($data))
@foreach ($data[0] as $k => $key)
<th data-field="{{$k}}" class="text-[10px] px-6 py-4 border font-bold text-slate-900">{{ ucwords(str_replace('_', ' ', $k)) }}</th>
@endforeach
@endif
</tr>
</thead>
</table>
@endif
</div>
</div>