Integrasi Menu Laporan Operator
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user