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()
|
public function index()
|
||||||
{
|
{
|
||||||
$indicators = Indicator::with('rules')->get();
|
$indicators = Indicator::with('rules')->get();
|
||||||
// $indicators = Indicator::select('id', 'name')->get();
|
|
||||||
// dd($indicators);
|
|
||||||
return view('master-data.aturan.index', compact('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>
|
<th class="sort" data-sort="action">Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
@php
|
||||||
|
$no = 1; // Mulai dari 1, counter global
|
||||||
|
@endphp
|
||||||
<tbody class="list form-check-all">
|
<tbody class="list form-check-all">
|
||||||
@foreach ($indicators as $indicator)
|
@foreach ($indicators as $indicator)
|
||||||
@foreach ($indicator->rules as $index => $rule)
|
@foreach ($indicator->rules as $index => $rule)
|
||||||
<tr class="text-center">
|
<tr class="text-center">
|
||||||
@if ($index === 0)
|
<td class="no">{{ $no++ }}</td>
|
||||||
<td rowspan="{{ $indicator->rules->count() }}">
|
<td class="indicator">{{ $indicator->name }}</td>
|
||||||
{{ $loop->iteration }}</td>
|
|
||||||
<td class="indicator"
|
|
||||||
rowspan="{{ $indicator->rules->count() }}">
|
|
||||||
{{ $indicator->name }}</td>
|
|
||||||
@endif
|
|
||||||
<td class="id" style="display: none">
|
<td class="id" style="display: none">
|
||||||
<a href="javascript:void(0);"
|
<a href="javascript:void(0);"
|
||||||
class="fw-medium link-primary">#VZ2101</a>
|
class="fw-medium link-primary">#VZ2101</a>
|
||||||
|
|
Loading…
Reference in New Issue