[Operator] Kelengkapan Halaman Dosen

This commit is contained in:
Ariyutta
2026-11-14 07:51:17 +07:00
parent 59e941d2ce
commit 58d5d4312b
17 changed files with 234 additions and 42 deletions
@@ -26,7 +26,7 @@
$editable ??= true;
$ownRowsOnly ??= false;
$viewable ??= true;
// $barLinks (opsional): tautan tambahan di kanan bilah cari, [['label', 'href', 'icon']].
// $barLinks (opsional): tautan tambahan di kanan bilah cari, [['label', 'href', 'icon', 'variant' => 'secondary'|'teal']].
$barLinks ??= [];
// $detailColumns (opsional): kolom modal Lihat bila berbeda dari kolom tabel; kolom ber-'detail' => 'kunci' menampilkan
// row.{kunci} (larik teks) sebagai daftar bernomor selebar modal, mis. anggota grup mata kuliah.
@@ -130,9 +130,9 @@
@foreach ($barLinks as $link)
@if ($link['withFilters'] ?? false)
{{-- Tautan yang membawa filter dan kata cari yang sedang dipakai (mis. Unduh CSV) --}}
<a class="btn btn--secondary btn--sm" x-bind:href="linkWith(@js($link['href']))"><x-dynamic-component :component="'heroicon-o-'.($link['icon'] ?? 'link')" /><span>{{ $link['label'] }}</span></a>
<a class="btn btn--{{ ($link['variant'] ?? null) === 'teal' ? 'teal' : 'secondary' }} btn--sm" x-bind:href="linkWith(@js($link['href']))"><x-dynamic-component :component="'heroicon-o-'.($link['icon'] ?? 'link')" /><span>{{ $link['label'] }}</span></a>
@else
<x-ui.button variant="secondary" :icon="$link['icon'] ?? null" size="sm" :href="$link['href']">{{ $link['label'] }}</x-ui.button>
<x-ui.button :variant="$link['variant'] ?? 'secondary'" :icon="$link['icon'] ?? null" size="sm" :href="$link['href']">{{ $link['label'] }}</x-ui.button>
@endif
@endforeach
@foreach ($active as [$label, $icon, $variant, $click])
@@ -163,7 +163,8 @@
</thead>
<tbody>
<template x-for="row in view" x-bind:key="row.id">
<tr>
{{-- row._total: baris penjumlahan laporan (mis. "Jumlah"), diberi arsir --}}
<tr x-bind:class="{ 'table__row--total': row._total }">
@if ($dynamicColumns)
<template x-for="(col, ci) in columns" x-bind:key="col.key">
<td x-bind:class="{ num: col.num, table__title: ci === 0 }">