[Superuser] Perbaikan Halaman Akses Superuser

This commit is contained in:
Ariyutta
2026-11-12 12:22:06 +07:00
parent 2b20537fdb
commit eaad95e8f2
45 changed files with 1062 additions and 110 deletions
@@ -27,7 +27,8 @@ class LogAktivitasController extends ResourceController
$per = in_array($request->integer('per'), LoginHistory::PER_PAGE, true) ? $request->integer('per') : LoginHistory::PER_PAGE[0];
$filter = $request->only(['q', 'dari', 'sampai']) + ['pengguna' => $request->filled('pengguna') ? $request->integer('pengguna') : null];
return view('crud.index', $this->share([
// Format tabel SATU (crud.satu-index) seperti halaman Operator: cari, filter, per halaman, dan pager lewat GET.
return view('crud.satu-index', $this->share([
'rows' => $this->history->search($filter, $per)->withQueryString(),
'columns' => $this->columns(),
'filters' => [
@@ -38,6 +39,7 @@ class LogAktivitasController extends ResourceController
],
'searchable' => true,
'searchPlaceholder' => 'Cari nama, NIP, atau NIM pemilik akun',
'perOptions' => LoginHistory::PER_PAGE,
'rowActions' => fn (array $row): array => [],
]));
}
@@ -30,7 +30,8 @@ class PenggunaController extends ResourceController
$per = in_array($request->integer('per'), AccountDirectory::PER_PAGE, true) ? $request->integer('per') : AccountDirectory::PER_PAGE[0];
$rows = $this->accounts->search($filter, $per)->withQueryString();
return view('crud.index', $this->share([
// Format tabel SATU (crud.satu-index) seperti halaman Operator: cari, filter, per halaman, dan pager lewat GET.
return view('crud.satu-index', $this->share([
'rows' => $rows,
'columns' => $this->columns(),
'filters' => [
@@ -40,6 +41,7 @@ class PenggunaController extends ResourceController
],
'searchable' => true,
'searchPlaceholder' => 'Cari nama, NIP, atau NIM',
'perOptions' => AccountDirectory::PER_PAGE,
'rowActions' => fn (array $row): array => $this->rowActions($row),
]));
}
@@ -159,7 +161,7 @@ class PenggunaController extends ResourceController
return [
['label' => 'Nama', 'key' => 'nama'],
['label' => 'NIP/NIM', 'key' => 'username'],
['label' => 'Jenis', 'key' => 'jenis'],
// Jenis akun tidak jadi kolom (sudah tersirat dari NIP/NIM dan otoritas); tetap tersedia sebagai filter.
['label' => 'Otoritas', 'key' => 'otoritas'],
['label' => 'Peran', 'key' => 'peran', 'badge' => fn (array $r): string => SuperuserData::ROLE_TONE[$r['peran']] ?? 'neutral'],
['label' => 'Status', 'key' => 'status', 'badge' => fn (array $r): string => $r['aktif'] ? 'success' : 'danger'],