Integrasi Menu Laporan Operator

This commit is contained in:
Ariyutta
2026-11-06 14:51:38 +07:00
parent b1a8887dc8
commit 48569f3172
57 changed files with 11158 additions and 468 deletions
+3 -3
View File
@@ -41,12 +41,12 @@ final class AcademicPeriods
/**
* Semua periode reguler dan pendek, terbaru dulu (tahun di luar 1990–dua tahun ke depan dibuang).
*
* @param list<int> $prodi prodi akun untuk kolom Aktif?
* @param list<int>|null $prodi prodi yang dihitung untuk kolom Aktif?; null = semua prodi
* @return Collection<int, array<string, mixed>>
*/
public function all(array $prodi): Collection
public function all(?array $prodi = null): Collection
{
$active = $prodi === [] ? [] : $this->db()->table('t_periodekuliahaktif')->whereIn('idprogdi', $prodi)->distinct()->pluck('idperiode')->map(fn ($id): int => (int) $id)->all();
$active = $prodi === [] ? [] : $this->db()->table('t_periodekuliahaktif')->when($prodi !== null, fn ($q) => $q->whereIn('idprogdi', $prodi))->distinct()->pluck('idperiode')->map(fn ($id): int => (int) $id)->all();
$max = (now()->year + 1).'/'.(now()->year + 2);
return $this->db()->table(self::TABLE)