Pembaruan tampilan Tri Dharma

This commit is contained in:
Ariyutta
2026-11-23 17:39:54 +07:00
parent 59431e0632
commit 020b3c8ce2
13 changed files with 590 additions and 174 deletions
@@ -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.
*/