fix(master-rule): fix table rule
This commit is contained in:
parent
eefa91898f
commit
5f8ef6c199
|
@ -13,8 +13,6 @@ class RuleController extends Controller
|
|||
public function index()
|
||||
{
|
||||
$indicators = Indicator::with('rules')->get();
|
||||
// $indicators = Indicator::select('id', 'name')->get();
|
||||
// dd($indicators);
|
||||
return view('master-data.aturan.index', compact('indicators'));
|
||||
}
|
||||
|
||||
|
|
|
@ -140,17 +140,15 @@ class="fw-medium link-primary">#VZ2101</a>
|
|||
<th class="sort" data-sort="action">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@php
|
||||
$no = 1; // Mulai dari 1, counter global
|
||||
@endphp
|
||||
<tbody class="list form-check-all">
|
||||
@foreach ($indicators as $indicator)
|
||||
@foreach ($indicator->rules as $index => $rule)
|
||||
<tr class="text-center">
|
||||
@if ($index === 0)
|
||||
<td rowspan="{{ $indicator->rules->count() }}">
|
||||
{{ $loop->iteration }}</td>
|
||||
<td class="indicator"
|
||||
rowspan="{{ $indicator->rules->count() }}">
|
||||
{{ $indicator->name }}</td>
|
||||
@endif
|
||||
<td class="no">{{ $no++ }}</td>
|
||||
<td class="indicator">{{ $indicator->name }}</td>
|
||||
<td class="id" style="display: none">
|
||||
<a href="javascript:void(0);"
|
||||
class="fw-medium link-primary">#VZ2101</a>
|
||||
|
|
Loading…
Reference in New Issue