Penambahan Filter Jenjang Pendidikan untuk menu P2 dan Simulasi Jabatan
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Exports;
|
||||
|
||||
use App\Helpers\JenjangPendidikanHelper;
|
||||
use App\Models\Verifikator\JabatanFungsionalRiwayat;
|
||||
use App\Models\Verifikator\JabatanPegawai;
|
||||
use App\Models\Verifikator\JabatanTugasTambahanRiwayat;
|
||||
@@ -26,6 +27,7 @@ class P2Export implements FromCollection, ShouldAutoSize, WithColumnFormatting,
|
||||
private readonly ?int $periode,
|
||||
private readonly mixed $unitKerjaId,
|
||||
private readonly ?string $jenisPegawai,
|
||||
private readonly ?string $jenjangPendidikan = null,
|
||||
) {}
|
||||
|
||||
public function title(): string
|
||||
@@ -65,6 +67,10 @@ class P2Export implements FromCollection, ShouldAutoSize, WithColumnFormatting,
|
||||
$query->where('jpd.jenis_pegawai', $this->jenisPegawai);
|
||||
}
|
||||
|
||||
if ($this->jenjangPendidikan !== null && $this->jenjangPendidikan !== '') {
|
||||
JenjangPendidikanHelper::applyQueryFilter($query, 'verifikator.pegawais.pendidikan_terakhir', $this->jenjangPendidikan);
|
||||
}
|
||||
|
||||
$data = $query->get();
|
||||
|
||||
if ($data->isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user