Pembaruan tampilan Tri Dharma
This commit is contained in:
@@ -63,6 +63,27 @@ trait HasStatusAktifSidia
|
||||
return $query->where(fn ($q) => $q->whereIn('nip', $nips)->orWhereIn('nip_siakad', $nips));
|
||||
}
|
||||
|
||||
/**
|
||||
* Apakah pegawai berstatus Tubel di SIDIA? Tubel Mandiri sengaja tidak dihitung (boleh diverifikasi).
|
||||
*/
|
||||
protected function isTubelSidia(?string $nip): bool
|
||||
{
|
||||
if (! $nip) {
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
return SidiaPegawai::query()
|
||||
->where(fn ($q) => $q->where('nip', $nip)->orWhere('nip_siakad', $nip))
|
||||
->whereRaw('LOWER(status) = ?', ['tubel'])
|
||||
->exists();
|
||||
} catch (Exception $e) {
|
||||
Log::warning('Gagal mengecek status tubel SIDIA: '.$e->getMessage());
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Tambahkan kolom `status_aktif` (HTML badge) ke setiap baris response DataTables.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user