Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a0dc32df23 | |||
| 020b3c8ce2 | |||
| 59431e0632 | |||
| 40342183cb | |||
| df8e23c62c | |||
| c7a7e1ef48 | |||
| 26e22939d6 | |||
| 872ce296b4 | |||
| 48c0bdbc5c | |||
| 1ccd8746f0 |
@@ -3,6 +3,7 @@
|
|||||||
namespace App\Http\Controllers\Verifikasi\SK;
|
namespace App\Http\Controllers\Verifikasi\SK;
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Http\Controllers\Verifikasi\SK\Concerns\FormatKolomSk;
|
||||||
use App\Models\Verifikator\Periode;
|
use App\Models\Verifikator\Periode;
|
||||||
use App\Models\Verifikator\Sk as VerifikatorSk;
|
use App\Models\Verifikator\Sk as VerifikatorSk;
|
||||||
use App\Models\Verifikator\Team;
|
use App\Models\Verifikator\Team;
|
||||||
@@ -15,6 +16,8 @@ use Yajra\DataTables\Facades\DataTables;
|
|||||||
|
|
||||||
class BelumFinalisasiController extends Controller
|
class BelumFinalisasiController extends Controller
|
||||||
{
|
{
|
||||||
|
use FormatKolomSk;
|
||||||
|
|
||||||
private $siskaService;
|
private $siskaService;
|
||||||
|
|
||||||
private $periodeAktif;
|
private $periodeAktif;
|
||||||
@@ -57,7 +60,7 @@ class BelumFinalisasiController extends Controller
|
|||||||
{
|
{
|
||||||
$periode = $this->periodeAktif;
|
$periode = $this->periodeAktif;
|
||||||
$team = Team::find(session('team_id'));
|
$team = Team::find(session('team_id'));
|
||||||
$sks = VerifikatorSk::select('id', 'id_sk', 'tanggal as tanggal_sk', 'no_sk', 'tentang', 'verif_verifikator as status_verifikator', 'finalisasi', 'sk_jadi as sk')
|
$sks = VerifikatorSk::select('id', 'id_sk', 'tanggal as tanggal_sk', 'no_sk', 'tentang', 'verif_verifikator as status_verifikator', 'finalisasi', 'sk_jadi as sk', 'id_unit_penandatangan')
|
||||||
->where('periode', $periode)
|
->where('periode', $periode)
|
||||||
->where('verif_verifikator', 1)
|
->where('verif_verifikator', 1)
|
||||||
->where('finalisasi', 0)
|
->where('finalisasi', 0)
|
||||||
@@ -143,14 +146,15 @@ class BelumFinalisasiController extends Controller
|
|||||||
->addColumn('no_anggota', function ($row) {
|
->addColumn('no_anggota', function ($row) {
|
||||||
return $row->anggota_count === 0;
|
return $row->anggota_count === 0;
|
||||||
})
|
})
|
||||||
->addColumn('tentang', function ($row) {
|
->editColumn('no_sk', function ($row) {
|
||||||
$tentang = e($row['tentang'] ?? '-');
|
$peringatan = $row->anggota_count === 0
|
||||||
if ($row->anggota_count === 0) {
|
? [$this->peringatanSk('SK ini tidak memiliki anggota')]
|
||||||
return $tentang
|
: [];
|
||||||
.'<br><small class="text-danger"><i class="uil-exclamation-triangle"></i> SK tidak memiliki anggota</small>';
|
|
||||||
}
|
|
||||||
|
|
||||||
return $tentang;
|
return $this->kolomNoSk($row['no_sk'], $row['id_unit_penandatangan'], $peringatan);
|
||||||
|
})
|
||||||
|
->addColumn('tentang', function ($row) {
|
||||||
|
return $this->kolomTentang($row['tentang'], $row['id_sk']);
|
||||||
})
|
})
|
||||||
->escapeColumns([])
|
->escapeColumns([])
|
||||||
->make(true);
|
->make(true);
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
namespace App\Http\Controllers\Verifikasi\SK;
|
namespace App\Http\Controllers\Verifikasi\SK;
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Http\Controllers\Verifikasi\SK\Concerns\FormatKolomSk;
|
||||||
use App\Models\Verifikator\Periode;
|
use App\Models\Verifikator\Periode;
|
||||||
use App\Models\Verifikator\Sk;
|
use App\Models\Verifikator\Sk;
|
||||||
use App\Models\Verifikator\Team;
|
use App\Models\Verifikator\Team;
|
||||||
@@ -14,6 +15,8 @@ use Yajra\DataTables\Facades\DataTables;
|
|||||||
|
|
||||||
class BelumVerifikasiController extends Controller
|
class BelumVerifikasiController extends Controller
|
||||||
{
|
{
|
||||||
|
use FormatKolomSk;
|
||||||
|
|
||||||
private $siskaService;
|
private $siskaService;
|
||||||
|
|
||||||
private $auth;
|
private $auth;
|
||||||
@@ -49,6 +52,15 @@ class BelumVerifikasiController extends Controller
|
|||||||
return view('verifikasi.sk.belum-verifikasi.index', compact('title', 'units', 'periode'));
|
return view('verifikasi.sk.belum-verifikasi.index', compact('title', 'units', 'periode'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Penanda SK Schedule. Kriterianya belum ditentukan (tab Schedule masih "segera hadir"),
|
||||||
|
* sehingga untuk sekarang semua SK dianggap SK biasa.
|
||||||
|
*/
|
||||||
|
private function isSkSchedule(array $row): bool
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public function data(Request $request)
|
public function data(Request $request)
|
||||||
{
|
{
|
||||||
$unitId = $request->unit_id;
|
$unitId = $request->unit_id;
|
||||||
@@ -105,8 +117,33 @@ class BelumVerifikasiController extends Controller
|
|||||||
->values()
|
->values()
|
||||||
->toArray();
|
->toArray();
|
||||||
|
|
||||||
return DataTables::of($data)
|
// Tab "SK Biasa" menyembunyikan SK Schedule; tab "Semua SK" menampilkan keduanya
|
||||||
|
$tampil = $request->jenis === 'biasa'
|
||||||
|
? array_values(array_filter($data, fn ($row) => ! $this->isSkSchedule($row)))
|
||||||
|
: $data;
|
||||||
|
|
||||||
|
return DataTables::of($tampil)
|
||||||
->addIndexColumn()
|
->addIndexColumn()
|
||||||
|
->editColumn('no_sk', function ($row) use ($visibleDuplicateIds, $finalizedPreviouslyIds) {
|
||||||
|
$peringatan = [];
|
||||||
|
if (empty($row['anggota'])) {
|
||||||
|
$peringatan[] = $this->peringatanSk('SK ini tidak memiliki anggota');
|
||||||
|
}
|
||||||
|
if (in_array($row['id'], $visibleDuplicateIds)) {
|
||||||
|
$peringatan[] = $this->peringatanSk('Nomor SK ini terindikasi duplikat');
|
||||||
|
}
|
||||||
|
if (in_array($row['id'], $finalizedPreviouslyIds)) {
|
||||||
|
$peringatan[] = $this->peringatanSk('Nomor SK ini sudah difinalisasi sebelumnya');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->kolomNoSk(
|
||||||
|
$row['no_sk'] ?? null,
|
||||||
|
$row['id_unit_penandatangan'] ?? $row['id_unit'] ?? null,
|
||||||
|
$peringatan,
|
||||||
|
true,
|
||||||
|
$row['unit']['nama'] ?? $row['nama_unit'] ?? null
|
||||||
|
);
|
||||||
|
})
|
||||||
->addColumn('tanggal_sk', function ($row) {
|
->addColumn('tanggal_sk', function ($row) {
|
||||||
return $row['tanggal_sk'] ? Carbon::parse($row['tanggal_sk'])->format('d/m/Y') : '-';
|
return $row['tanggal_sk'] ? Carbon::parse($row['tanggal_sk'])->format('d/m/Y') : '-';
|
||||||
})
|
})
|
||||||
@@ -144,19 +181,8 @@ class BelumVerifikasiController extends Controller
|
|||||||
->addColumn('is_finalized_previously', function ($row) use ($finalizedPreviouslyIds) {
|
->addColumn('is_finalized_previously', function ($row) use ($finalizedPreviouslyIds) {
|
||||||
return in_array($row['id'], $finalizedPreviouslyIds);
|
return in_array($row['id'], $finalizedPreviouslyIds);
|
||||||
})
|
})
|
||||||
->addColumn('tentang', function ($row) use ($visibleDuplicateIds, $finalizedPreviouslyIds) {
|
->addColumn('tentang', function ($row) {
|
||||||
$tentang = e($row['tentang'] ?? '-');
|
return $this->kolomTentang($row['tentang'] ?? null, $row['id']);
|
||||||
if (empty($row['anggota'])) {
|
|
||||||
$tentang .= '<br><small class="text-warning fw-bold"><i class="uil-exclamation-triangle"></i> SK ini tidak memiliki anggota</small>';
|
|
||||||
}
|
|
||||||
if (in_array($row['id'], $visibleDuplicateIds)) {
|
|
||||||
$tentang .= '<br><small class="text-warning fw-bold"><i class="uil-exclamation-triangle"></i> Nomor SK ini terindikasi duplikat</small>';
|
|
||||||
}
|
|
||||||
if (in_array($row['id'], $finalizedPreviouslyIds)) {
|
|
||||||
$tentang .= '<br><small class="text-warning fw-bold"><i class="uil-exclamation-triangle"></i> Nomor SK ini sudah difinalisasi sebelumnya</small>';
|
|
||||||
}
|
|
||||||
|
|
||||||
return $tentang;
|
|
||||||
})
|
})
|
||||||
->escapeColumns([])
|
->escapeColumns([])
|
||||||
->make(true);
|
->make(true);
|
||||||
|
|||||||
@@ -0,0 +1,97 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Verifikasi\SK\Concerns;
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Cache;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Format tampilan kolom "Nomor SK" dan "Tentang" yang dipakai bersama
|
||||||
|
* oleh seluruh sub menu SK. Controller pengguna harus memiliki properti $siskaService.
|
||||||
|
*
|
||||||
|
* CSS/JS pendukungnya ada di resources/views/verifikasi/sk/_kolom_sk_css.blade.php
|
||||||
|
* dan _kolom_sk_js.blade.php.
|
||||||
|
*/
|
||||||
|
trait FormatKolomSk
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Peta id unit => nama unit dari SISKA (di-cache agar tidak memanggil SISKA tiap request).
|
||||||
|
*/
|
||||||
|
protected function petaNamaUnit(): array
|
||||||
|
{
|
||||||
|
$cached = Cache::get('siska_daftar_unit_nama');
|
||||||
|
if (! empty($cached)) {
|
||||||
|
return $cached;
|
||||||
|
}
|
||||||
|
|
||||||
|
$units = collect($this->siskaService->daftarUnits() ?? [])->pluck('nama', 'id')->toArray();
|
||||||
|
|
||||||
|
// Jangan cache hasil kosong (mis. SISKA sedang maintenance)
|
||||||
|
if (! empty($units)) {
|
||||||
|
Cache::put('siska_daftar_unit_nama', $units, 3600);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $units;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Satu baris keterangan di bawah Nomor SK.
|
||||||
|
*/
|
||||||
|
protected function peringatanSk(string $pesan, string $ikon = 'uil-exclamation-triangle', string $kelas = 'text-warning'): array
|
||||||
|
{
|
||||||
|
return ['pesan' => $pesan, 'ikon' => $ikon, 'kelas' => $kelas];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Isi kolom Nomor SK: nomor, nama unit (1 baris, dipotong "..."), lalu keterangan kondisi SK.
|
||||||
|
* Jika tidak ada peringatan dan $tampilkanLengkap true, tampil "SK Lengkap".
|
||||||
|
*/
|
||||||
|
protected function kolomNoSk(?string $noSk, $unitId, array $peringatan = [], bool $tampilkanLengkap = true, ?string $namaUnit = null): string
|
||||||
|
{
|
||||||
|
$namaUnit ??= $unitId !== null ? ($this->petaNamaUnit()[$unitId] ?? null) : null;
|
||||||
|
|
||||||
|
$html = e($noSk ?? '-');
|
||||||
|
if ($namaUnit) {
|
||||||
|
$html .= '<small class="d-block text-muted text-truncate" style="max-width: 220px;" title="'.e($namaUnit).'">'.e($namaUnit).'</small>';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! empty($peringatan) || $tampilkanLengkap) {
|
||||||
|
$html .= '<div class="mt-2">';
|
||||||
|
foreach ($peringatan as $item) {
|
||||||
|
$html .= '<small class="d-block '.e($item['kelas']).' fw-bold text-truncate" style="max-width: 220px;" title="'.e($item['pesan']).'">'
|
||||||
|
.'<i class="'.e($item['ikon']).'"></i> '.e($item['pesan']).'</small>';
|
||||||
|
}
|
||||||
|
if (empty($peringatan)) {
|
||||||
|
$html .= '<small class="d-block fw-bold text-truncate" style="max-width: 220px; color: #0d9488;"><i class="uil-check-circle"></i> SK Lengkap</small>';
|
||||||
|
}
|
||||||
|
$html .= '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
return $html;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Isi kolom Tentang: teks maks 2 baris + "Baca selengkapnya", dan tombol salin (nama tentang / ID SK).
|
||||||
|
*/
|
||||||
|
protected function kolomTentang(?string $tentang, $idSk): string
|
||||||
|
{
|
||||||
|
$teks = e($tentang ?? '-');
|
||||||
|
$salinNama = e($tentang ?? '');
|
||||||
|
$salinId = e($idSk);
|
||||||
|
|
||||||
|
$tombolSalin = '<div class="dropdown flex-shrink-0">'
|
||||||
|
.'<button type="button" class="btn btn-light border btn-salin-toggle" data-bs-toggle="dropdown" aria-expanded="false" title="Salin" style="padding: 1px 6px; line-height: 1.2; font-size: 13px;">'
|
||||||
|
.'<i class="uil-copy"></i></button>'
|
||||||
|
.'<ul class="dropdown-menu dropdown-menu-end">'
|
||||||
|
.'<li><button type="button" class="dropdown-item btn-salin" data-salin="'.$salinNama.'" data-label="Nama tentang"><i class="uil-file-alt me-1"></i> Salin Nama Tentang</button></li>'
|
||||||
|
.'<li><button type="button" class="dropdown-item btn-salin" data-salin="'.$salinId.'" data-label="ID SK"><i class="uil-pound me-1"></i> Salin ID SK</button></li>'
|
||||||
|
.'</ul></div>';
|
||||||
|
|
||||||
|
return '<div class="d-flex align-items-center justify-content-between gap-2">'
|
||||||
|
.'<div>'
|
||||||
|
.'<div class="tentang-teks">'.$teks.'</div>'
|
||||||
|
.'<a href="javascript:void(0);" class="tentang-baca small d-none">Baca selengkapnya ...</a>'
|
||||||
|
.'</div>'
|
||||||
|
.$tombolSalin
|
||||||
|
.'</div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,11 +4,13 @@ namespace App\Http\Controllers\Verifikasi\SK;
|
|||||||
|
|
||||||
use App\Helpers\BeritaAcaraHelper;
|
use App\Helpers\BeritaAcaraHelper;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Http\Controllers\Verifikasi\SK\Concerns\FormatKolomSk;
|
||||||
use App\Models\DokSiremun\Kegiatan;
|
use App\Models\DokSiremun\Kegiatan;
|
||||||
use App\Models\DokSiremun\LogPengajuan;
|
use App\Models\DokSiremun\LogPengajuan;
|
||||||
use App\Models\DokSiremun\Syarat;
|
use App\Models\DokSiremun\Syarat;
|
||||||
use App\Models\Siska\AnggotaSk as SiskaAnggotaSk;
|
use App\Models\Siska\AnggotaSk as SiskaAnggotaSk;
|
||||||
use App\Models\Siska\Sk as SiskaSk;
|
use App\Models\Siska\Sk as SiskaSk;
|
||||||
|
use App\Models\Sidia\Pegawai as SidiaPegawai;
|
||||||
use App\Models\Verifikator\AnggotaSk as VerifikatorAnggotaSk;
|
use App\Models\Verifikator\AnggotaSk as VerifikatorAnggotaSk;
|
||||||
use App\Models\Verifikator\CatatanKategoriRubrik;
|
use App\Models\Verifikator\CatatanKategoriRubrik;
|
||||||
use App\Models\Verifikator\LogRubrik;
|
use App\Models\Verifikator\LogRubrik;
|
||||||
@@ -36,6 +38,8 @@ use Yajra\DataTables\Facades\DataTables;
|
|||||||
|
|
||||||
class DetailController extends Controller
|
class DetailController extends Controller
|
||||||
{
|
{
|
||||||
|
use FormatKolomSk;
|
||||||
|
|
||||||
private $siskaService;
|
private $siskaService;
|
||||||
|
|
||||||
private $dokumenService;
|
private $dokumenService;
|
||||||
@@ -160,7 +164,10 @@ class DetailController extends Controller
|
|||||||
return redirect()->back()->with('info', $errorMessage ?: 'Periode Verifikasi SK telah Selesai.');
|
return redirect()->back()->with('info', $errorMessage ?: 'Periode Verifikasi SK telah Selesai.');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($sk['kategori'] !== 'Lainnya') {
|
// Mode klaim: dibuka dari daftar Klaim Ulang (?klaim=1) untuk SK reklaim yang belum diklaim
|
||||||
|
$klaimDiminta = request()->boolean('klaim') && $this->auth->can('Verifikasi SK Klaim Ulang');
|
||||||
|
|
||||||
|
if ($sk['kategori'] !== 'Lainnya' && ! $klaimDiminta) {
|
||||||
if (request()->ajax()) {
|
if (request()->ajax()) {
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'success' => false,
|
'success' => false,
|
||||||
@@ -188,6 +195,9 @@ class DetailController extends Controller
|
|||||||
->where('catatan', 'LIKE', '%SK Reklaim%')
|
->where('catatan', 'LIKE', '%SK Reklaim%')
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
|
// SK reklaim yang belum diklaim pada periode aktif
|
||||||
|
$modeKlaim = $klaimDiminta && ! $skVerifikator;
|
||||||
|
|
||||||
if ($skVerifikator) {
|
if ($skVerifikator) {
|
||||||
// Ambil dari tabel verifikator jika SK diklaim ulang
|
// Ambil dari tabel verifikator jika SK diklaim ulang
|
||||||
$sk['anggota'] = VerifikatorAnggotaSk::select(
|
$sk['anggota'] = VerifikatorAnggotaSk::select(
|
||||||
@@ -442,6 +452,13 @@ class DetailController extends Controller
|
|||||||
$kegiatans[$posisi]['selected'] = null;
|
$kegiatans[$posisi]['selected'] = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Posisi "Tidak Ada dalam Rubrik" tidak punya rubrik_id sehingga pilihannya tidak pernah
|
||||||
|
// tersimpan. Pilih otomatis opsi "Tidak Ada dalam Rubrik" (kategori_id 1000) agar
|
||||||
|
// kelompok ini dianggap sudah dipilih dan tidak memblokir tombol Simpan/Finalisasi.
|
||||||
|
if (! $kegiatans[$posisi]['selected'] && collect($kegiatans[$posisi]['kategori'])->contains('kategori_id', 1000)) {
|
||||||
|
$kegiatans[$posisi]['selected'] = 1000;
|
||||||
|
}
|
||||||
|
|
||||||
$kegiatans[$posisi]['notes'] = [];
|
$kegiatans[$posisi]['notes'] = [];
|
||||||
if ($kegiatans[$posisi]['selected']) {
|
if ($kegiatans[$posisi]['selected']) {
|
||||||
// Ekstrak kategori_id dari selected value
|
// Ekstrak kategori_id dari selected value
|
||||||
@@ -505,16 +522,32 @@ class DetailController extends Controller
|
|||||||
$beritaAcaraUploaded = $beritaAcaraCheck['uploaded'];
|
$beritaAcaraUploaded = $beritaAcaraCheck['uploaded'];
|
||||||
$beritaAcaraMessage = $beritaAcaraCheck['message'];
|
$beritaAcaraMessage = $beritaAcaraCheck['message'];
|
||||||
|
|
||||||
|
// Nama unit penandatangan SK (untuk tile File SK); null bila tidak ditemukan
|
||||||
|
$namaUnitPenandatangan = isset($sk['id_unit_penandatangan'])
|
||||||
|
? ($this->petaNamaUnit()[$sk['id_unit_penandatangan']] ?? null)
|
||||||
|
: null;
|
||||||
|
|
||||||
|
// Periode terakhir SK ini diklaim sebelum periode aktif (untuk SK Reklaim)
|
||||||
|
$periodeTerakhirKlaim = null;
|
||||||
|
if ($modeKlaim || $isReklaim) {
|
||||||
|
$skTerakhir = VerifikatorSk::where('id_sk', $id_sk)
|
||||||
|
->where('periode', '!=', $this->periodeAktif)
|
||||||
|
->orderByDesc('created_at')
|
||||||
|
->first();
|
||||||
|
$idPeriodeTerakhir = $skTerakhir?->periode ?? ($sk['periode'] ?? null);
|
||||||
|
$periodeTerakhirKlaim = $idPeriodeTerakhir ? Periode::where('id_periode', $idPeriodeTerakhir)->value('nama') : null;
|
||||||
|
}
|
||||||
|
|
||||||
if ($request->ajax()) {
|
if ($request->ajax()) {
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'success' => true,
|
'success' => true,
|
||||||
'message' => 'Data berhasil dimuat',
|
'message' => 'Data berhasil dimuat',
|
||||||
'html' => view('verifikasi.sk.detail.index', compact('title', 'usia', 'index', 'sk', 'note', 'verifikator', 'kegiatans', 'posisis', 'pegawais', 'existingPosisis', 'iku', 'isReklaim', 'beritaAcaraUploaded', 'beritaAcaraMessage'))->render(),
|
'html' => view('verifikasi.sk.detail.index', compact('title', 'usia', 'index', 'sk', 'note', 'verifikator', 'kegiatans', 'posisis', 'pegawais', 'existingPosisis', 'iku', 'isReklaim', 'beritaAcaraUploaded', 'beritaAcaraMessage', 'namaUnitPenandatangan', 'modeKlaim', 'periodeTerakhirKlaim'))->render(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return view('verifikasi.sk.detail.index', compact('title', 'usia', 'index', 'sk', 'note', 'verifikator', 'kegiatans', 'posisis', 'pegawais', 'existingPosisis', 'iku', 'isReklaim', 'beritaAcaraUploaded', 'beritaAcaraMessage'));
|
return view('verifikasi.sk.detail.index', compact('title', 'usia', 'index', 'sk', 'note', 'verifikator', 'kegiatans', 'posisis', 'pegawais', 'existingPosisis', 'iku', 'isReklaim', 'beritaAcaraUploaded', 'beritaAcaraMessage', 'namaUnitPenandatangan', 'modeKlaim', 'periodeTerakhirKlaim'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function dataAnggotaSk($id)
|
public function dataAnggotaSk($id)
|
||||||
@@ -551,9 +584,12 @@ class DetailController extends Controller
|
|||||||
$pegawaiByNip = $pegawaiCollection->keyBy('nip');
|
$pegawaiByNip = $pegawaiCollection->keyBy('nip');
|
||||||
$pegawaiByNipSiakad = $pegawaiCollection->keyBy('nip_siakad')->filter();
|
$pegawaiByNipSiakad = $pegawaiCollection->keyBy('nip_siakad')->filter();
|
||||||
|
|
||||||
|
$fungsionalSidia = $this->jabatanFungsionalSidia($nips);
|
||||||
|
|
||||||
foreach ($sk['anggota'] as &$value) {
|
foreach ($sk['anggota'] as &$value) {
|
||||||
$pegawai = $pegawaiByNip->get($value['nip']) ?? $pegawaiByNipSiakad->get($value['nip']);
|
$pegawai = $pegawaiByNip->get($value['nip']) ?? $pegawaiByNipSiakad->get($value['nip']);
|
||||||
$value['jtt']['nama'] = $pegawai?->jabatan?->detail?->last()?->tambahan?->nama;
|
$value['jtt']['nama'] = $pegawai?->jabatan?->detail?->last()?->tambahan?->nama;
|
||||||
|
$value['jtt']['fungsional'] = $fungsionalSidia[$value['nip']] ?? null;
|
||||||
$value['jtt']['tgl_berlaku'] = $pegawai?->jabatan_dtt_tanggal_berlaku;
|
$value['jtt']['tgl_berlaku'] = $pegawai?->jabatan_dtt_tanggal_berlaku;
|
||||||
$value['jtt']['tgl_berakhir'] = $pegawai?->jabatan_dtt_tanggal_berakhir;
|
$value['jtt']['tgl_berakhir'] = $pegawai?->jabatan_dtt_tanggal_berakhir;
|
||||||
$value['jenis_pegawai'] = $pegawai?->jenis_pegawai;
|
$value['jenis_pegawai'] = $pegawai?->jenis_pegawai;
|
||||||
@@ -604,13 +640,16 @@ class DetailController extends Controller
|
|||||||
';
|
';
|
||||||
})
|
})
|
||||||
->addColumn('jtt', function ($row) {
|
->addColumn('jtt', function ($row) {
|
||||||
return $row['jtt']['nama'] ? $row['jtt']['nama'] : '-';
|
return $this->kolomJabatan($row['jtt']['fungsional'] ?? null, $row['jtt']['nama'] ?? null);
|
||||||
})
|
})
|
||||||
->addColumn('rubrik_id', function ($row) {
|
->addColumn('rubrik_id', function ($row) {
|
||||||
return $row['rubrik_id'] ? self::uraian($row['rubrik_id']) : '-';
|
return $row['rubrik_id'] ? self::uraian($row['rubrik_id']) : '-';
|
||||||
})
|
})
|
||||||
->addColumn('jangka_waktu', function ($row) {
|
->addColumn('jangka_waktu', function ($row) use ($sk) {
|
||||||
return $row['jangka_waktu'] ? $row['jangka_waktu'].' Bulan' : '-';
|
// SK yang sudah disimpan/difinalisasi: jangka waktu yang belum diubah otomatis 6 bulan
|
||||||
|
$jangkaWaktu = $row['jangka_waktu'] ?? ($sk['status_verifikator'] ? 6 : null);
|
||||||
|
|
||||||
|
return $jangkaWaktu ? $jangkaWaktu.' Bulan' : '-';
|
||||||
})
|
})
|
||||||
->editColumn('kategori_id', function ($row) {
|
->editColumn('kategori_id', function ($row) {
|
||||||
return $row['kategori_id'];
|
return $row['kategori_id'];
|
||||||
@@ -661,6 +700,54 @@ class DetailController extends Controller
|
|||||||
->make(true);
|
->make(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Peta NIP => nama jabatan fungsional dari SIDIA (dicocokkan lewat nip, nip_siakad, atau nip_honorer).
|
||||||
|
* Jika SIDIA tidak dapat dihubungi, kembalikan peta kosong agar halaman tetap tampil.
|
||||||
|
*/
|
||||||
|
private function jabatanFungsionalSidia(array $nips): array
|
||||||
|
{
|
||||||
|
if (empty($nips)) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
$rows = SidiaPegawai::select('nip', 'nip_siakad', 'nip_honorer', 'nama_jabatan_fungsional')
|
||||||
|
->where(function ($q) use ($nips) {
|
||||||
|
$q->whereIn('nip', $nips)->orWhereIn('nip_siakad', $nips)->orWhereIn('nip_honorer', $nips);
|
||||||
|
})
|
||||||
|
->get();
|
||||||
|
} catch (Throwable $e) {
|
||||||
|
Log::warning('SIDIA: gagal mengambil jabatan fungsional - '.$e->getMessage());
|
||||||
|
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
$peta = [];
|
||||||
|
foreach ($rows as $row) {
|
||||||
|
// Urutan: nip_honorer, nip_siakad, lalu nip (nip menimpa jika bentrok)
|
||||||
|
foreach ([$row->nip_honorer, $row->nip_siakad, $row->nip] as $kunci) {
|
||||||
|
if ($kunci) {
|
||||||
|
$peta[$kunci] = $row->nama_jabatan_fungsional;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $peta;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Isi kolom Jabatan: Jabatan Fungsional dan Jabatan Tambahan, masing-masing dengan label kecil.
|
||||||
|
*/
|
||||||
|
private function kolomJabatan(?string $fungsional, ?string $tambahan): string
|
||||||
|
{
|
||||||
|
$blok = fn (string $label, ?string $nilai) => '<div class="text-muted" style="font-size: 11px;">'.$label.'</div>'
|
||||||
|
.'<div class="text-truncate" style="line-height: 1.3; max-width: 280px;" title="'.e($nilai ?: '').'">'.e($nilai ?: '-').'</div>';
|
||||||
|
|
||||||
|
return $blok('Jabatan Fungsional', $fungsional)
|
||||||
|
.'<div class="mt-2"></div>'
|
||||||
|
.$blok('Jabatan Tambahan', $tambahan);
|
||||||
|
}
|
||||||
|
|
||||||
private function dataAnggotaSkReklaim(int|string $id, VerifikatorSk $skVerif): JsonResponse
|
private function dataAnggotaSkReklaim(int|string $id, VerifikatorSk $skVerif): JsonResponse
|
||||||
{
|
{
|
||||||
$anggotas = VerifikatorAnggotaSk::where('id_sk', $id)
|
$anggotas = VerifikatorAnggotaSk::where('id_sk', $id)
|
||||||
@@ -678,7 +765,9 @@ class DetailController extends Controller
|
|||||||
|
|
||||||
$kategori = request()->get('kategori');
|
$kategori = request()->get('kategori');
|
||||||
|
|
||||||
$data = $anggotas->map(function ($anggota) use ($pegawaiByNip, $pegawaiByNipSiakad) {
|
$fungsionalSidia = $this->jabatanFungsionalSidia($nips);
|
||||||
|
|
||||||
|
$data = $anggotas->map(function ($anggota) use ($pegawaiByNip, $pegawaiByNipSiakad, $fungsionalSidia) {
|
||||||
$pegawai = $pegawaiByNip->get($anggota->nip) ?? $pegawaiByNipSiakad->get($anggota->nip);
|
$pegawai = $pegawaiByNip->get($anggota->nip) ?? $pegawaiByNipSiakad->get($anggota->nip);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
@@ -693,6 +782,7 @@ class DetailController extends Controller
|
|||||||
'jangka_waktu' => $anggota->jangka_waktu,
|
'jangka_waktu' => $anggota->jangka_waktu,
|
||||||
'jtt' => [
|
'jtt' => [
|
||||||
'nama' => $pegawai?->jabatan?->detail?->last()?->tambahan?->nama,
|
'nama' => $pegawai?->jabatan?->detail?->last()?->tambahan?->nama,
|
||||||
|
'fungsional' => $fungsionalSidia[$anggota->nip] ?? null,
|
||||||
'tgl_berlaku' => $pegawai?->jabatan_dtt_tanggal_berlaku,
|
'tgl_berlaku' => $pegawai?->jabatan_dtt_tanggal_berlaku,
|
||||||
'tgl_berakhir' => $pegawai?->jabatan_dtt_tanggal_berakhir,
|
'tgl_berakhir' => $pegawai?->jabatan_dtt_tanggal_berakhir,
|
||||||
],
|
],
|
||||||
@@ -740,13 +830,16 @@ class DetailController extends Controller
|
|||||||
return '<div class="d-flex justify-content-center"><div class="form-check form-checkbox-primary mb-2"><input type="checkbox" class="form-check-input" value="'.$row['id'].'"></div></div>';
|
return '<div class="d-flex justify-content-center"><div class="form-check form-checkbox-primary mb-2"><input type="checkbox" class="form-check-input" value="'.$row['id'].'"></div></div>';
|
||||||
})
|
})
|
||||||
->addColumn('jtt', function ($row) {
|
->addColumn('jtt', function ($row) {
|
||||||
return $row['jtt']['nama'] ?? '-';
|
return $this->kolomJabatan($row['jtt']['fungsional'] ?? null, $row['jtt']['nama'] ?? null);
|
||||||
})
|
})
|
||||||
->addColumn('rubrik_id', function ($row) {
|
->addColumn('rubrik_id', function ($row) {
|
||||||
return $row['rubrik_id'] ? self::uraian($row['rubrik_id']) : '-';
|
return $row['rubrik_id'] ? self::uraian($row['rubrik_id']) : '-';
|
||||||
})
|
})
|
||||||
->addColumn('jangka_waktu', function ($row) {
|
->addColumn('jangka_waktu', function ($row) use ($skStatus) {
|
||||||
return $row['jangka_waktu'] ? $row['jangka_waktu'].' Bulan' : '-';
|
// SK yang sudah disimpan/difinalisasi: jangka waktu yang belum diubah otomatis 6 bulan
|
||||||
|
$jangkaWaktu = $row['jangka_waktu'] ?? ($skStatus['status_verifikator'] ? 6 : null);
|
||||||
|
|
||||||
|
return $jangkaWaktu ? $jangkaWaktu.' Bulan' : '-';
|
||||||
})
|
})
|
||||||
->editColumn('kategori_id', fn ($row) => $row['kategori_id'])
|
->editColumn('kategori_id', fn ($row) => $row['kategori_id'])
|
||||||
->editColumn('keterangan', fn ($row) => $row['keterangan'])
|
->editColumn('keterangan', fn ($row) => $row['keterangan'])
|
||||||
@@ -1470,7 +1563,7 @@ class DetailController extends Controller
|
|||||||
'gol' => $anggota->gol,
|
'gol' => $anggota->gol,
|
||||||
'keterangan' => $anggota->keterangan,
|
'keterangan' => $anggota->keterangan,
|
||||||
'catatan' => $anggota->catatan,
|
'catatan' => $anggota->catatan,
|
||||||
'jangka_waktu' => $anggota->jangka_waktu,
|
'jangka_waktu' => $anggota->jangka_waktu ?? 6, // default 6 bulan jika belum diubah
|
||||||
'created_at' => date('Y-m-d H:i:s', strtotime($anggota['created_at'])),
|
'created_at' => date('Y-m-d H:i:s', strtotime($anggota['created_at'])),
|
||||||
'updated_at' => date('Y-m-d H:i:s', strtotime($anggota['updated_at'])),
|
'updated_at' => date('Y-m-d H:i:s', strtotime($anggota['updated_at'])),
|
||||||
'deleted_at' => $anggota['deleted_at'] === null ? null : date('Y-m-d H:i:s', strtotime($anggota['deleted_at'])),
|
'deleted_at' => $anggota['deleted_at'] === null ? null : date('Y-m-d H:i:s', strtotime($anggota['deleted_at'])),
|
||||||
@@ -1762,7 +1855,7 @@ class DetailController extends Controller
|
|||||||
'gol' => $anggota->gol,
|
'gol' => $anggota->gol,
|
||||||
'keterangan' => $anggota->keterangan,
|
'keterangan' => $anggota->keterangan,
|
||||||
'catatan' => $anggota->catatan,
|
'catatan' => $anggota->catatan,
|
||||||
'jangka_waktu' => $anggota->jangka_waktu,
|
'jangka_waktu' => $anggota->jangka_waktu ?? 6, // default 6 bulan jika belum diubah
|
||||||
'created_at' => date('Y-m-d H:i:s', strtotime($anggota['created_at'])),
|
'created_at' => date('Y-m-d H:i:s', strtotime($anggota['created_at'])),
|
||||||
'updated_at' => date('Y-m-d H:i:s', strtotime($anggota['updated_at'])),
|
'updated_at' => date('Y-m-d H:i:s', strtotime($anggota['updated_at'])),
|
||||||
'deleted_at' => $anggota['deleted_at'] === null ? null : date('Y-m-d H:i:s', strtotime($anggota['deleted_at'])),
|
'deleted_at' => $anggota['deleted_at'] === null ? null : date('Y-m-d H:i:s', strtotime($anggota['deleted_at'])),
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
namespace App\Http\Controllers\Verifikasi\SK;
|
namespace App\Http\Controllers\Verifikasi\SK;
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Http\Controllers\Verifikasi\SK\Concerns\FormatKolomSk;
|
||||||
use App\Models\Verifikator\Periode;
|
use App\Models\Verifikator\Periode;
|
||||||
use App\Models\Verifikator\Sk;
|
use App\Models\Verifikator\Sk;
|
||||||
use App\Models\Verifikator\Team;
|
use App\Models\Verifikator\Team;
|
||||||
@@ -15,6 +16,8 @@ use Yajra\DataTables\Facades\DataTables;
|
|||||||
|
|
||||||
class DiterimaController extends Controller
|
class DiterimaController extends Controller
|
||||||
{
|
{
|
||||||
|
use FormatKolomSk;
|
||||||
|
|
||||||
private $siskaService;
|
private $siskaService;
|
||||||
|
|
||||||
private $periodeAktif;
|
private $periodeAktif;
|
||||||
@@ -56,7 +59,8 @@ class DiterimaController extends Controller
|
|||||||
public function data(Request $request)
|
public function data(Request $request)
|
||||||
{
|
{
|
||||||
$team = Team::find(session('team_id'));
|
$team = Team::find(session('team_id'));
|
||||||
$sks = Sk::select('id', 'id_sk', 'tanggal as tanggal_sk', 'no_sk', 'tentang', 'verif_verifikator as status_verifikator', 'finalisasi', 'sk_jadi as sk')
|
$sks = Sk::select('id', 'id_sk', 'tanggal as tanggal_sk', 'no_sk', 'tentang', 'verif_verifikator as status_verifikator', 'finalisasi', 'sk_jadi as sk', 'id_unit_penandatangan')
|
||||||
|
->withCount('anggota')
|
||||||
->where('periode', $this->periodeAktif)
|
->where('periode', $this->periodeAktif)
|
||||||
->where('verif_verifikator', 1)
|
->where('verif_verifikator', 1)
|
||||||
->where('finalisasi', 1)
|
->where('finalisasi', 1)
|
||||||
@@ -170,6 +174,16 @@ class DiterimaController extends Controller
|
|||||||
->addColumn('url_detail', function ($row) {
|
->addColumn('url_detail', function ($row) {
|
||||||
return route('sk.detail.index', $row['id_sk']);
|
return route('sk.detail.index', $row['id_sk']);
|
||||||
})
|
})
|
||||||
|
->editColumn('no_sk', function ($row) {
|
||||||
|
$peringatan = $row->anggota_count === 0
|
||||||
|
? [$this->peringatanSk('SK ini tidak memiliki anggota')]
|
||||||
|
: [];
|
||||||
|
|
||||||
|
return $this->kolomNoSk($row['no_sk'], $row['id_unit_penandatangan'], $peringatan);
|
||||||
|
})
|
||||||
|
->addColumn('tentang', function ($row) {
|
||||||
|
return $this->kolomTentang($row['tentang'], $row['id_sk']);
|
||||||
|
})
|
||||||
->escapeColumns([])
|
->escapeColumns([])
|
||||||
->make(true);
|
->make(true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
namespace App\Http\Controllers\Verifikasi\SK;
|
namespace App\Http\Controllers\Verifikasi\SK;
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Http\Controllers\Verifikasi\SK\Concerns\FormatKolomSk;
|
||||||
use App\Models\Verifikator\Periode;
|
use App\Models\Verifikator\Periode;
|
||||||
use App\Models\Verifikator\Sk;
|
use App\Models\Verifikator\Sk;
|
||||||
use App\Models\Verifikator\Team;
|
use App\Models\Verifikator\Team;
|
||||||
@@ -15,6 +16,8 @@ use Yajra\DataTables\Facades\DataTables;
|
|||||||
|
|
||||||
class DitolakController extends Controller
|
class DitolakController extends Controller
|
||||||
{
|
{
|
||||||
|
use FormatKolomSk;
|
||||||
|
|
||||||
private $siskaService;
|
private $siskaService;
|
||||||
|
|
||||||
private $periodeAktif;
|
private $periodeAktif;
|
||||||
@@ -64,6 +67,7 @@ class DitolakController extends Controller
|
|||||||
'verif_verifikator as status_verifikator',
|
'verif_verifikator as status_verifikator',
|
||||||
'finalisasi',
|
'finalisasi',
|
||||||
'sk_jadi as sk',
|
'sk_jadi as sk',
|
||||||
|
'id_unit_penandatangan',
|
||||||
DB::raw('(SELECT note FROM verifikator.log_verifikasi_sks WHERE id_sk = verifikator.sks.id_sk::varchar AND status = false ORDER BY created_at DESC LIMIT 1) as alasan_tolak')
|
DB::raw('(SELECT note FROM verifikator.log_verifikasi_sks WHERE id_sk = verifikator.sks.id_sk::varchar AND status = false ORDER BY created_at DESC LIMIT 1) as alasan_tolak')
|
||||||
)
|
)
|
||||||
->where('periode', $this->periodeAktif)
|
->where('periode', $this->periodeAktif)
|
||||||
@@ -145,17 +149,16 @@ class DitolakController extends Controller
|
|||||||
->addColumn('url_detail', function ($row) {
|
->addColumn('url_detail', function ($row) {
|
||||||
return route('sk.detail.index', $row['id']);
|
return route('sk.detail.index', $row['id']);
|
||||||
})
|
})
|
||||||
->addColumn('tentang', function ($row) {
|
->editColumn('no_sk', function ($row) {
|
||||||
$tentang = e($row->tentang ?? '-');
|
// Alasan penolakan ditampilkan sebagai keterangan; tanpa alasan tidak ada label "SK Lengkap"
|
||||||
$alasan = $row->alasan_tolak;
|
$peringatan = $row->alasan_tolak
|
||||||
if ($alasan) {
|
? [$this->peringatanSk($row->alasan_tolak, 'uil-ban', 'text-danger')]
|
||||||
return $tentang
|
: [];
|
||||||
.'<br><small class="text-danger fw-bold"><i class="uil-ban"></i> '
|
|
||||||
.e($alasan)
|
|
||||||
.'</small>';
|
|
||||||
}
|
|
||||||
|
|
||||||
return $tentang;
|
return $this->kolomNoSk($row->no_sk, $row->id_unit_penandatangan, $peringatan, false);
|
||||||
|
})
|
||||||
|
->addColumn('tentang', function ($row) {
|
||||||
|
return $this->kolomTentang($row->tentang, $row->id);
|
||||||
})
|
})
|
||||||
->escapeColumns([])
|
->escapeColumns([])
|
||||||
->make(true);
|
->make(true);
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ namespace App\Http\Controllers\Verifikasi\SK;
|
|||||||
|
|
||||||
use App\Helpers\BeritaAcaraHelper;
|
use App\Helpers\BeritaAcaraHelper;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Http\Controllers\Verifikasi\SK\Concerns\FormatKolomSk;
|
||||||
use App\Models\DokSiremun\Kegiatan;
|
use App\Models\DokSiremun\Kegiatan;
|
||||||
use App\Models\Siska\Sk as SiskaSk;
|
use App\Models\Siska\Sk as SiskaSk;
|
||||||
use App\Models\Verifikator\AnggotaSk as VerifikatorAnggotaSk;
|
use App\Models\Verifikator\AnggotaSk as VerifikatorAnggotaSk;
|
||||||
@@ -23,6 +24,8 @@ use Yajra\DataTables\Facades\DataTables;
|
|||||||
|
|
||||||
class KlaimUlangController extends Controller
|
class KlaimUlangController extends Controller
|
||||||
{
|
{
|
||||||
|
use FormatKolomSk;
|
||||||
|
|
||||||
private $siskaService;
|
private $siskaService;
|
||||||
|
|
||||||
private $dokumenService;
|
private $dokumenService;
|
||||||
@@ -88,6 +91,25 @@ class KlaimUlangController extends Controller
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Nama periode "(395) 2024/2025 Genap" ditampilkan dua baris: "(395)" lalu "2024/2025 Genap".
|
||||||
|
* Nama yang tidak berawalan "(id)" ditampilkan apa adanya.
|
||||||
|
*/
|
||||||
|
private function kolomPeriode(?string $nama): string
|
||||||
|
{
|
||||||
|
$nama = trim((string) $nama);
|
||||||
|
|
||||||
|
if ($nama === '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (preg_match('/^(\(\d+\))\s*(.+)$/u', $nama, $cocok)) {
|
||||||
|
return '<div>'.e($cocok[1]).'</div><div class="text-nowrap">'.e($cocok[2]).'</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
return e($nama);
|
||||||
|
}
|
||||||
|
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
$title = 'Klaim Ulang';
|
$title = 'Klaim Ulang';
|
||||||
@@ -258,6 +280,21 @@ class KlaimUlangController extends Controller
|
|||||||
|
|
||||||
return '<span class="text-muted">-</span>';
|
return '<span class="text-muted">-</span>';
|
||||||
})
|
})
|
||||||
|
->editColumn('no_sk', function ($row) {
|
||||||
|
// Hanya tandai "tidak memiliki anggota" jika data anggota memang dikirim oleh SISKA
|
||||||
|
$peringatan = array_key_exists('anggota', $row) && empty($row['anggota'])
|
||||||
|
? [$this->peringatanSk('SK ini tidak memiliki anggota')]
|
||||||
|
: [];
|
||||||
|
|
||||||
|
return $this->kolomNoSk(
|
||||||
|
$row['no_sk'] ?? null,
|
||||||
|
$row['id_unit_penandatangan'] ?? $row['id_unit'] ?? null,
|
||||||
|
$peringatan
|
||||||
|
);
|
||||||
|
})
|
||||||
|
->addColumn('tentang', function ($row) {
|
||||||
|
return $this->kolomTentang($row['tentang'] ?? null, $row['id']);
|
||||||
|
})
|
||||||
->addColumn('tanggal_sk', function ($row) {
|
->addColumn('tanggal_sk', function ($row) {
|
||||||
return $row['tanggal_sk'] ? Carbon::parse($row['tanggal_sk'])->format('d/m/Y') : '-';
|
return $row['tanggal_sk'] ? Carbon::parse($row['tanggal_sk'])->format('d/m/Y') : '-';
|
||||||
})
|
})
|
||||||
@@ -265,10 +302,10 @@ class KlaimUlangController extends Controller
|
|||||||
$skTerakhir = $skRecords->get($row['id'])?->first();
|
$skTerakhir = $skRecords->get($row['id'])?->first();
|
||||||
|
|
||||||
if ($skTerakhir) {
|
if ($skTerakhir) {
|
||||||
return $periodes->get($skTerakhir->periode)?->nama ?? '-';
|
return $this->kolomPeriode($periodes->get($skTerakhir->periode)?->nama);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $periodes->get($row['periode'])?->nama ?? '-';
|
return $this->kolomPeriode($periodes->get($row['periode'])?->nama);
|
||||||
})
|
})
|
||||||
->addColumn('status_klaim', function ($row) use ($klaimedSkMap) {
|
->addColumn('status_klaim', function ($row) use ($klaimedSkMap) {
|
||||||
if (! $this->periodeAktif) {
|
if (! $this->periodeAktif) {
|
||||||
@@ -280,7 +317,8 @@ class KlaimUlangController extends Controller
|
|||||||
: '<span class="badge bg-warning rounded-pill fs-6 px-2 py-1">Belum Diklaim</span>';
|
: '<span class="badge bg-warning rounded-pill fs-6 px-2 py-1">Belum Diklaim</span>';
|
||||||
})
|
})
|
||||||
->addColumn('url_detail', function ($row) {
|
->addColumn('url_detail', function ($row) {
|
||||||
return route('sk.klaim-ulang.detail', $row['id']);
|
// Dibuka di halaman detail SK biasa dalam mode klaim
|
||||||
|
return route('sk.detail.index', $row['id']).'?klaim=1';
|
||||||
})
|
})
|
||||||
->escapeColumns([])
|
->escapeColumns([])
|
||||||
->make(true);
|
->make(true);
|
||||||
@@ -288,55 +326,8 @@ class KlaimUlangController extends Controller
|
|||||||
|
|
||||||
public function detail($id_sk)
|
public function detail($id_sk)
|
||||||
{
|
{
|
||||||
$title = 'Detail SK - Klaim Ulang';
|
// Detail Klaim Ulang kini memakai halaman detail SK biasa (mode klaim); URL lama dialihkan
|
||||||
|
return redirect()->to(route('sk.detail.index', $id_sk).'?klaim=1'.(request('unit_id') ? '&unit_id='.request('unit_id') : ''));
|
||||||
// Cari SK dari API reclaim
|
|
||||||
$sk = $this->findSkFromReclaim($id_sk);
|
|
||||||
|
|
||||||
if (! $sk) {
|
|
||||||
return redirect()->route('sk.klaim-ulang.index')->with('error', 'SK tidak ditemukan');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ambil periode aktif
|
|
||||||
$periodeAktif = Periode::where('status', true)->first();
|
|
||||||
|
|
||||||
// Cek periode verifikasi SK
|
|
||||||
if ($periodeAktif && ! $periodeAktif->canVerifySk() && $this->auth->id !== 1) {
|
|
||||||
$errorMessage = $periodeAktif->getSkVerificationErrorMessage();
|
|
||||||
|
|
||||||
return redirect()->route('sk.klaim-ulang.index')->with('info', $errorMessage ?: 'Periode Verifikasi SK telah Selesai.');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ambil periode terakhir klaim dari database (jika ada)
|
|
||||||
$skTerakhir = Sk::where('id_sk', $id_sk)
|
|
||||||
->orderBy('created_at', 'desc')
|
|
||||||
->first();
|
|
||||||
|
|
||||||
// Jika ditemukan di database, ambil nama periode dari relasi atau id_periode
|
|
||||||
$periodeNama = null;
|
|
||||||
if ($skTerakhir) {
|
|
||||||
$periodeData = Periode::where('id_periode', $skTerakhir->periode)->first();
|
|
||||||
$periodeNama = $periodeData ? $periodeData->nama : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Jika tidak ditemukan di database, ambil dari API
|
|
||||||
if (! $periodeNama) {
|
|
||||||
$periodeNama = $sk['periode'] ?? null;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Cek apakah sudah diklaim
|
|
||||||
$sudahDiklaim = false;
|
|
||||||
if ($periodeAktif) {
|
|
||||||
$sudahDiklaim = Sk::where('id_sk', $id_sk)
|
|
||||||
->where('periode', $periodeAktif->id_periode)
|
|
||||||
->exists();
|
|
||||||
}
|
|
||||||
|
|
||||||
$beritaAcaraCheck = BeritaAcaraHelper::checkBeritaAcaraByTeam(session('team_id'));
|
|
||||||
$beritaAcaraUploaded = $beritaAcaraCheck['uploaded'];
|
|
||||||
$beritaAcaraMessage = $beritaAcaraCheck['message'];
|
|
||||||
|
|
||||||
return view('verifikasi.sk.klaim-ulang.detail', compact('title', 'sk', 'periodeAktif', 'sudahDiklaim', 'periodeNama', 'beritaAcaraUploaded', 'beritaAcaraMessage'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function dataAnggota($id_sk)
|
public function dataAnggota($id_sk)
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
namespace App\Http\Controllers\Verifikasi\SK;
|
namespace App\Http\Controllers\Verifikasi\SK;
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Http\Controllers\Verifikasi\SK\Concerns\FormatKolomSk;
|
||||||
use App\Models\Verifikator\Periode;
|
use App\Models\Verifikator\Periode;
|
||||||
use App\Models\Verifikator\Team;
|
use App\Models\Verifikator\Team;
|
||||||
use App\Services\SiskaService;
|
use App\Services\SiskaService;
|
||||||
@@ -13,6 +14,8 @@ use Yajra\DataTables\Facades\DataTables;
|
|||||||
|
|
||||||
class PerluPerbaikanController extends Controller
|
class PerluPerbaikanController extends Controller
|
||||||
{
|
{
|
||||||
|
use FormatKolomSk;
|
||||||
|
|
||||||
private $siskaService;
|
private $siskaService;
|
||||||
|
|
||||||
private $auth;
|
private $auth;
|
||||||
@@ -110,14 +113,19 @@ class PerluPerbaikanController extends Controller
|
|||||||
->addColumn('no_anggota', function ($row) {
|
->addColumn('no_anggota', function ($row) {
|
||||||
return empty($row['anggota']);
|
return empty($row['anggota']);
|
||||||
})
|
})
|
||||||
->addColumn('tentang', function ($row) {
|
->editColumn('no_sk', function ($row) {
|
||||||
$tentang = e($row['tentang'] ?? '-');
|
$peringatan = empty($row['anggota'])
|
||||||
if (empty($row['anggota'])) {
|
? [$this->peringatanSk('SK ini tidak memiliki anggota')]
|
||||||
return $tentang
|
: [];
|
||||||
.'<br><small class="text-danger"><i class="uil-exclamation-triangle"></i> SK tidak memiliki anggota</small>';
|
|
||||||
}
|
|
||||||
|
|
||||||
return $tentang;
|
return $this->kolomNoSk(
|
||||||
|
$row['no_sk'] ?? null,
|
||||||
|
$row['id_unit_penandatangan'] ?? $row['id_unit'] ?? null,
|
||||||
|
$peringatan
|
||||||
|
);
|
||||||
|
})
|
||||||
|
->addColumn('tentang', function ($row) {
|
||||||
|
return $this->kolomTentang($row['tentang'] ?? null, $row['id']);
|
||||||
})
|
})
|
||||||
->escapeColumns([])
|
->escapeColumns([])
|
||||||
->make(true);
|
->make(true);
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
namespace App\Http\Controllers\Verifikasi\SK;
|
namespace App\Http\Controllers\Verifikasi\SK;
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Http\Controllers\Verifikasi\SK\Concerns\FormatKolomSk;
|
||||||
use App\Models\Verifikator\Periode;
|
use App\Models\Verifikator\Periode;
|
||||||
use App\Models\Verifikator\Team;
|
use App\Models\Verifikator\Team;
|
||||||
use App\Services\SiskaService;
|
use App\Services\SiskaService;
|
||||||
@@ -13,6 +14,8 @@ use Yajra\DataTables\Facades\DataTables;
|
|||||||
|
|
||||||
class SudahDiperbaikiController extends Controller
|
class SudahDiperbaikiController extends Controller
|
||||||
{
|
{
|
||||||
|
use FormatKolomSk;
|
||||||
|
|
||||||
private $siskaService;
|
private $siskaService;
|
||||||
|
|
||||||
private $auth;
|
private $auth;
|
||||||
@@ -102,14 +105,19 @@ class SudahDiperbaikiController extends Controller
|
|||||||
->addColumn('no_anggota', function ($row) {
|
->addColumn('no_anggota', function ($row) {
|
||||||
return empty($row['anggota']);
|
return empty($row['anggota']);
|
||||||
})
|
})
|
||||||
->addColumn('tentang', function ($row) {
|
->editColumn('no_sk', function ($row) {
|
||||||
$tentang = e($row['tentang'] ?? '-');
|
$peringatan = empty($row['anggota'])
|
||||||
if (empty($row['anggota'])) {
|
? [$this->peringatanSk('SK ini tidak memiliki anggota')]
|
||||||
return $tentang
|
: [];
|
||||||
.'<br><small class="text-danger"><i class="uil-exclamation-triangle"></i> SK tidak memiliki anggota</small>';
|
|
||||||
}
|
|
||||||
|
|
||||||
return $tentang;
|
return $this->kolomNoSk(
|
||||||
|
$row['no_sk'] ?? null,
|
||||||
|
$row['id_unit_penandatangan'] ?? $row['id_unit'] ?? null,
|
||||||
|
$peringatan
|
||||||
|
);
|
||||||
|
})
|
||||||
|
->addColumn('tentang', function ($row) {
|
||||||
|
return $this->kolomTentang($row['tentang'] ?? null, $row['id']);
|
||||||
})
|
})
|
||||||
->escapeColumns([])
|
->escapeColumns([])
|
||||||
->make(true);
|
->make(true);
|
||||||
|
|||||||
@@ -5,11 +5,14 @@ namespace App\Http\Controllers\Verifikasi\TriDharma;
|
|||||||
use App\Helpers\BeritaAcaraHelper;
|
use App\Helpers\BeritaAcaraHelper;
|
||||||
use App\Helpers\JabatanPegawaiTambahanHelper;
|
use App\Helpers\JabatanPegawaiTambahanHelper;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Models\Sidia\Pegawai as SidiaPegawai;
|
||||||
use App\Models\Verifikator\Team;
|
use App\Models\Verifikator\Team;
|
||||||
use App\Models\Verifikator\View\Pegawai;
|
use App\Models\Verifikator\View\Pegawai;
|
||||||
use App\Services\DawaiService;
|
use App\Services\DawaiService;
|
||||||
|
use Exception;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
use Yajra\DataTables\Facades\DataTables;
|
use Yajra\DataTables\Facades\DataTables;
|
||||||
|
|
||||||
class BawahanController extends Controller
|
class BawahanController extends Controller
|
||||||
@@ -47,18 +50,8 @@ class BawahanController extends Controller
|
|||||||
|
|
||||||
// Admin: tampilkan list seluruh atasan (Ketua Jurusan), detail bawahan dibuka lewat modal (AJAX)
|
// Admin: tampilkan list seluruh atasan (Ketua Jurusan), detail bawahan dibuka lewat modal (AJAX)
|
||||||
if ($isAdmin) {
|
if ($isAdmin) {
|
||||||
$ketuaJurusans = JabatanPegawaiTambahanHelper::getAllKetuaJurusan();
|
// Daftar atasan dimuat lewat AJAX (dataAtasan)
|
||||||
$ketuaJurusanNips = $ketuaJurusans->pluck('nip')->toArray();
|
return view('verifikasi.tri-dharma.bawahan.index', compact('title', 'isAdmin', 'beritaAcaraUploaded', 'beritaAcaraMessage'));
|
||||||
|
|
||||||
$allPegawais = Pegawai::select('nip', 'nama')
|
|
||||||
->where(function ($query) use ($ketuaJurusanNips) {
|
|
||||||
$query->whereIn('nip', $ketuaJurusanNips)
|
|
||||||
->orWhereIn('nip_siakad', $ketuaJurusanNips);
|
|
||||||
})
|
|
||||||
->orderBy('nama')
|
|
||||||
->get();
|
|
||||||
|
|
||||||
return view('verifikasi.tri-dharma.bawahan.index', compact('title', 'isAdmin', 'allPegawais', 'beritaAcaraUploaded', 'beritaAcaraMessage'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Non-admin: kelola daftar bawahan milik sendiri
|
// Non-admin: kelola daftar bawahan milik sendiri
|
||||||
@@ -105,6 +98,115 @@ class BawahanController extends Controller
|
|||||||
return view('verifikasi.tri-dharma.bawahan.index', compact('title', 'bawahans', 'pegawais', 'isAdmin', 'nipAtasan', 'pegawai', 'beritaAcaraUploaded', 'beritaAcaraMessage'));
|
return view('verifikasi.tri-dharma.bawahan.index', compact('title', 'bawahans', 'pegawais', 'isAdmin', 'nipAtasan', 'pegawai', 'beritaAcaraUploaded', 'beritaAcaraMessage'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Data tabel bawahan di modal detail atasan (Admin). Daftar NIP dikirim dari browser
|
||||||
|
* supaya perubahan yang belum disimpan (tambah/hapus) ikut tampil.
|
||||||
|
*/
|
||||||
|
public function dataBawahanAtasan(Request $request)
|
||||||
|
{
|
||||||
|
$team = Team::find(session('team_id'));
|
||||||
|
|
||||||
|
if (! $team || $team->nama !== 'Admin') {
|
||||||
|
return response()->json(['error' => 'Anda tidak mempunyai hak akses'], 403);
|
||||||
|
}
|
||||||
|
|
||||||
|
$nips = collect($request->input('nips', []))
|
||||||
|
->filter(fn ($nip) => is_string($nip) && $nip !== '')
|
||||||
|
->values()
|
||||||
|
->all();
|
||||||
|
|
||||||
|
$query = Pegawai::select('id', 'nip', 'nip_siakad', 'nama', 'jenis_pegawai');
|
||||||
|
|
||||||
|
if (empty($nips)) {
|
||||||
|
$query->whereRaw('1 = 0');
|
||||||
|
} else {
|
||||||
|
$query->whereIn('nip', $nips);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->lengkapiDenganSidia(DataTables::of($query)->make(true));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Lengkapi baris response DataTables dengan unit kerja & jabatan dari SIDIA (1 query per halaman).
|
||||||
|
*/
|
||||||
|
private function lengkapiDenganSidia(\Illuminate\Http\JsonResponse $response): \Illuminate\Http\JsonResponse
|
||||||
|
{
|
||||||
|
$payload = $response->getData(true);
|
||||||
|
$rows = $payload['data'] ?? [];
|
||||||
|
|
||||||
|
$sidiaMap = $this->sidiaByNip(
|
||||||
|
collect($rows)->flatMap(fn ($row) => [$row['nip'] ?? null, $row['nip_siakad'] ?? null])->filter()->unique()->values()->all()
|
||||||
|
);
|
||||||
|
|
||||||
|
foreach ($rows as $i => $row) {
|
||||||
|
$sidia = ($sidiaMap[$row['nip'] ?? ''] ?? null) ?: ($sidiaMap[$row['nip_siakad'] ?? ''] ?? null);
|
||||||
|
|
||||||
|
$rows[$i]['unit_kerja'] = $sidia?->nama_unit_kerja;
|
||||||
|
$rows[$i]['jabatan_fungsional'] = $sidia?->nama_jabatan_fungsional;
|
||||||
|
$rows[$i]['jabatan_tambahan'] = $sidia?->nama_jabatan_tugas_tambahan;
|
||||||
|
}
|
||||||
|
|
||||||
|
$payload['data'] = $rows;
|
||||||
|
$response->setData($payload);
|
||||||
|
|
||||||
|
return $response;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Data tabel daftar atasan (Ketua Jurusan) untuk Admin. Unit kerja & jabatan diambil dari SIDIA.
|
||||||
|
*/
|
||||||
|
public function dataAtasan(Request $request)
|
||||||
|
{
|
||||||
|
$team = Team::find(session('team_id'));
|
||||||
|
|
||||||
|
if (! $team || $team->nama !== 'Admin') {
|
||||||
|
return response()->json(['error' => 'Anda tidak mempunyai hak akses'], 403);
|
||||||
|
}
|
||||||
|
|
||||||
|
$ketuaJurusanNips = JabatanPegawaiTambahanHelper::getAllKetuaJurusan()->pluck('nip')->toArray();
|
||||||
|
|
||||||
|
$query = Pegawai::select('id', 'nip', 'nip_siakad', 'nama', 'jenis_pegawai')
|
||||||
|
->where(function ($q) use ($ketuaJurusanNips) {
|
||||||
|
$q->whereIn('nip', $ketuaJurusanNips)
|
||||||
|
->orWhereIn('nip_siakad', $ketuaJurusanNips);
|
||||||
|
});
|
||||||
|
|
||||||
|
return $this->lengkapiDenganSidia(DataTables::of($query)->make(true));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Data unit kerja & jabatan dari SIDIA, dikunci per NIP / NIP SIAKAD / NIP honorer.
|
||||||
|
* SIDIA ada di server berbeda, jadi diambil dalam 1 query lalu dipetakan di PHP.
|
||||||
|
*/
|
||||||
|
private function sidiaByNip(array $nips): array
|
||||||
|
{
|
||||||
|
if (empty($nips)) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
$map = [];
|
||||||
|
|
||||||
|
try {
|
||||||
|
SidiaPegawai::query()
|
||||||
|
->select('nip', 'nip_siakad', 'nip_honorer', 'nama_unit_kerja', 'nama_jabatan_fungsional', 'nama_jabatan_tugas_tambahan')
|
||||||
|
->where(function ($q) use ($nips) {
|
||||||
|
$q->whereIn('nip', $nips)->orWhereIn('nip_siakad', $nips)->orWhereIn('nip_honorer', $nips);
|
||||||
|
})
|
||||||
|
->get()
|
||||||
|
->each(function ($sidia) use (&$map) {
|
||||||
|
foreach ([$sidia->nip, $sidia->nip_siakad, $sidia->nip_honorer] as $key) {
|
||||||
|
if ($key && ! isset($map[$key])) {
|
||||||
|
$map[$key] = $sidia;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} catch (Exception $e) {
|
||||||
|
Log::warning('Gagal mengambil data SIDIA untuk daftar atasan: '.$e->getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
return $map;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Index view for Dekan - shows Ketua Jurusan list with their bawahan
|
* Index view for Dekan - shows Ketua Jurusan list with their bawahan
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -63,6 +63,27 @@ trait HasStatusAktifSidia
|
|||||||
return $query->where(fn ($q) => $q->whereIn('nip', $nips)->orWhereIn('nip_siakad', $nips));
|
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.
|
* Tambahkan kolom `status_aktif` (HTML badge) ke setiap baris response DataTables.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ use App\Models\DokSiremun\SubUnitKerja;
|
|||||||
use App\Models\DokSiremun\UnitKerja;
|
use App\Models\DokSiremun\UnitKerja;
|
||||||
use App\Models\Verifikator\Periode;
|
use App\Models\Verifikator\Periode;
|
||||||
use App\Models\Verifikator\Team;
|
use App\Models\Verifikator\Team;
|
||||||
use App\Models\Verifikator\UnitKerjaPegawai;
|
use App\Models\Verifikator\UnitKerja as UnitKerjaVerifikator;
|
||||||
use App\Models\Verifikator\View\Pegawai;
|
use App\Models\Verifikator\View\Pegawai;
|
||||||
use App\Services\DokSiremunService;
|
use App\Services\DokSiremunService;
|
||||||
use App\Services\ImamAVService;
|
use App\Services\ImamAVService;
|
||||||
@@ -108,7 +108,7 @@ class MataKuliahController extends Controller
|
|||||||
|
|
||||||
public function getUnitKerjaPegawaiList(): JsonResponse
|
public function getUnitKerjaPegawaiList(): JsonResponse
|
||||||
{
|
{
|
||||||
$unitKerjas = UnitKerjaPegawai::orderBy('nama')->get(['id', 'nama']);
|
$unitKerjas = UnitKerjaVerifikator::orderBy('id')->get(['id', 'nama']);
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'results' => $unitKerjas->map(fn ($item) => ['id' => $item->id, 'text' => $item->nama]),
|
'results' => $unitKerjas->map(fn ($item) => ['id' => $item->id, 'text' => $item->nama]),
|
||||||
@@ -202,7 +202,11 @@ class MataKuliahController extends Controller
|
|||||||
$team = Team::find(session('team_id'));
|
$team = Team::find(session('team_id'));
|
||||||
$filterUnitKerjaId = $request->input('unit_kerja_id');
|
$filterUnitKerjaId = $request->input('unit_kerja_id');
|
||||||
|
|
||||||
if (! $filterUnitKerjaId && $team && $team->unit_kerja_id > 0) {
|
// "Universitas" (ID 0) = semua dosen yang unit kerjanya bukan fakultas (ID 1-9).
|
||||||
|
// Dicek sebagai string karena "0" dianggap kosong oleh PHP.
|
||||||
|
$filterUniversitas = (string) $filterUnitKerjaId === '0';
|
||||||
|
|
||||||
|
if (! $filterUniversitas && ! $filterUnitKerjaId && $team && $team->unit_kerja_id > 0) {
|
||||||
$filterUnitKerjaId = $team->unit_kerja_id;
|
$filterUnitKerjaId = $team->unit_kerja_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -242,7 +246,11 @@ class MataKuliahController extends Controller
|
|||||||
unset($data);
|
unset($data);
|
||||||
|
|
||||||
// Filter berdasarkan unit kerja pegawai
|
// Filter berdasarkan unit kerja pegawai
|
||||||
if ($filterUnitKerjaId) {
|
if ($filterUniversitas) {
|
||||||
|
// Unit kerja yang diketahui tetapi bukan fakultas (ID 1-9)
|
||||||
|
$groupedData = array_filter($groupedData, fn ($row) => $row['unit_kerja_id'] !== null
|
||||||
|
&& ($row['unit_kerja_id'] < 1 || $row['unit_kerja_id'] > 9));
|
||||||
|
} elseif ($filterUnitKerjaId) {
|
||||||
$groupedData = array_filter($groupedData, fn ($row) => $row['unit_kerja_id'] == $filterUnitKerjaId);
|
$groupedData = array_filter($groupedData, fn ($row) => $row['unit_kerja_id'] == $filterUnitKerjaId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ class PengajuanController extends Controller
|
|||||||
|
|
||||||
// Hanya tampilkan filter unit kerja jika team_id == 1
|
// Hanya tampilkan filter unit kerja jika team_id == 1
|
||||||
if ($team && $team->id == 1) {
|
if ($team && $team->id == 1) {
|
||||||
$unitKerjas = UnitKerja::orderBy('nama', 'asc')->get();
|
$unitKerjas = UnitKerja::orderBy('id', 'asc')->get();
|
||||||
}
|
}
|
||||||
|
|
||||||
$periode = Periode::where('status', true)->first();
|
$periode = Periode::where('status', true)->first();
|
||||||
@@ -62,7 +62,7 @@ class PengajuanController extends Controller
|
|||||||
$jenisPegawai = request('jenis_pegawai');
|
$jenisPegawai = request('jenis_pegawai');
|
||||||
$unitKerjaId = request('unit_kerja_id');
|
$unitKerjaId = request('unit_kerja_id');
|
||||||
$bawahanQuery = Pegawai::withoutGlobalScopes()
|
$bawahanQuery = Pegawai::withoutGlobalScopes()
|
||||||
->select('id', 'nip', 'nip_siakad', 'nama', 'jenis_pegawai', 'unit_kerja_id', 'jabatan_fungsional_id', 'jabatan_dtt_id', 'tubel_berangkat', 'tubel_kembali')
|
->select('id', 'nip', 'nip_siakad', 'nama', 'jenis_pegawai', 'unit_kerja_id', 'jabatan_fungsional_id', 'jabatan_fungsional_nama', 'jabatan_dtt_id', 'jabatan_dtt_nama', 'tubel_berangkat', 'tubel_kembali')
|
||||||
->whereNull('pensiun')
|
->whereNull('pensiun')
|
||||||
->whereNull('wafat');
|
->whereNull('wafat');
|
||||||
|
|
||||||
@@ -190,6 +190,13 @@ class PengajuanController extends Controller
|
|||||||
], 404);
|
], 404);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->isTubelSidia($id) || $this->isTubelSidia($pegawai->nip)) {
|
||||||
|
return response()->json([
|
||||||
|
'success' => false,
|
||||||
|
'message' => 'Tidak dapat memverifikasi Pegawai yang sedang Tugas Belajar',
|
||||||
|
], 422);
|
||||||
|
}
|
||||||
|
|
||||||
$user = Pegawai::where('nip', Auth::user()->nip)->orWhere('nip_siakad', Auth::user()->nip)->first();
|
$user = Pegawai::where('nip', Auth::user()->nip)->orWhere('nip_siakad', Auth::user()->nip)->first();
|
||||||
|
|
||||||
// if (Auth::user()->id != 1) {
|
// if (Auth::user()->id != 1) {
|
||||||
@@ -232,6 +239,10 @@ class PengajuanController extends Controller
|
|||||||
return redirect()->back()->with('error', 'Data pegawai tidak ditemukan');
|
return redirect()->back()->with('error', 'Data pegawai tidak ditemukan');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->isTubelSidia($id) || $this->isTubelSidia($pegawai->nip)) {
|
||||||
|
return redirect()->back()->with('warning', 'Tidak dapat memverifikasi Pegawai yang sedang Tugas Belajar');
|
||||||
|
}
|
||||||
|
|
||||||
// Cek status berita acara untuk disable buttons
|
// Cek status berita acara untuk disable buttons
|
||||||
$beritaAcaraCheck = BeritaAcaraHelper::checkBeritaAcaraByTeam(session('team_id'));
|
$beritaAcaraCheck = BeritaAcaraHelper::checkBeritaAcaraByTeam(session('team_id'));
|
||||||
$beritaAcaraUploaded = $beritaAcaraCheck['uploaded'];
|
$beritaAcaraUploaded = $beritaAcaraCheck['uploaded'];
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class PlenoController extends Controller
|
|||||||
|
|
||||||
// Hanya tampilkan filter unit kerja jika team_id == 1
|
// Hanya tampilkan filter unit kerja jika team_id == 1
|
||||||
if ($team && $team->id == 1) {
|
if ($team && $team->id == 1) {
|
||||||
$unitKerjas = UnitKerja::orderBy('nama', 'asc')->get();
|
$unitKerjas = UnitKerja::orderBy('id', 'asc')->get();
|
||||||
}
|
}
|
||||||
|
|
||||||
$periode = Periode::where('status', true)->first();
|
$periode = Periode::where('status', true)->first();
|
||||||
@@ -60,7 +60,7 @@ class PlenoController extends Controller
|
|||||||
$unitKerjaId = request('unit_kerja_id');
|
$unitKerjaId = request('unit_kerja_id');
|
||||||
|
|
||||||
$bawahanQuery = Pegawai::withoutGlobalScopes()
|
$bawahanQuery = Pegawai::withoutGlobalScopes()
|
||||||
->select('id', 'nip', 'nip_siakad', 'nama', 'jenis_pegawai', 'unit_kerja_id', 'jabatan_fungsional_id', 'jabatan_dtt_id', 'tubel_berangkat', 'tubel_kembali')
|
->select('id', 'nip', 'nip_siakad', 'nama', 'jenis_pegawai', 'unit_kerja_id', 'jabatan_fungsional_id', 'jabatan_fungsional_nama', 'jabatan_dtt_id', 'jabatan_dtt_nama', 'tubel_berangkat', 'tubel_kembali')
|
||||||
->whereNull('pensiun')
|
->whereNull('pensiun')
|
||||||
->whereNull('wafat');
|
->whereNull('wafat');
|
||||||
|
|
||||||
@@ -190,6 +190,13 @@ class PlenoController extends Controller
|
|||||||
], 404);
|
], 404);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->isTubelSidia($id) || $this->isTubelSidia($pegawai->nip)) {
|
||||||
|
return response()->json([
|
||||||
|
'success' => false,
|
||||||
|
'message' => 'Tidak dapat memverifikasi Pegawai yang sedang Tugas Belajar',
|
||||||
|
], 422);
|
||||||
|
}
|
||||||
|
|
||||||
$user = Pegawai::where('nip', Auth::user()->nip)->orWhere('nip_siakad', Auth::user()->nip)->first();
|
$user = Pegawai::where('nip', Auth::user()->nip)->orWhere('nip_siakad', Auth::user()->nip)->first();
|
||||||
|
|
||||||
// if (Auth::user()->id != 1) {
|
// if (Auth::user()->id != 1) {
|
||||||
@@ -232,6 +239,10 @@ class PlenoController extends Controller
|
|||||||
return redirect()->back()->with('error', 'Data pegawai tidak ditemukan');
|
return redirect()->back()->with('error', 'Data pegawai tidak ditemukan');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->isTubelSidia($id) || $this->isTubelSidia($pegawai->nip)) {
|
||||||
|
return redirect()->back()->with('warning', 'Tidak dapat memverifikasi Pegawai yang sedang Tugas Belajar');
|
||||||
|
}
|
||||||
|
|
||||||
// Cek status berita acara untuk disable buttons
|
// Cek status berita acara untuk disable buttons
|
||||||
$beritaAcaraCheck = BeritaAcaraHelper::checkBeritaAcaraByTeam(session('team_id'));
|
$beritaAcaraCheck = BeritaAcaraHelper::checkBeritaAcaraByTeam(session('team_id'));
|
||||||
$beritaAcaraUploaded = $beritaAcaraCheck['uploaded'];
|
$beritaAcaraUploaded = $beritaAcaraCheck['uploaded'];
|
||||||
|
|||||||
@@ -793,6 +793,56 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<!-- Skeleton loading DataTable (dipakai semua menu) -->
|
||||||
|
<style>
|
||||||
|
tbody tr.skeleton-row {
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
tbody tr.skeleton-row td {
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.skel {
|
||||||
|
background: linear-gradient(90deg, #e9ecef 25%, #f6f7f9 37%, #e9ecef 63%);
|
||||||
|
background-size: 400% 100%;
|
||||||
|
animation: skelShimmer 1.4s ease infinite;
|
||||||
|
border-radius: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.skel-line {
|
||||||
|
height: 14px;
|
||||||
|
margin: 6px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.skel-line.sm {
|
||||||
|
height: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.skel-btn {
|
||||||
|
width: 44px;
|
||||||
|
height: 36px;
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.skel-box {
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.skel-pill {
|
||||||
|
width: 90px;
|
||||||
|
height: 24px;
|
||||||
|
border-radius: 999px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes skelShimmer {
|
||||||
|
0% { background-position: 100% 50%; }
|
||||||
|
100% { background-position: 0 50%; }
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
(function () {
|
(function () {
|
||||||
var STORAGE_KEY = 'wa_helpdesk_bubble_closed';
|
var STORAGE_KEY = 'wa_helpdesk_bubble_closed';
|
||||||
@@ -1185,6 +1235,40 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<!-- Skeleton loading DataTable: panggil pasangSkeletonSk('#id-tabel') SEBELUM .DataTable() dan set processing: false -->
|
||||||
|
<script>
|
||||||
|
// Opsional `pola`: array tipe sel per kolom -> 'tombol', 'kotak', 'panjang', 'dua', 'tiga', 'pendek', 'pil'
|
||||||
|
// Tanpa `pola`: kolom 1 = tombol, 2 = tiga baris, 3 = dua baris, kolom terakhir = pil, sisanya pendek
|
||||||
|
function pasangSkeletonSk(tabelSelector, jumlahBaris, pola) {
|
||||||
|
jumlahBaris = jumlahBaris || 6;
|
||||||
|
var sel = {
|
||||||
|
tombol: '<div class="skel skel-btn mx-auto"></div>',
|
||||||
|
kotak: '<div class="skel skel-box mx-auto"></div>',
|
||||||
|
panjang: '<div class="skel skel-line" style="width: 90%;"></div>',
|
||||||
|
dua: '<div class="skel skel-line" style="width: 100%;"></div><div class="skel skel-line" style="width: 70%;"></div>',
|
||||||
|
tiga: '<div class="skel skel-line" style="width: 85%;"></div><div class="skel skel-line sm" style="width: 60%;"></div><div class="skel skel-line sm" style="width: 45%;"></div>',
|
||||||
|
pendek: '<div class="skel skel-line mx-auto" style="width: 70%;"></div>',
|
||||||
|
pil: '<div class="skel skel-pill mx-auto"></div>'
|
||||||
|
};
|
||||||
|
$(tabelSelector).on('preXhr.dt', function() {
|
||||||
|
var $tabel = $(tabelSelector);
|
||||||
|
var kolom = $tabel.find('thead th').length;
|
||||||
|
var baris = '';
|
||||||
|
for (var i = 0; i < jumlahBaris; i++) {
|
||||||
|
baris += '<tr class="skeleton-row">';
|
||||||
|
for (var c = 0; c < kolom; c++) {
|
||||||
|
var tipe = pola ? pola[c] : (c === 0 ? 'tombol' : c === 1 ? 'tiga' : c === 2 ? 'dua' : c === kolom - 1 ? 'pil' : 'pendek');
|
||||||
|
baris += '<td>' + (sel[tipe] || sel.pendek) + '</td>';
|
||||||
|
}
|
||||||
|
baris += '</tr>';
|
||||||
|
}
|
||||||
|
var $tbody = $tabel.children('tbody');
|
||||||
|
if (!$tbody.length) { $tbody = $('<tbody/>').appendTo($tabel); }
|
||||||
|
$tbody.html(baris);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
<!-- Select2 -->
|
<!-- Select2 -->
|
||||||
<script>
|
<script>
|
||||||
$('.select2').each(function() {
|
$('.select2').each(function() {
|
||||||
|
|||||||
@@ -49,6 +49,7 @@
|
|||||||
</a>
|
</a>
|
||||||
<div class="collapse li-sk" id="sidebarSk">
|
<div class="collapse li-sk" id="sidebarSk">
|
||||||
<ul class="side-nav-second-level">
|
<ul class="side-nav-second-level">
|
||||||
|
{{-- Menu Klaim Ulang disembunyikan sementara (SK Reklaim diakses lewat tab di Belum Verifikasi)
|
||||||
@canany(['Baca SK Klaim Ulang', 'Verifikasi SK Klaim Ulang'])
|
@canany(['Baca SK Klaim Ulang', 'Verifikasi SK Klaim Ulang'])
|
||||||
<li class="li-sk-klaim-ulang">
|
<li class="li-sk-klaim-ulang">
|
||||||
<a href="{{ route('sk.klaim-ulang.index') }}">
|
<a href="{{ route('sk.klaim-ulang.index') }}">
|
||||||
@@ -57,6 +58,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@endcanany
|
@endcanany
|
||||||
|
--}}
|
||||||
@canany(['Baca SK', 'Verifikasi SK'])
|
@canany(['Baca SK', 'Verifikasi SK'])
|
||||||
<li class="li-sk-belum-verifikasi">
|
<li class="li-sk-belum-verifikasi">
|
||||||
<a href="{{ route('sk.belum-verifikasi.index') }}">
|
<a href="{{ route('sk.belum-verifikasi.index') }}">
|
||||||
|
|||||||
@@ -0,0 +1,77 @@
|
|||||||
|
{{-- CSS kartu informasi SK (.sk-info-card). Di-include di dalam <style> halaman detail SK dan detail Klaim Ulang. --}}
|
||||||
|
/* Kartu informasi SK */
|
||||||
|
.sk-info-card .sk-label {
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: 600;
|
||||||
|
letter-spacing: 0.05em;
|
||||||
|
text-transform: uppercase;
|
||||||
|
color: #6b7280;
|
||||||
|
margin-bottom: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sk-info-card .sk-id-chip {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 2px;
|
||||||
|
background: rgba(37, 99, 235, 0.1);
|
||||||
|
color: #2563eb;
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 13px;
|
||||||
|
padding: 2px 12px 2px 8px;
|
||||||
|
border-radius: 999px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sk-info-card .sk-tentang {
|
||||||
|
font-size: 1.05rem;
|
||||||
|
font-weight: 600;
|
||||||
|
line-height: 1.5;
|
||||||
|
color: #111827;
|
||||||
|
margin: 10px 0 0;
|
||||||
|
word-break: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sk-info-card .sk-tile {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 12px;
|
||||||
|
height: 100%;
|
||||||
|
padding: 12px 14px;
|
||||||
|
border: 1px solid #e5e7eb;
|
||||||
|
border-radius: 12px;
|
||||||
|
background: #f9fafb;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sk-info-card .sk-tile-icon {
|
||||||
|
flex: 0 0 auto;
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 20px;
|
||||||
|
border-radius: 10px;
|
||||||
|
background: rgba(37, 99, 235, 0.1);
|
||||||
|
color: #2563eb;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sk-info-card .sk-value {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #111827;
|
||||||
|
line-height: 1.35;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sk-info-card .sk-catatan {
|
||||||
|
border-left: 4px solid #f59e0b;
|
||||||
|
background: #fffbeb;
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 10px 14px;
|
||||||
|
font-size: 13px;
|
||||||
|
color: #78350f;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sk-info-card .sk-section {
|
||||||
|
border-top: 1px solid #e5e7eb;
|
||||||
|
margin-top: 16px;
|
||||||
|
padding-top: 16px;
|
||||||
|
}
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
{{-- CSS bersama kolom Tentang (maks 2 baris + Baca selengkapnya + tombol salin). Di-include di dalam <style> tiap sub menu SK. --}}
|
||||||
|
tbody .tentang-teks {
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
overflow: hidden;
|
||||||
|
transition: height 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
tbody .tentang-teks.expanded {
|
||||||
|
display: block;
|
||||||
|
-webkit-line-clamp: unset;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
tbody .tentang-baca {
|
||||||
|
display: inline-block;
|
||||||
|
color: #2563eb;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
tbody .tentang-baca:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
tbody .btn-salin-toggle::after {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
tbody .dropdown-menu {
|
||||||
|
z-index: 1055;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Animasi muncul menu salin (pakai properti `translate` agar tidak menimpa `transform` milik Popper) */
|
||||||
|
tbody .dropdown-menu.show {
|
||||||
|
animation: menuSalinMuncul 0.18s ease-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes menuSalinMuncul {
|
||||||
|
from {
|
||||||
|
opacity: 0;
|
||||||
|
translate: 0 -6px;
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
opacity: 1;
|
||||||
|
translate: 0 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tbody .btn-salin-toggle {
|
||||||
|
transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
tbody .btn-salin-toggle:active {
|
||||||
|
transform: scale(0.88);
|
||||||
|
}
|
||||||
|
|
||||||
|
tbody .dropdown-menu .dropdown-item {
|
||||||
|
transition: background-color 0.15s ease, padding-left 0.15s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
tbody .dropdown-menu .dropdown-item:hover {
|
||||||
|
padding-left: 1.25rem;
|
||||||
|
}
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
{{-- JS bersama kolom Tentang. Di-include di dalam <script> tiap sub menu SK; panggil initKolomSk('#id-tabel') pada drawCallback DataTable. --}}
|
||||||
|
// Dipanggil setiap tabel selesai digambar: tampilkan "Baca selengkapnya" bila teks terpotong, dan pasang dropdown salin
|
||||||
|
function initKolomSk(tabelSelector) {
|
||||||
|
document.querySelectorAll(tabelSelector + ' tbody .tentang-teks').forEach(function(el) {
|
||||||
|
var link = el.parentElement.querySelector('.tentang-baca');
|
||||||
|
if (link && el.scrollHeight > el.clientHeight + 1) {
|
||||||
|
link.classList.remove('d-none');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// Posisi fixed agar menu tidak terpotong oleh table-responsive
|
||||||
|
document.querySelectorAll(tabelSelector + ' tbody .btn-salin-toggle').forEach(function(el) {
|
||||||
|
bootstrap.Dropdown.getOrCreateInstance(el, { popperConfig: { strategy: 'fixed' } });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Baca selengkapnya / Tutup untuk teks tentang (dengan animasi tinggi)
|
||||||
|
$(document).on('click', '.tentang-baca', function() {
|
||||||
|
var el = $(this).siblings('.tentang-teks')[0];
|
||||||
|
var buka = el.dataset.open !== '1';
|
||||||
|
el.dataset.open = buka ? '1' : '0';
|
||||||
|
$(this).text(buka ? 'Tutup' : 'Baca selengkapnya ...');
|
||||||
|
clearTimeout(el._tentangTimer);
|
||||||
|
|
||||||
|
var tinggiSekarang = el.offsetHeight;
|
||||||
|
var tinggiTujuan;
|
||||||
|
if (buka) {
|
||||||
|
el.classList.add('expanded');
|
||||||
|
tinggiTujuan = el.scrollHeight;
|
||||||
|
} else {
|
||||||
|
// Ukur tinggi saat terpotong 2 baris, lalu kembalikan ke kondisi terbuka untuk dianimasikan
|
||||||
|
el.classList.remove('expanded');
|
||||||
|
tinggiTujuan = el.clientHeight;
|
||||||
|
el.classList.add('expanded');
|
||||||
|
}
|
||||||
|
|
||||||
|
el.style.height = tinggiSekarang + 'px';
|
||||||
|
void el.offsetHeight; // paksa reflow agar transisi berjalan
|
||||||
|
el.style.height = tinggiTujuan + 'px';
|
||||||
|
|
||||||
|
el._tentangTimer = setTimeout(function() {
|
||||||
|
el.style.height = '';
|
||||||
|
if (!buka) { el.classList.remove('expanded'); }
|
||||||
|
}, 320);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Salin teks (Nama Tentang / ID SK) ke clipboard
|
||||||
|
function salinKeClipboard(teks) {
|
||||||
|
if (navigator.clipboard && window.isSecureContext) {
|
||||||
|
return navigator.clipboard.writeText(teks);
|
||||||
|
}
|
||||||
|
return new Promise(function(resolve, reject) {
|
||||||
|
var ta = document.createElement('textarea');
|
||||||
|
ta.value = teks;
|
||||||
|
ta.style.position = 'fixed';
|
||||||
|
ta.style.opacity = '0';
|
||||||
|
document.body.appendChild(ta);
|
||||||
|
ta.select();
|
||||||
|
try {
|
||||||
|
document.execCommand('copy') ? resolve() : reject();
|
||||||
|
} catch (err) {
|
||||||
|
reject(err);
|
||||||
|
} finally {
|
||||||
|
document.body.removeChild(ta);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).on('click', '.btn-salin', function() {
|
||||||
|
var teks = $(this).attr('data-salin') || '';
|
||||||
|
var label = $(this).data('label');
|
||||||
|
salinKeClipboard(teks).then(function() {
|
||||||
|
showSuccess('Berhasil', label + ' berhasil disalin.');
|
||||||
|
}).catch(function() {
|
||||||
|
showError('Gagal', 'Tidak dapat menyalin ' + label + '.');
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -30,6 +30,8 @@
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@include('verifikasi.sk._kolom_sk_css')
|
||||||
|
|
||||||
#belum-finalisasi tbody .btn-primary {
|
#belum-finalisasi tbody .btn-primary {
|
||||||
transition: transform 0.1s ease, box-shadow 0.1s ease;
|
transition: transform 0.1s ease, box-shadow 0.1s ease;
|
||||||
}
|
}
|
||||||
@@ -121,8 +123,9 @@
|
|||||||
width: '100%'
|
width: '100%'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
pasangSkeletonSk('#belum-finalisasi');
|
||||||
var table = $('#belum-finalisasi').DataTable({
|
var table = $('#belum-finalisasi').DataTable({
|
||||||
processing: true,
|
processing: false,
|
||||||
serverSide: true,
|
serverSide: true,
|
||||||
ajax: {
|
ajax: {
|
||||||
url: "{{ route('sk.belum-finalisasi.data') }}",
|
url: "{{ route('sk.belum-finalisasi.data') }}",
|
||||||
@@ -141,7 +144,7 @@
|
|||||||
{
|
{
|
||||||
data: 'no_sk',
|
data: 'no_sk',
|
||||||
name: 'no_sk',
|
name: 'no_sk',
|
||||||
className: 'text-center'
|
className: 'text-start'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
data: 'tentang',
|
data: 'tentang',
|
||||||
@@ -176,6 +179,7 @@
|
|||||||
if (existing) { existing.dispose(); }
|
if (existing) { existing.dispose(); }
|
||||||
new bootstrap.Tooltip(el, { trigger: 'hover', container: 'body' });
|
new bootstrap.Tooltip(el, { trigger: 'hover', container: 'body' });
|
||||||
});
|
});
|
||||||
|
initKolomSk('#belum-finalisasi');
|
||||||
},
|
},
|
||||||
order: [[2, 'asc']],
|
order: [[2, 'asc']],
|
||||||
language: {
|
language: {
|
||||||
@@ -188,6 +192,8 @@
|
|||||||
table.ajax.reload();
|
table.ajax.reload();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@include('verifikasi.sk._kolom_sk_js')
|
||||||
|
|
||||||
$('#belum-finalisasi').on('click', 'tbody tr', function(e) {
|
$('#belum-finalisasi').on('click', 'tbody tr', function(e) {
|
||||||
if ($(e.target).closest('a, button').length) { return; }
|
if ($(e.target).closest('a, button').length) { return; }
|
||||||
var url = $(this).data('url');
|
var url = $(this).data('url');
|
||||||
|
|||||||
@@ -2,39 +2,49 @@
|
|||||||
|
|
||||||
@section('css')
|
@section('css')
|
||||||
<style>
|
<style>
|
||||||
#belum-verifikasi tbody tr {
|
#belum-verifikasi tbody tr,
|
||||||
|
#belum-verifikasi-reklaim tbody tr {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
#belum-verifikasi tbody tr > * {
|
#belum-verifikasi tbody tr > *,
|
||||||
|
#belum-verifikasi-reklaim tbody tr > * {
|
||||||
transition: background-color 0.25s ease;
|
transition: background-color 0.25s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
#belum-verifikasi tbody tr:hover > * {
|
#belum-verifikasi tbody tr:hover > *,
|
||||||
|
#belum-verifikasi-reklaim tbody tr:hover > * {
|
||||||
background-color: rgba(13, 110, 253, 0.08) !important;
|
background-color: rgba(13, 110, 253, 0.08) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#belum-verifikasi tbody tr:active > * {
|
#belum-verifikasi tbody tr:active > *,
|
||||||
|
#belum-verifikasi-reklaim tbody tr:active > * {
|
||||||
background-color: rgba(13, 110, 253, 0.22) !important;
|
background-color: rgba(13, 110, 253, 0.22) !important;
|
||||||
transition: background-color 0s;
|
transition: background-color 0s;
|
||||||
}
|
}
|
||||||
|
|
||||||
#belum-verifikasi td, #belum-verifikasi th {
|
#belum-verifikasi td, #belum-verifikasi th,
|
||||||
|
#belum-verifikasi-reklaim td, #belum-verifikasi-reklaim th {
|
||||||
border-color: #ced4da !important;
|
border-color: #ced4da !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#belum-verifikasi thead th {
|
#belum-verifikasi thead th,
|
||||||
|
#belum-verifikasi-reklaim thead th {
|
||||||
background: #2563eb !important; background-color: #2563eb !important;
|
background: #2563eb !important; background-color: #2563eb !important;
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
border-color: #2563eb !important;
|
border-color: #2563eb !important;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
#belum-verifikasi tbody .btn-primary {
|
@include('verifikasi.sk._kolom_sk_css')
|
||||||
|
|
||||||
|
#belum-verifikasi tbody .btn-primary,
|
||||||
|
#belum-verifikasi-reklaim tbody .btn-primary {
|
||||||
transition: transform 0.1s ease, box-shadow 0.1s ease;
|
transition: transform 0.1s ease, box-shadow 0.1s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
#belum-verifikasi tbody .btn-primary:active {
|
#belum-verifikasi tbody .btn-primary:active,
|
||||||
|
#belum-verifikasi-reklaim tbody .btn-primary:active {
|
||||||
transform: scale(0.88);
|
transform: scale(0.88);
|
||||||
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
|
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
|
||||||
}
|
}
|
||||||
@@ -91,19 +101,75 @@
|
|||||||
'description' => 'Berikut adalah daftar Surat Keputusan (SK) yang belum diverifikasi'
|
'description' => 'Berikut adalah daftar Surat Keputusan (SK) yang belum diverifikasi'
|
||||||
])
|
])
|
||||||
|
|
||||||
<div class="table-responsive">
|
{{-- Tab jenis SK: Schedule (segera hadir), SK Biasa, SK Reklaim --}}
|
||||||
<table class="table table-bordered w-100" id="belum-verifikasi">
|
<ul class="nav nav-pills bg-nav-pills nav-justified mb-3" id="skTabs" role="tablist">
|
||||||
<thead>
|
<li class="nav-item" role="presentation">
|
||||||
<tr>
|
<button class="nav-link rounded-0" id="schedule-tab" type="button" role="tab"
|
||||||
<th>SK</th>
|
aria-controls="schedule" aria-selected="false" data-jenis="schedule">
|
||||||
<th>Nomor SK</th>
|
<i class="uil-schedule d-md-none d-block"></i>
|
||||||
<th>Tentang</th>
|
<span class="d-none d-md-block">Schedule</span>
|
||||||
<th>Tanggal</th>
|
</button>
|
||||||
<th>Status</th>
|
</li>
|
||||||
</tr>
|
<li class="nav-item" role="presentation">
|
||||||
</thead>
|
<button class="nav-link rounded-0 active" id="biasa-tab" type="button" role="tab"
|
||||||
</table>
|
aria-controls="biasa" aria-selected="true" data-jenis="biasa">
|
||||||
|
<i class="uil-file-alt d-md-none d-block"></i>
|
||||||
|
<span class="d-none d-md-block">SK Biasa</span>
|
||||||
|
</button>
|
||||||
|
</li>
|
||||||
|
@canany(['Baca SK Klaim Ulang', 'Verifikasi SK Klaim Ulang'])
|
||||||
|
<li class="nav-item" role="presentation">
|
||||||
|
<button class="nav-link rounded-0" id="reklaim-tab" type="button" role="tab"
|
||||||
|
aria-controls="reklaim" aria-selected="false" data-jenis="reklaim">
|
||||||
|
<i class="uil-redo d-md-none d-block"></i>
|
||||||
|
<span class="d-none d-md-block">SK Reklaim</span>
|
||||||
|
</button>
|
||||||
|
</li>
|
||||||
|
@endcanany
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
{{-- Tab Schedule: belum tersedia --}}
|
||||||
|
<div id="panel-schedule" class="d-none text-center text-muted py-5">
|
||||||
|
<i class="uil-schedule" style="font-size: 48px; opacity: .5;"></i>
|
||||||
|
<h5 class="mt-2 mb-1 text-body">Segera Hadir</h5>
|
||||||
|
<p class="mb-0">Fitur Schedule sedang disiapkan.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="panel-tabel-sk">
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-bordered w-100" id="belum-verifikasi">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>SK</th>
|
||||||
|
<th>Nomor SK</th>
|
||||||
|
<th>Tentang</th>
|
||||||
|
<th>Tanggal</th>
|
||||||
|
<th>Status</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- Tab SK Reklaim: SK Klaim Ulang yang belum diklaim (dimuat saat tab pertama kali dibuka) --}}
|
||||||
|
@canany(['Baca SK Klaim Ulang', 'Verifikasi SK Klaim Ulang'])
|
||||||
|
<div id="panel-reklaim" class="d-none">
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-bordered w-100" id="belum-verifikasi-reklaim">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>SK</th>
|
||||||
|
<th>Nomor SK</th>
|
||||||
|
<th>Tentang</th>
|
||||||
|
<th>Tanggal</th>
|
||||||
|
<th>Periode Terakhir Klaim</th>
|
||||||
|
<th>Status</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endcanany
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
@@ -129,13 +195,18 @@
|
|||||||
width: '100%'
|
width: '100%'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Jenis SK pada tabel utama (tab SK Biasa). Tab Schedule dan SK Reklaim punya panel sendiri.
|
||||||
|
var jenisSk = 'biasa';
|
||||||
|
|
||||||
|
pasangSkeletonSk('#belum-verifikasi');
|
||||||
var table = $('#belum-verifikasi').DataTable({
|
var table = $('#belum-verifikasi').DataTable({
|
||||||
processing: true,
|
processing: false,
|
||||||
serverSide: true,
|
serverSide: true,
|
||||||
ajax: {
|
ajax: {
|
||||||
url: "{{ route('sk.belum-verifikasi.data') }}",
|
url: "{{ route('sk.belum-verifikasi.data') }}",
|
||||||
data: function (d) {
|
data: function (d) {
|
||||||
d.unit_id = $('#unit_kerja_filter').val();
|
d.unit_id = $('#unit_kerja_filter').val();
|
||||||
|
d.jenis = jenisSk;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
columns: [
|
columns: [
|
||||||
@@ -149,7 +220,7 @@
|
|||||||
{
|
{
|
||||||
data: 'no_sk',
|
data: 'no_sk',
|
||||||
name: 'no_sk',
|
name: 'no_sk',
|
||||||
className: 'text-center'
|
className: 'text-start'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
data: 'tentang',
|
data: 'tentang',
|
||||||
@@ -190,6 +261,7 @@
|
|||||||
}
|
}
|
||||||
new bootstrap.Tooltip(el, { trigger: 'hover', container: 'body' });
|
new bootstrap.Tooltip(el, { trigger: 'hover', container: 'body' });
|
||||||
});
|
});
|
||||||
|
initKolomSk('#belum-verifikasi');
|
||||||
},
|
},
|
||||||
order: [[2, 'asc']],
|
order: [[2, 'asc']],
|
||||||
language: {
|
language: {
|
||||||
@@ -200,8 +272,112 @@
|
|||||||
// Event listener untuk filter unit kerja (Select2)
|
// Event listener untuk filter unit kerja (Select2)
|
||||||
$('#unit_kerja_filter').on('select2:select select2:clear', function() {
|
$('#unit_kerja_filter').on('select2:select select2:clear', function() {
|
||||||
table.ajax.reload();
|
table.ajax.reload();
|
||||||
|
if (tableReklaim) { tableReklaim.ajax.reload(); }
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Tab SK Reklaim: daftar SK Klaim Ulang yang belum diklaim. Tabel baru dibuat saat tab pertama kali dibuka
|
||||||
|
// karena data reklaim diambil dari SISKA (beberapa halaman) dan tidak perlu dimuat bila tab tidak dipakai.
|
||||||
|
var tableReklaim = null;
|
||||||
|
function initTabelReklaim() {
|
||||||
|
if (tableReklaim || !$('#belum-verifikasi-reklaim').length) { return; }
|
||||||
|
|
||||||
|
pasangSkeletonSk('#belum-verifikasi-reklaim');
|
||||||
|
tableReklaim = $('#belum-verifikasi-reklaim').DataTable({
|
||||||
|
processing: false,
|
||||||
|
serverSide: true,
|
||||||
|
ajax: {
|
||||||
|
url: "{{ route('sk.klaim-ulang.data') }}",
|
||||||
|
data: function (d) {
|
||||||
|
d.unit_id = $('#unit_kerja_filter').val();
|
||||||
|
d.status_klaim = 'belum';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
columns: [
|
||||||
|
{ data: 'pdf', name: 'pdf', className: 'text-center', orderable: false, searchable: false },
|
||||||
|
{ data: 'no_sk', name: 'no_sk', className: 'text-start' },
|
||||||
|
{ data: 'tentang', name: 'tentang' },
|
||||||
|
{ data: 'tanggal_sk', name: 'tanggal_sk', className: 'text-center', width: '100px' },
|
||||||
|
{ data: 'periode_terakhir_klaim', name: 'periode_terakhir_klaim', className: 'text-center', width: '150px' },
|
||||||
|
{ data: 'status_klaim', name: 'status_klaim', className: 'text-center', orderable: false, searchable: false },
|
||||||
|
],
|
||||||
|
@can('Verifikasi SK Klaim Ulang')
|
||||||
|
createdRow: function(row, data) {
|
||||||
|
$(row).attr('data-url', data.url_detail)
|
||||||
|
.attr('data-bs-toggle', 'tooltip')
|
||||||
|
.attr('data-bs-placement', 'top')
|
||||||
|
.attr('title', 'Klik untuk detail');
|
||||||
|
},
|
||||||
|
@endcan
|
||||||
|
drawCallback: function() {
|
||||||
|
@can('Verifikasi SK Klaim Ulang')
|
||||||
|
document.querySelectorAll('body > .tooltip').forEach(function(el) { el.remove(); });
|
||||||
|
document.querySelectorAll('#belum-verifikasi-reklaim tbody [data-bs-toggle="tooltip"]').forEach(function(el) {
|
||||||
|
var existing = bootstrap.Tooltip.getInstance(el);
|
||||||
|
if (existing) { existing.dispose(); }
|
||||||
|
new bootstrap.Tooltip(el, { trigger: 'hover', container: 'body' });
|
||||||
|
});
|
||||||
|
@endcan
|
||||||
|
initKolomSk('#belum-verifikasi-reklaim');
|
||||||
|
},
|
||||||
|
order: [[2, 'asc']],
|
||||||
|
language: {
|
||||||
|
processing: "<div class='spinner'></div> Sedang Memuat...",
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ganti tab jenis SK
|
||||||
|
$('#skTabs').on('click', '.nav-link', function() {
|
||||||
|
var jenis = $(this).data('jenis');
|
||||||
|
$('#skTabs .nav-link').removeClass('active').attr('aria-selected', 'false');
|
||||||
|
$(this).addClass('active').attr('aria-selected', 'true');
|
||||||
|
|
||||||
|
$('#panel-schedule, #panel-tabel-sk, #panel-reklaim').addClass('d-none');
|
||||||
|
|
||||||
|
if (jenis === 'schedule') {
|
||||||
|
$('#panel-schedule').removeClass('d-none');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (jenis === 'reklaim') {
|
||||||
|
$('#panel-reklaim').removeClass('d-none');
|
||||||
|
initTabelReklaim();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#panel-tabel-sk').removeClass('d-none');
|
||||||
|
if (jenis !== jenisSk) {
|
||||||
|
jenisSk = jenis;
|
||||||
|
table.ajax.reload();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (new URLSearchParams(window.location.search).get('tab') === 'reklaim') {
|
||||||
|
$('#reklaim-tab').trigger('click');
|
||||||
|
}
|
||||||
|
|
||||||
|
@can('Verifikasi SK Klaim Ulang')
|
||||||
|
// Klik baris SK Reklaim membuka detail Klaim Ulang
|
||||||
|
$('#belum-verifikasi-reklaim').on('click', 'tbody tr', function(e) {
|
||||||
|
if ($(e.target).closest('a, button').length) { return; }
|
||||||
|
var url = $(this).data('url');
|
||||||
|
if (!url) { return; }
|
||||||
|
var unitId = $('#unit_kerja_filter').val();
|
||||||
|
if ($('#unit_kerja_filter').length > 0 && !unitId) {
|
||||||
|
showWarning('Peringatan!', 'Pilih Unit Kerja terlebih dahulu sebelum membuka detail SK.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (unitId) { url += (url.indexOf('?') === -1 ? '?' : '&') + 'unit_id=' + unitId; }
|
||||||
|
var tooltipInstance = bootstrap.Tooltip.getInstance(this);
|
||||||
|
if (tooltipInstance) { tooltipInstance.dispose(); }
|
||||||
|
$('body').css('cursor', 'wait');
|
||||||
|
$(this).css('cursor', 'wait');
|
||||||
|
window.location.href = url;
|
||||||
|
});
|
||||||
|
@endcan
|
||||||
|
|
||||||
|
@include('verifikasi.sk._kolom_sk_js')
|
||||||
|
|
||||||
$('#belum-verifikasi').on('click', 'tbody tr', function(e) {
|
$('#belum-verifikasi').on('click', 'tbody tr', function(e) {
|
||||||
if ($(e.target).closest('a, button').length) {
|
if ($(e.target).closest('a, button').length) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -34,10 +34,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 767.98px) {
|
@media (max-width: 767.98px) {
|
||||||
#top-action-btns {
|
|
||||||
flex-wrap: nowrap !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#top-action-btns .btn {
|
#top-action-btns .btn {
|
||||||
padding-left: 10px !important;
|
padding-left: 10px !important;
|
||||||
padding-right: 10px !important;
|
padding-right: 10px !important;
|
||||||
@@ -69,6 +65,18 @@
|
|||||||
border-color: #ced4da !important;
|
border-color: #ced4da !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Lebar kolom dikunci agar batas kolom sama persis di semua tabel anggota (per kategori) */
|
||||||
|
table[id^="anggota-sk-"] {
|
||||||
|
table-layout: fixed;
|
||||||
|
}
|
||||||
|
|
||||||
|
table[id^="anggota-sk-"] th:nth-child(1) { width: 4.5% !important; }
|
||||||
|
table[id^="anggota-sk-"] th:nth-child(2) { width: 26.5% !important; }
|
||||||
|
table[id^="anggota-sk-"] th:nth-child(3) { width: 26% !important; }
|
||||||
|
table[id^="anggota-sk-"] th:nth-child(4) { width: 14% !important; }
|
||||||
|
table[id^="anggota-sk-"] th:nth-child(5) { width: 17% !important; }
|
||||||
|
table[id^="anggota-sk-"] th:nth-child(6) { width: 12% !important; }
|
||||||
|
|
||||||
table[id^="anggota-sk-"] tbody td.nama-col .text-truncate {
|
table[id^="anggota-sk-"] tbody td.nama-col .text-truncate {
|
||||||
max-width: 240px;
|
max-width: 240px;
|
||||||
}
|
}
|
||||||
@@ -133,6 +141,8 @@
|
|||||||
#simpan-finalisasi-rubrik.btn-primary:not(:disabled):hover {
|
#simpan-finalisasi-rubrik.btn-primary:not(:disabled):hover {
|
||||||
animation-play-state: paused;
|
animation-play-state: paused;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@include('verifikasi.sk._info_card_css')
|
||||||
</style>
|
</style>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@@ -141,7 +151,9 @@
|
|||||||
<li class="breadcrumb-item"><a href="javascript:void(0);">Verifikasi</a></li>
|
<li class="breadcrumb-item"><a href="javascript:void(0);">Verifikasi</a></li>
|
||||||
<li class="breadcrumb-item"><a href="javascript:void(0);">SK</a></li>
|
<li class="breadcrumb-item"><a href="javascript:void(0);">SK</a></li>
|
||||||
|
|
||||||
@if ($sk['status_verifikator'])
|
@if ($modeKlaim)
|
||||||
|
<li class="breadcrumb-item"><a href="javascript:void(0);">Belum Verifikasi</a></li>
|
||||||
|
@elseif ($sk['status_verifikator'])
|
||||||
@if ($sk['finalisasi'])
|
@if ($sk['finalisasi'])
|
||||||
<li class="breadcrumb-item"><a href="javascript:void(0);">Diterima</a></li>
|
<li class="breadcrumb-item"><a href="javascript:void(0);">Diterima</a></li>
|
||||||
@else
|
@else
|
||||||
@@ -194,205 +206,258 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@php
|
||||||
|
// Tujuan cadangan jika halaman asal tidak diketahui (sesuai status SK, sama seperti breadcrumb)
|
||||||
|
$kembaliUrl = $modeKlaim
|
||||||
|
? route('sk.belum-verifikasi.index')
|
||||||
|
: ($sk['status_verifikator']
|
||||||
|
? ($sk['finalisasi'] ? route('sk.diterima.index') : route('sk.belum-finalisasi.index'))
|
||||||
|
: route('sk.belum-verifikasi.index'));
|
||||||
|
|
||||||
|
// Unit SK (id_unit_penandatangan; unit non-Fakultas > 10 dihitung Universitas = 1), hanya untuk Superuser
|
||||||
|
// karena filter unit di halaman daftar hanya berlaku bagi Superuser
|
||||||
|
$kembaliUnit = '';
|
||||||
|
if (auth()->user()->hasRole('Superuser') && isset($sk['id_unit_penandatangan'])) {
|
||||||
|
$kembaliUnit = $sk['id_unit_penandatangan'] > 10 ? 1 : $sk['id_unit_penandatangan'];
|
||||||
|
}
|
||||||
|
@endphp
|
||||||
|
<a href="{{ $kembaliUrl }}" id="btn-kembali" data-fallback="{{ $kembaliUrl }}" data-unit="{{ $kembaliUnit }}" data-tab="{{ $modeKlaim ? 'reklaim' : '' }}" class="btn btn-sm btn-outline-secondary py-1 px-2.5 ms-2 flex-shrink-0">
|
||||||
|
<i class="uil-arrow-left me-1"></i> Kembali
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card border mb-3 shadow-2xs">
|
<div class="card border mb-3 shadow-2xs sk-info-card">
|
||||||
<div class="card-body py-2.5 px-3">
|
<div class="card-body p-3 p-md-4">
|
||||||
<div class="table-responsive">
|
{{-- Header: ID SK, tentang, dan status --}}
|
||||||
<table class="table table-sm align-middle mb-0" style="font-size: 13.5px;">
|
<div class="d-flex flex-wrap justify-content-between align-items-start gap-3">
|
||||||
<!-- ID SK -->
|
<div class="flex-grow-1" style="min-width: 260px; flex-basis: 0;">
|
||||||
<tr>
|
<span class="sk-id-chip"><i class="uil-pound"></i>{{ $sk['id'] }}</span>
|
||||||
<th style="width: 160px;">ID SK</th>
|
<h5 class="sk-tentang" id="tentang">{{ trim($sk['tentang']) }}</h5>
|
||||||
<td class="text-primary fw-bold">{{ $sk['id'] }}</td>
|
</div>
|
||||||
</tr>
|
<div class="d-flex flex-wrap align-items-center gap-1">
|
||||||
|
@if ($modeKlaim)
|
||||||
<!-- Tentang -->
|
<span class="badge bg-warning rounded-pill fs-6 px-2 py-1">Belum Diklaim</span>
|
||||||
<tr>
|
@elseif ($sk['must_fix'] === 1)
|
||||||
<th>Tentang</th>
|
<span class="badge bg-danger rounded-pill fs-6 px-2 py-1">Perlu Perbaikan</span>
|
||||||
<td>
|
@elseif ($sk['must_fix'] === 0)
|
||||||
<textarea class="form-control form-control-sm" name="tentang" id="tentang" rows="2" readonly style="font-size: 13px; resize: vertical;">{{ trim($sk['tentang']) }}</textarea>
|
<span class="badge bg-info rounded-pill fs-6 px-2 py-1">Sudah Diperbaiki</span>
|
||||||
</td>
|
@elseif ($sk['status_verifikator'] === 0)
|
||||||
</tr>
|
<span class="badge bg-danger rounded-pill fs-6 px-2 py-1">Ditolak</span>
|
||||||
|
@elseif ($sk['status_verifikator'] === 1 && !$sk['finalisasi'])
|
||||||
<!-- TMT -->
|
<span class="badge bg-primary rounded-pill fs-6 px-2 py-1">Belum Finalisasi</span>
|
||||||
<tr>
|
@elseif ($sk['status_verifikator'] === 1 && $sk['finalisasi'])
|
||||||
<th>Tanggal SK</th>
|
<span class="badge bg-success rounded-pill fs-6 px-2 py-1">Sudah Finalisasi</span>
|
||||||
<td>{{ carbon\Carbon::parse($sk['tanggal_sk'])->format('d/m/Y') }}</td>
|
@else
|
||||||
</tr>
|
<span class="badge bg-warning rounded-pill fs-6 px-2 py-1">Belum Diverifikasi</span>
|
||||||
|
|
||||||
<!-- Usia SK -->
|
|
||||||
<tr>
|
|
||||||
<th>Usia SK</th>
|
|
||||||
<td>{{ $usia ?? 0 }} Bulan</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<!-- Terhitung pada -->
|
|
||||||
<tr>
|
|
||||||
<th>Terhitung pada</th>
|
|
||||||
<td>{{ carbon\Carbon::parse($sk['tmt'])->format('d/m/Y') }} -
|
|
||||||
{{ carbon\Carbon::parse($sk['tst'])->format('d/m/Y') }}</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<!-- IKU -->
|
|
||||||
@can('Update IKU')
|
|
||||||
@if ($sk['finalisasi'])
|
|
||||||
<tr>
|
|
||||||
<th>IKU</th>
|
|
||||||
<td>{{ $iku?->iku ?? 'Belum Ada Data' }}</td>
|
|
||||||
</tr>
|
|
||||||
@endif
|
|
||||||
@endcan
|
|
||||||
|
|
||||||
<!-- Status SK -->
|
|
||||||
<tr>
|
|
||||||
<th>Status</th>
|
|
||||||
<td>
|
|
||||||
@if ($sk['must_fix'] === 1)
|
|
||||||
<span class="badge bg-danger rounded-pill fs-6 px-2 py-1">Perlu Perbaikan</span>
|
|
||||||
@elseif ($sk['must_fix'] === 0)
|
|
||||||
<span class="badge bg-info rounded-pill fs-6 px-2 py-1">Sudah Diperbaiki</span>
|
|
||||||
@elseif ($sk['status_verifikator'] === 0)
|
|
||||||
<span class="badge bg-danger rounded-pill fs-6 px-2 py-1">Ditolak</span>
|
|
||||||
@elseif ($sk['status_verifikator'] === 1 && !$sk['finalisasi'])
|
|
||||||
<span class="badge bg-primary rounded-pill fs-6 px-2 py-1">Belum Finalisasi</span>
|
|
||||||
@elseif ($sk['status_verifikator'] === 1 && $sk['finalisasi'])
|
|
||||||
<span class="badge bg-success rounded-pill fs-6 px-2 py-1">Sudah Finalisasi</span>
|
|
||||||
@else
|
|
||||||
<span class="badge bg-warning rounded-pill fs-6 px-2 py-1">Belum Diverifikasi</span>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
@if ($isReklaim)
|
|
||||||
<span class="badge bg-purple rounded-pill fs-6 px-2 py-1 ms-1">SK Reklaim</span>
|
|
||||||
@endif
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<!-- Catatan Verifikator -->
|
|
||||||
@if ($sk['status_verifikator'] === 0 || $sk['must_fix'] === 0 || $sk['must_fix'])
|
|
||||||
<tr>
|
|
||||||
<th>Catatan</th>
|
|
||||||
<td>
|
|
||||||
<textarea class="form-control form-control-sm" name="catatan" id="catatanReadonly" rows="2" readonly style="font-size: 13px; resize: vertical;">{{ $note->note ?? 'Tidak ada catatan' }}</textarea>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<!-- Tombol Ubah -->
|
@if ($isReklaim || $modeKlaim)
|
||||||
<tr>
|
<span class="badge bg-purple rounded-pill fs-6 px-2 py-1 ms-1">SK Reklaim</span>
|
||||||
<td></td>
|
@endif
|
||||||
<td>
|
</div>
|
||||||
@can('Update IKU')
|
</div>
|
||||||
@if ($sk['finalisasi'])
|
|
||||||
@if (($sk['visible'] ?? true) || $iku === null)
|
{{-- Ringkasan tanggal --}}
|
||||||
@if (!($sk['finalisasi'] && $isReklaim))
|
<div class="row g-3 mt-1">
|
||||||
<button type="button" class="btn btn-sm {{ $beritaAcaraUploaded ? 'btn-outline-secondary' : 'btn-outline-primary' }}"
|
<div class="col-md-4">
|
||||||
|
<div class="sk-tile">
|
||||||
|
<div class="sk-tile-icon"><i class="uil-calendar-alt"></i></div>
|
||||||
|
<div>
|
||||||
|
<div class="sk-label">Tanggal SK</div>
|
||||||
|
<div class="sk-value">{{ carbon\Carbon::parse($sk['tanggal_sk'])->format('d/m/Y') }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="sk-tile">
|
||||||
|
<div class="sk-tile-icon"><i class="uil-stopwatch"></i></div>
|
||||||
|
<div>
|
||||||
|
<div class="sk-label">Usia SK</div>
|
||||||
|
<div class="sk-value">{{ $usia ?? 0 }} Bulan</div>
|
||||||
|
</div>
|
||||||
|
@if (($sk['visible'] ?? true) && $sk['status_verifikator'])
|
||||||
|
<div class="ms-auto flex-shrink-0">
|
||||||
|
@if (!$modeKlaim)
|
||||||
|
<button type="button" class="btn btn-sm {{ $beritaAcaraUploaded ? 'btn-outline-secondary' : 'btn-outline-warning' }}" title="Ubah Usia SK"
|
||||||
|
@if ($beritaAcaraUploaded) onclick="showWarning('Peringatan', '{{ addslashes($beritaAcaraMessage) }}')" @else data-bs-toggle="modal" data-bs-target="#ubahUsiaSkModal" @endif>
|
||||||
|
<i class="uil-edit"></i> <span class="d-none d-md-inline">Ubah</span>
|
||||||
|
</button>
|
||||||
|
@else
|
||||||
|
<button type="button" class="btn btn-sm btn-outline-warning" disabled
|
||||||
|
title="Klaim SK terlebih dahulu untuk mengubah usia SK">
|
||||||
|
<i class="uil-edit"></i> <span class="d-none d-md-inline">Ubah</span>
|
||||||
|
</button>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="sk-tile">
|
||||||
|
<div class="sk-tile-icon"><i class="uil-schedule"></i></div>
|
||||||
|
<div>
|
||||||
|
<div class="sk-label">Terhitung pada</div>
|
||||||
|
<div class="sk-value">{{ carbon\Carbon::parse($sk['tmt'])->format('d/m/Y') }} - {{ carbon\Carbon::parse($sk['tst'])->format('d/m/Y') }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@can('Update IKU')
|
||||||
|
@if ($sk['finalisasi'])
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="sk-tile">
|
||||||
|
<div class="sk-tile-icon"><i class="uil-chart-line"></i></div>
|
||||||
|
<div>
|
||||||
|
<div class="sk-label">IKU</div>
|
||||||
|
<div class="sk-value">{{ $iku?->iku ?? 'Belum Ada Data' }}</div>
|
||||||
|
</div>
|
||||||
|
@if (($sk['visible'] ?? true) || $iku === null)
|
||||||
|
<div class="ms-auto flex-shrink-0">
|
||||||
|
@if (!($modeKlaim || $isReklaim))
|
||||||
|
<button type="button" class="btn btn-sm {{ $beritaAcaraUploaded ? 'btn-outline-secondary' : 'btn-outline-primary' }}" title="Ubah IKU"
|
||||||
@if ($beritaAcaraUploaded) onclick="showWarning('Peringatan', '{{ addslashes($beritaAcaraMessage) }}')" @else data-bs-toggle="modal" data-bs-target="#updateIkuModal" data-id="{{ $sk['id'] }}" @endif>
|
@if ($beritaAcaraUploaded) onclick="showWarning('Peringatan', '{{ addslashes($beritaAcaraMessage) }}')" @else data-bs-toggle="modal" data-bs-target="#updateIkuModal" data-id="{{ $sk['id'] }}" @endif>
|
||||||
<i class="uil-edit"></i> <span class="d-none d-md-inline">Ubah IKU</span>
|
<i class="uil-edit"></i> <span class="d-none d-md-inline">Ubah</span>
|
||||||
</button>
|
</button>
|
||||||
@else
|
@else
|
||||||
<button type="button" class="btn btn-sm btn-outline-primary" disabled
|
<button type="button" class="btn btn-sm btn-outline-primary" disabled
|
||||||
title="Button ini dinonaktifkan untuk SK Reklaim yang sudah diterima">
|
title="Ubah IKU dinonaktifkan untuk SK Reklaim">
|
||||||
<i class="uil-edit"></i> <span class="d-none d-md-inline">Ubah IKU</span>
|
<i class="uil-edit"></i> <span class="d-none d-md-inline">Ubah</span>
|
||||||
</button>
|
</button>
|
||||||
@endif
|
@endif
|
||||||
@endif
|
</div>
|
||||||
@endif
|
@endif
|
||||||
@endcan
|
</div>
|
||||||
|
</div>
|
||||||
@if ($sk['visible'] ?? true)
|
@endif
|
||||||
@if ($sk['status_verifikator'])
|
@endcan
|
||||||
@if (!($sk['finalisasi'] && $isReklaim))
|
@if (($modeKlaim || $isReklaim) && $periodeTerakhirKlaim)
|
||||||
<button type="button" class="btn btn-sm {{ $beritaAcaraUploaded ? 'btn-outline-secondary' : 'btn-outline-warning' }}"
|
|
||||||
@if ($beritaAcaraUploaded) onclick="showWarning('Peringatan', '{{ addslashes($beritaAcaraMessage) }}')" @else data-bs-toggle="modal" data-bs-target="#ubahUsiaSkModal" @endif>
|
|
||||||
<i class="uil-edit"></i> <span class="d-none d-md-inline">Ubah Usia SK</span>
|
|
||||||
</button>
|
|
||||||
@else
|
|
||||||
<button type="button" class="btn btn-sm btn-outline-warning" disabled
|
|
||||||
title="Button ini dinonaktifkan untuk SK Reklaim yang sudah diterima">
|
|
||||||
<i class="uil-edit"></i> <span class="d-none d-md-inline">Ubah Usia SK</span>
|
|
||||||
</button>
|
|
||||||
@endif
|
|
||||||
@endif
|
|
||||||
|
|
||||||
<span id="top-action-btns" class="d-inline-flex gap-1 flex-wrap">
|
|
||||||
@if (!$sk['finalisasi'] && !$sk['status_verifikator'])
|
|
||||||
<button type="button" class="btn btn-sm {{ $beritaAcaraUploaded ? 'btn-outline-secondary' : 'btn-outline-purple' }} posisi-multiple-btn">
|
|
||||||
<i class="uil-exchange"></i>
|
|
||||||
<span class="d-none d-md-inline">Ubah Posisi Anggota Dipilih</span> (<span class="top-btn-count">0</span>)
|
|
||||||
</button>
|
|
||||||
@endif
|
|
||||||
@if ($sk['status_verifikator'])
|
|
||||||
<button type="button" class="btn btn-sm {{ $beritaAcaraUploaded ? 'btn-outline-secondary' : 'btn-outline-success' }} jangka-waktu-multiple-btn">
|
|
||||||
<i class="uil-edit"></i>
|
|
||||||
<span class="d-none d-md-inline">Ubah Jangka Waktu Anggota Dipilih</span> (<span class="top-btn-count">0</span>)
|
|
||||||
</button>
|
|
||||||
@endif
|
|
||||||
@can('Hapus Anggota SK')
|
|
||||||
<button type="button" class="btn btn-sm {{ $beritaAcaraUploaded ? 'btn-outline-secondary' : 'btn-outline-danger' }} hapus-multiple-btn">
|
|
||||||
<i class="uil-trash-alt"></i>
|
|
||||||
<span class="d-none d-md-inline">Hapus Anggota Dipilih</span> (<span class="top-btn-count">0</span>)
|
|
||||||
</button>
|
|
||||||
@endcan
|
|
||||||
</span>
|
|
||||||
@endif
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<!-- Preview File SK -->
|
|
||||||
<tr>
|
|
||||||
<th>File SK</th>
|
|
||||||
<td>
|
|
||||||
<a href="{{ $sk['sk'] }}" target="_blank" id="btnPreviewSk"
|
|
||||||
class="btn btn-sm btn-outline-dark"><i class="uil-eye"></i>
|
|
||||||
<span class="d-none d-md-inline">Preview</span>
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
@php
|
@php
|
||||||
$nama = null;
|
// "(398) 2025/2026 Ganjil" ditampilkan dua baris: id periode lalu nama periode
|
||||||
$email = null;
|
$periodeKlaimId = null;
|
||||||
|
$periodeKlaimLabel = $periodeTerakhirKlaim;
|
||||||
if (!empty($sk['upload_by'])) {
|
if (preg_match('/^(\(\d+\))\s*(.+)$/u', trim($periodeTerakhirKlaim), $cocokPeriode)) {
|
||||||
$parts = explode('|', $sk['upload_by']);
|
$periodeKlaimId = $cocokPeriode[1];
|
||||||
$nama = $parts[0] ?? null;
|
$periodeKlaimLabel = $cocokPeriode[2];
|
||||||
$email = $parts[1] ?? null;
|
|
||||||
}
|
}
|
||||||
@endphp
|
@endphp
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="sk-tile">
|
||||||
|
<div class="sk-tile-icon"><i class="uil-history"></i></div>
|
||||||
|
<div style="min-width: 0;">
|
||||||
|
<div class="sk-label">Periode Terakhir Klaim</div>
|
||||||
|
@if ($periodeKlaimId)
|
||||||
|
<div class="sk-value">{{ $periodeKlaimId }}</div>
|
||||||
|
<small class="d-block text-muted text-truncate" title="{{ $periodeKlaimLabel }}">{{ $periodeKlaimLabel }}</small>
|
||||||
|
@else
|
||||||
|
<div class="sk-value text-truncate" title="{{ $periodeTerakhirKlaim }}">{{ $periodeTerakhirKlaim }}</div>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
|
||||||
<tr>
|
{{-- Catatan verifikator --}}
|
||||||
<th>Diunggah oleh </th>
|
@if ($sk['status_verifikator'] === 0 || $sk['must_fix'] === 0 || $sk['must_fix'])
|
||||||
<td>
|
<div class="sk-catatan mt-3" id="catatanReadonly">
|
||||||
|
<div class="sk-label" style="color: #b45309;">Catatan</div>
|
||||||
|
<div style="white-space: pre-line;">{{ $note->note ?? 'Tidak ada catatan' }}</div>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
@php
|
||||||
|
$nama = null;
|
||||||
|
$email = null;
|
||||||
|
|
||||||
|
if (!empty($sk['upload_by'])) {
|
||||||
|
$parts = explode('|', $sk['upload_by']);
|
||||||
|
$nama = $parts[0] ?? null;
|
||||||
|
$email = $parts[1] ?? null;
|
||||||
|
}
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
{{-- Berkas dan petugas --}}
|
||||||
|
<div class="row g-3 mt-0">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="sk-tile">
|
||||||
|
<div class="sk-tile-icon"><i class="uil-file-alt"></i></div>
|
||||||
|
<div style="min-width: 0;">
|
||||||
|
<div class="sk-label">File SK</div>
|
||||||
|
<div class="sk-value text-truncate" title="{{ $sk['no_sk'] ?? '' }}">{{ $sk['no_sk'] ?? '-' }}</div>
|
||||||
|
@if (!empty($namaUnitPenandatangan))
|
||||||
|
<small class="d-block text-muted text-truncate" title="{{ $namaUnitPenandatangan }}">{{ $namaUnitPenandatangan }}</small>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
<div class="ms-auto flex-shrink-0">
|
||||||
|
<a href="{{ $sk['sk'] }}" target="_blank" id="btnPreviewSk" class="btn btn-sm btn-outline-dark" title="Lihat file SK">
|
||||||
|
<i class="uil-eye"></i> <span class="d-none d-md-inline">Lihat</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="sk-tile">
|
||||||
|
<div class="sk-tile-icon"><i class="uil-upload-alt"></i></div>
|
||||||
|
<div style="min-width: 0;">
|
||||||
|
<div class="sk-label">Diunggah oleh</div>
|
||||||
@if ($nama)
|
@if ($nama)
|
||||||
<div style="line-height: 1.3">
|
<div class="sk-value text-truncate" title="{{ $nama }}">{{ $nama }}</div>
|
||||||
{{ $nama }}<br>
|
<small class="d-block text-muted text-truncate" title="{{ $email }}">{{ $email }}</small>
|
||||||
<small class="text-muted">{{ $email }}</small>
|
|
||||||
</div>
|
|
||||||
@else
|
@else
|
||||||
<span class="text-muted">-</span>
|
<span class="text-muted">-</span>
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</div>
|
||||||
</tr>
|
</div>
|
||||||
|
</div>
|
||||||
<!-- Tukang Verifikasinya Siapa Hayoo?? -->
|
{{-- Tukang Verifikasinya Siapa Hayoo?? --}}
|
||||||
@role('Superuser')
|
@role('Superuser')
|
||||||
<tr>
|
<div class="col-md-4">
|
||||||
<th>Diverifikasi oleh </th>
|
<div class="sk-tile">
|
||||||
<td>-
|
<div class="sk-tile-icon"><i class="uil-user-check"></i></div>
|
||||||
|
<div style="min-width: 0;">
|
||||||
|
<div class="sk-label">Diverifikasi oleh</div>
|
||||||
@if ($verifikator && $verifikator->verifikator)
|
@if ($verifikator && $verifikator->verifikator)
|
||||||
<strong>{{ $verifikator->verifikator->name }}</strong> ({{ $verifikator->verified_by }})
|
@php $waktuVerifikasi = \Carbon\Carbon::parse($verifikator->created_at)->format('d/m/Y H:i:s'); @endphp
|
||||||
<br>
|
<div class="sk-value text-truncate" title="{{ $verifikator->verifikator->name }} ({{ $verifikator->verified_by }})">{{ $verifikator->verifikator->name }} <span class="fw-normal text-muted">({{ $verifikator->verified_by }})</span></div>
|
||||||
<small class="text-muted">
|
<small class="d-block text-muted text-truncate" title="{{ $waktuVerifikasi }}">
|
||||||
<i class="uil-clock"></i>
|
<i class="uil-clock"></i> {{ $waktuVerifikasi }}
|
||||||
{{ \Carbon\Carbon::parse($verifikator->created_at)->format('d/m/Y H:i:s') }}
|
|
||||||
</small>
|
</small>
|
||||||
@else
|
@else
|
||||||
<span class="text-muted">Belum Diverifikasi</span>
|
<span class="text-muted">Belum Diverifikasi</span>
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</div>
|
||||||
</tr>
|
</div>
|
||||||
@endrole
|
</div>
|
||||||
</table>
|
@endrole
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- Tombol aksi --}}
|
||||||
|
<div class="sk-section">
|
||||||
|
<div id="top-action-btns" class="d-flex flex-wrap align-items-center justify-content-center gap-2">
|
||||||
|
@if ($sk['visible'] ?? true)
|
||||||
|
<span style="display: contents;">
|
||||||
|
@if (!$modeKlaim && !$sk['finalisasi'] && !$sk['status_verifikator'])
|
||||||
|
<button type="button" class="btn btn-sm {{ $beritaAcaraUploaded ? 'btn-outline-secondary' : 'btn-outline-purple' }} posisi-multiple-btn">
|
||||||
|
<i class="uil-exchange"></i>
|
||||||
|
<span class="d-none d-md-inline">Ubah Posisi Anggota Dipilih</span> (<span class="top-btn-count">0</span>)
|
||||||
|
</button>
|
||||||
|
@endif
|
||||||
|
@if ($sk['status_verifikator'] || $modeKlaim)
|
||||||
|
<button type="button" class="btn btn-sm {{ $beritaAcaraUploaded ? 'btn-outline-secondary' : 'btn-outline-success' }} jangka-waktu-multiple-btn">
|
||||||
|
<i class="uil-edit"></i>
|
||||||
|
<span class="d-none d-md-inline">Ubah Jangka Waktu Anggota Dipilih</span> (<span class="top-btn-count">0</span>)
|
||||||
|
</button>
|
||||||
|
@endif
|
||||||
|
@can('Hapus Anggota SK')
|
||||||
|
@if (!$modeKlaim)
|
||||||
|
<button type="button" class="btn btn-sm {{ $beritaAcaraUploaded ? 'btn-outline-secondary' : 'btn-outline-danger' }} hapus-multiple-btn">
|
||||||
|
<i class="uil-trash-alt"></i>
|
||||||
|
<span class="d-none d-md-inline">Hapus Anggota Dipilih</span> (<span class="top-btn-count">0</span>)
|
||||||
|
</button>
|
||||||
|
@endif
|
||||||
|
@endcan
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -528,7 +593,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
<th>Pegawai</th>
|
<th>Pegawai</th>
|
||||||
<th>Jabatan Tambahan</th>
|
<th>Jabatan</th>
|
||||||
<th>Posisi</th>
|
<th>Posisi</th>
|
||||||
<th>Rubrik</th>
|
<th>Rubrik</th>
|
||||||
<th>Jangka Waktu</th>
|
<th>Jangka Waktu</th>
|
||||||
@@ -557,20 +622,22 @@
|
|||||||
<i class="uil-check-circle text-primary fs-5"></i>
|
<i class="uil-check-circle text-primary fs-5"></i>
|
||||||
<span><span id="floatingSelectedCount" class="fw-bold">0</span><span class="d-none d-md-inline"> anggota dipilih</span></span>
|
<span><span id="floatingSelectedCount" class="fw-bold">0</span><span class="d-none d-md-inline"> anggota dipilih</span></span>
|
||||||
</span>
|
</span>
|
||||||
@if (!$sk['finalisasi'] && !$sk['status_verifikator'])
|
@if (!$modeKlaim && !$sk['finalisasi'] && !$sk['status_verifikator'])
|
||||||
<button type="button" class="btn btn-sm {{ $beritaAcaraUploaded ? 'btn-outline-secondary' : 'btn-outline-purple' }} posisi-multiple-btn rounded-pill px-3">
|
<button type="button" class="btn btn-sm {{ $beritaAcaraUploaded ? 'btn-outline-secondary' : 'btn-outline-purple' }} posisi-multiple-btn rounded-pill px-3">
|
||||||
<i class="uil-exchange"></i> <span class="d-none d-md-inline">Ubah Posisi</span>
|
<i class="uil-exchange"></i> <span class="d-none d-md-inline">Ubah Posisi</span>
|
||||||
</button>
|
</button>
|
||||||
@endif
|
@endif
|
||||||
@if ($sk['status_verifikator'])
|
@if ($sk['status_verifikator'] || $modeKlaim)
|
||||||
<button type="button" class="btn btn-sm {{ $beritaAcaraUploaded ? 'btn-outline-secondary' : 'btn-outline-success' }} jangka-waktu-multiple-btn rounded-pill px-3">
|
<button type="button" class="btn btn-sm {{ $beritaAcaraUploaded ? 'btn-outline-secondary' : 'btn-outline-success' }} jangka-waktu-multiple-btn rounded-pill px-3">
|
||||||
<i class="uil-edit"></i> <span class="d-none d-md-inline">Ubah Jangka Waktu</span>
|
<i class="uil-edit"></i> <span class="d-none d-md-inline">Ubah Jangka Waktu</span>
|
||||||
</button>
|
</button>
|
||||||
@endif
|
@endif
|
||||||
@can('Hapus Anggota SK')
|
@can('Hapus Anggota SK')
|
||||||
<button type="button" class="btn btn-sm {{ $beritaAcaraUploaded ? 'btn-outline-secondary' : 'btn-outline-danger' }} hapus-multiple-btn rounded-pill px-3">
|
@if (!$modeKlaim)
|
||||||
<i class="uil-trash-alt"></i> <span class="d-none d-md-inline">Hapus Anggota</span>
|
<button type="button" class="btn btn-sm {{ $beritaAcaraUploaded ? 'btn-outline-secondary' : 'btn-outline-danger' }} hapus-multiple-btn rounded-pill px-3">
|
||||||
</button>
|
<i class="uil-trash-alt"></i> <span class="d-none d-md-inline">Hapus Anggota</span>
|
||||||
|
</button>
|
||||||
|
@endif
|
||||||
@endcan
|
@endcan
|
||||||
<span style="width:1px; height:20px; background:#cbd5e1; display:inline-block; margin:0 4px;"></span>
|
<span style="width:1px; height:20px; background:#cbd5e1; display:inline-block; margin:0 4px;"></span>
|
||||||
<button type="button" class="btn btn-sm btn-link text-muted deselect-all-btn px-1 text-decoration-none hover:text-danger">
|
<button type="button" class="btn btn-sm btn-link text-muted deselect-all-btn px-1 text-decoration-none hover:text-danger">
|
||||||
@@ -580,7 +647,40 @@
|
|||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if ($sk['visible'] ?? true)
|
@if (($sk['visible'] ?? true) && ($modeKlaim || $isReklaim))
|
||||||
|
{{-- SK Reklaim: tidak ada Simpan/Finalisasi/Tolak/Perbaiki/Batalkan, hanya Klaim SK dan Tambah Anggota --}}
|
||||||
|
<h4>Lainnya</h4>
|
||||||
|
<div class="card border" id="section-lainnya-card">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="d-flex justify-content-center gap-2">
|
||||||
|
@if ($modeKlaim)
|
||||||
|
@can('Verifikasi SK Klaim Ulang')
|
||||||
|
<button type="button" class="btn {{ $beritaAcaraUploaded ? 'btn-secondary' : 'btn-success' }}" id="btn-klaim-sk">
|
||||||
|
<i class="uil-redo"></i> <span class="d-none d-md-inline">Klaim SK</span>
|
||||||
|
</button>
|
||||||
|
@endcan
|
||||||
|
@else
|
||||||
|
<button type="button" class="btn btn-success" disabled title="SK ini sudah diklaim">
|
||||||
|
<i class="uil-redo"></i> <span class="d-none d-md-inline">Klaim SK</span>
|
||||||
|
</button>
|
||||||
|
@endif
|
||||||
|
@can('Tambah Anggota SK')
|
||||||
|
@if ($modeKlaim)
|
||||||
|
<button type="button" class="btn btn-info text-white" disabled title="Klaim SK terlebih dahulu untuk menambah anggota">
|
||||||
|
<i class="uil-user-plus"></i> <span class="d-none d-md-inline">Tambah Anggota</span>
|
||||||
|
</button>
|
||||||
|
@else
|
||||||
|
<button type="button"
|
||||||
|
class="btn {{ $beritaAcaraUploaded ? 'btn-secondary' : 'btn-info' }} text-white"
|
||||||
|
@if ($beritaAcaraUploaded) onclick="showWarning('Peringatan', '{{ addslashes($beritaAcaraMessage) }}')" @else data-bs-toggle="modal" data-bs-target="#tambahAnggotaSk" @endif>
|
||||||
|
<i class="uil-user-plus"></i> <span class="d-none d-md-inline">Tambah Anggota</span>
|
||||||
|
</button>
|
||||||
|
@endif
|
||||||
|
@endcan
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@elseif ($sk['visible'] ?? true)
|
||||||
@if ($sk['must_fix'] !== 1)
|
@if ($sk['must_fix'] !== 1)
|
||||||
@can('Verifikasi SK')
|
@can('Verifikasi SK')
|
||||||
@php
|
@php
|
||||||
@@ -1203,7 +1303,7 @@
|
|||||||
Jangka waktu harus antara 1-6 bulan
|
Jangka waktu harus antara 1-6 bulan
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-3">
|
<div class="mb-3" id="grupAlasanJangkaWaktu">
|
||||||
<label for="alasanJangkaWaktu" class="form-label">Alasan <span
|
<label for="alasanJangkaWaktu" class="form-label">Alasan <span
|
||||||
class="text-danger">*</span></label>
|
class="text-danger">*</span></label>
|
||||||
<textarea class="form-control" id="alasanJangkaWaktu" name="alasanJangkaWaktu" rows="3"
|
<textarea class="form-control" id="alasanJangkaWaktu" name="alasanJangkaWaktu" rows="3"
|
||||||
@@ -1255,8 +1355,86 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@if ($modeKlaim)
|
||||||
|
<script>
|
||||||
|
// Jangka waktu yang diubah sebelum klaim: { id anggota SISKA: bulan }. Baru dikirim saat Klaim SK.
|
||||||
|
var jangkaWaktuKlaim = {};
|
||||||
|
|
||||||
|
// Tampilkan nilai yang sudah diubah pada kolom Jangka Waktu (dipanggil tiap tabel digambar ulang)
|
||||||
|
function terapkanJangkaWaktuKlaim() {
|
||||||
|
$('table[id^="anggota-sk-"] tbody tr').each(function() {
|
||||||
|
var id = $(this).find('input[type=checkbox]').val();
|
||||||
|
if (id !== undefined && jangkaWaktuKlaim[id] !== undefined) {
|
||||||
|
$(this).find('td:last').html(jangkaWaktuKlaim[id] + ' Bulan <i class="uil-pen text-warning ms-1" title="Diubah, disimpan saat Klaim SK"></i>');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Alasan tidak diperlukan karena perubahan belum disimpan ke database
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('#grupAlasanJangkaWaktu').hide();
|
||||||
|
$('#ubahJangkaWaktuModal .alert-info').append('<br><small>Perubahan baru disimpan saat SK diklaim.</small>');
|
||||||
|
});
|
||||||
|
|
||||||
|
// Klaim SK Reklaim: salin SK dan anggotanya dari SISKA ke periode aktif, lalu buka ulang halaman ini
|
||||||
|
$(document).on('click', '#btn-klaim-sk', function() {
|
||||||
|
var btn = $(this);
|
||||||
|
if ($('#berita_acara_uploaded').val() === '1') {
|
||||||
|
showWarning('Peringatan', $('#berita_acara_message').val());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var unitId = new URLSearchParams(window.location.search).get('unit_id') || '';
|
||||||
|
|
||||||
|
Swal.fire({
|
||||||
|
title: 'Klaim SK ini?',
|
||||||
|
text: 'SK beserta seluruh anggotanya akan diklaim pada periode aktif.',
|
||||||
|
icon: 'question',
|
||||||
|
showCancelButton: true,
|
||||||
|
confirmButtonText: 'Ya, Klaim SK',
|
||||||
|
cancelButtonText: 'Batal'
|
||||||
|
}).then(function(result) {
|
||||||
|
if (!result.isConfirmed) { return; }
|
||||||
|
|
||||||
|
var labelAwal = btn.html();
|
||||||
|
btn.prop('disabled', true).html('<i class="uil-spinner-alt spinner"></i> Memproses...');
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url: "{{ route('sk.klaim-ulang.proses-klaim', $sk['id']) }}",
|
||||||
|
type: 'POST',
|
||||||
|
data: {
|
||||||
|
_token: "{{ csrf_token() }}",
|
||||||
|
unit_id: unitId,
|
||||||
|
anggota: Object.keys(jangkaWaktuKlaim).map(function(id) {
|
||||||
|
return { id: id, jangka_waktu: jangkaWaktuKlaim[id] };
|
||||||
|
})
|
||||||
|
},
|
||||||
|
success: function(response) {
|
||||||
|
if (response.success) {
|
||||||
|
showSuccess('Berhasil', response.message);
|
||||||
|
setTimeout(function() {
|
||||||
|
// Buka halaman detail tanpa mode klaim (SK sudah diklaim)
|
||||||
|
window.location.href = "{{ route('sk.detail.index', $sk['id']) }}" +
|
||||||
|
(unitId ? '?unit_id=' + encodeURIComponent(unitId) : '');
|
||||||
|
}, 1000);
|
||||||
|
} else {
|
||||||
|
showError('Gagal', response.message);
|
||||||
|
btn.prop('disabled', false).html(labelAwal);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(xhr, status, error) {
|
||||||
|
handleAjaxError(xhr, status, error);
|
||||||
|
btn.prop('disabled', false).html(labelAwal);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
@endif
|
||||||
|
|
||||||
@php
|
@php
|
||||||
if ($sk['status_verifikator'] === 0) {
|
if ($modeKlaim) {
|
||||||
|
$sidebarClass = 'li-sk-belum-verifikasi';
|
||||||
|
} elseif ($sk['status_verifikator'] === 0) {
|
||||||
$sidebarClass = 'li-sk-ditolak';
|
$sidebarClass = 'li-sk-ditolak';
|
||||||
} elseif ($sk['must_fix'] === 1) {
|
} elseif ($sk['must_fix'] === 1) {
|
||||||
$sidebarClass = 'li-sk-perlu-perbaikan';
|
$sidebarClass = 'li-sk-perlu-perbaikan';
|
||||||
@@ -1293,6 +1471,28 @@
|
|||||||
var unitId = new URLSearchParams(window.location.search).get('unit_id') || '';
|
var unitId = new URLSearchParams(window.location.search).get('unit_id') || '';
|
||||||
console.log('Unit ID dari URL:', unitId);
|
console.log('Unit ID dari URL:', unitId);
|
||||||
|
|
||||||
|
// Tombol Kembali: ke halaman daftar SK asal (dari referrer), jika tidak ada pakai tujuan cadangan sesuai status SK
|
||||||
|
$('#btn-kembali').on('click', function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
var url = $(this).data('fallback');
|
||||||
|
try {
|
||||||
|
var ref = new URL(document.referrer);
|
||||||
|
if (ref.origin === window.location.origin
|
||||||
|
&& ref.pathname.indexOf('/sk/') === 0
|
||||||
|
&& ref.pathname.indexOf('/sk/detail') !== 0) {
|
||||||
|
url = ref.pathname;
|
||||||
|
}
|
||||||
|
} catch (err) { /* referrer kosong/tidak valid: pakai tujuan cadangan */ }
|
||||||
|
// Bawa unit_id: dari URL detail, jika tidak ada pakai unit SK ini (Superuser)
|
||||||
|
var unitKembali = unitId || $(this).data('unit');
|
||||||
|
var tabKembali = $(this).data('tab');
|
||||||
|
var queryKembali = [];
|
||||||
|
if (unitKembali) { queryKembali.push('unit_id=' + encodeURIComponent(unitKembali)); }
|
||||||
|
if (tabKembali) { queryKembali.push('tab=' + encodeURIComponent(tabKembali)); }
|
||||||
|
if (queryKembali.length) { url += '?' + queryKembali.join('&'); }
|
||||||
|
window.location.href = url;
|
||||||
|
});
|
||||||
|
|
||||||
function renderJenisPegawaiTag(jenis) {
|
function renderJenisPegawaiTag(jenis) {
|
||||||
var config = {
|
var config = {
|
||||||
'dosen': { color: 'var(--ct-primary, #2563eb)', rgb: '37, 99, 235', icon: 'uil-user-graduate' },
|
'dosen': { color: 'var(--ct-primary, #2563eb)', rgb: '37, 99, 235', icon: 'uil-user-graduate' },
|
||||||
@@ -1315,8 +1515,10 @@
|
|||||||
var tableId = '#anggota-sk-' + (index + 1);
|
var tableId = '#anggota-sk-' + (index + 1);
|
||||||
var kategoriParam = key;
|
var kategoriParam = key;
|
||||||
|
|
||||||
|
pasangSkeletonSk(tableId, 5, ['kotak', 'tiga', 'pendek', 'pendek', 'pendek', 'pendek']);
|
||||||
$(tableId).DataTable({
|
$(tableId).DataTable({
|
||||||
processing: true,
|
autoWidth: false,
|
||||||
|
processing: false,
|
||||||
serverSide: true,
|
serverSide: true,
|
||||||
ajax: {
|
ajax: {
|
||||||
url: "{{ route('sk.detail.data-anggota-sk', ':id') }}".replace(':id',
|
url: "{{ route('sk.detail.data-anggota-sk', ':id') }}".replace(':id',
|
||||||
@@ -1330,8 +1532,7 @@
|
|||||||
name: 'checkbox',
|
name: 'checkbox',
|
||||||
className: 'text-center align-middle',
|
className: 'text-center align-middle',
|
||||||
orderable: false,
|
orderable: false,
|
||||||
searchable: false,
|
searchable: false
|
||||||
width: '40px'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
data: 'nama',
|
data: 'nama',
|
||||||
@@ -1354,8 +1555,7 @@
|
|||||||
{
|
{
|
||||||
data: 'jtt',
|
data: 'jtt',
|
||||||
name: 'jtt',
|
name: 'jtt',
|
||||||
className: 'align-middle',
|
className: 'align-middle'
|
||||||
width: '120px'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
data: 'posisi',
|
data: 'posisi',
|
||||||
@@ -1415,6 +1615,10 @@
|
|||||||
new bootstrap.Tooltip(el, { trigger: 'hover' });
|
new bootstrap.Tooltip(el, { trigger: 'hover' });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@if ($modeKlaim)
|
||||||
|
terapkanJangkaWaktuKlaim();
|
||||||
|
@endif
|
||||||
|
|
||||||
// Trigger validasi setelah datatables selesai draw
|
// Trigger validasi setelah datatables selesai draw
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
validateFormAndUpdateButtons();
|
validateFormAndUpdateButtons();
|
||||||
@@ -1426,8 +1630,9 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
pasangSkeletonSk('#daftar-jurnal', 5, ['panjang', 'pendek']);
|
||||||
$('#daftar-jurnal').DataTable({
|
$('#daftar-jurnal').DataTable({
|
||||||
processing: true,
|
processing: false,
|
||||||
serverSide: true,
|
serverSide: true,
|
||||||
ajax: {
|
ajax: {
|
||||||
url: "{{ route('sk.detail.data-jurnal', ':id') }}".replace(':id', skId),
|
url: "{{ route('sk.detail.data-jurnal', ':id') }}".replace(':id', skId),
|
||||||
@@ -3078,6 +3283,27 @@ $('#btnKonfirmasiBatalkan').on('click', function() {
|
|||||||
|
|
||||||
// Event handler untuk konfirmasi ubah jangka waktu
|
// Event handler untuk konfirmasi ubah jangka waktu
|
||||||
$('#konfirmasiUbahJangkaWaktu').on('click', function() {
|
$('#konfirmasiUbahJangkaWaktu').on('click', function() {
|
||||||
|
@if ($modeKlaim)
|
||||||
|
// SK belum diklaim: jangka waktu hanya ditampung di halaman dan dikirim saat Klaim SK
|
||||||
|
if (!validateJangkaWaktu()) {
|
||||||
|
showError('Error!', 'Jangka waktu harus antara 1-6 bulan');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var jwTerpilih = getSelectedCheckboxes();
|
||||||
|
if (jwTerpilih.length === 0) {
|
||||||
|
showWarning('Peringatan!', 'Tidak ada anggota yang dipilih');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var jwNilai = parseInt($('#jangkaWaktu').val(), 10);
|
||||||
|
jwTerpilih.each(function() {
|
||||||
|
jangkaWaktuKlaim[$(this).val()] = jwNilai;
|
||||||
|
});
|
||||||
|
terapkanJangkaWaktuKlaim();
|
||||||
|
$('#ubahJangkaWaktuModal').modal('hide');
|
||||||
|
showSuccess('Berhasil', 'Jangka waktu ' + jwNilai + ' bulan diterapkan ke ' + jwTerpilih.length + ' anggota. Perubahan disimpan saat SK diklaim.');
|
||||||
|
return;
|
||||||
|
@endif
|
||||||
|
|
||||||
if (!validateJangkaWaktuForm()) {
|
if (!validateJangkaWaktuForm()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -3278,8 +3504,8 @@ $('#btnKonfirmasiBatalkan').on('click', function() {
|
|||||||
element: 'div.card.border:first'
|
element: 'div.card.border:first'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Preview File SK',
|
title: 'Lihat File SK',
|
||||||
text: 'Klik tombol <b>Preview</b> untuk membuka dokumen PDF SK asli sebelum melakukan verifikasi. Pastikan isi SK sesuai sebelum melanjutkan.',
|
text: 'Klik tombol <b>Lihat</b> untuk membuka dokumen PDF SK asli sebelum melakukan verifikasi. Pastikan isi SK sesuai sebelum melanjutkan.',
|
||||||
element: '#btnPreviewSk'
|
element: '#btnPreviewSk'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -35,6 +35,8 @@
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@include('verifikasi.sk._kolom_sk_css')
|
||||||
|
|
||||||
#diterima tbody .btn-primary {
|
#diterima tbody .btn-primary {
|
||||||
transition: transform 0.1s ease, box-shadow 0.1s ease;
|
transition: transform 0.1s ease, box-shadow 0.1s ease;
|
||||||
}
|
}
|
||||||
@@ -127,8 +129,9 @@
|
|||||||
$('.li-sk').addClass('show');
|
$('.li-sk').addClass('show');
|
||||||
$('.li-sk-diterima').addClass('active badge-primary-lighten');
|
$('.li-sk-diterima').addClass('active badge-primary-lighten');
|
||||||
|
|
||||||
|
pasangSkeletonSk('#diterima');
|
||||||
var table = $('#diterima').DataTable({
|
var table = $('#diterima').DataTable({
|
||||||
processing: true,
|
processing: false,
|
||||||
serverSide: true,
|
serverSide: true,
|
||||||
ajax: {
|
ajax: {
|
||||||
url: "{{ route('sk.diterima.data') }}",
|
url: "{{ route('sk.diterima.data') }}",
|
||||||
@@ -148,7 +151,7 @@
|
|||||||
{
|
{
|
||||||
data: 'no_sk',
|
data: 'no_sk',
|
||||||
name: 'no_sk',
|
name: 'no_sk',
|
||||||
className: 'text-center'
|
className: 'text-start'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
data: 'tentang',
|
data: 'tentang',
|
||||||
@@ -179,6 +182,7 @@
|
|||||||
if (existing) { existing.dispose(); }
|
if (existing) { existing.dispose(); }
|
||||||
new bootstrap.Tooltip(el, { trigger: 'hover' });
|
new bootstrap.Tooltip(el, { trigger: 'hover' });
|
||||||
});
|
});
|
||||||
|
initKolomSk('#diterima');
|
||||||
},
|
},
|
||||||
order: [[2, 'asc']],
|
order: [[2, 'asc']],
|
||||||
language: {
|
language: {
|
||||||
@@ -193,6 +197,8 @@
|
|||||||
|
|
||||||
@include('verifikasi.sk._filter_unit_kerja_js')
|
@include('verifikasi.sk._filter_unit_kerja_js')
|
||||||
|
|
||||||
|
@include('verifikasi.sk._kolom_sk_js')
|
||||||
|
|
||||||
$('#diterima').on('click', 'tbody tr', function(e) {
|
$('#diterima').on('click', 'tbody tr', function(e) {
|
||||||
if ($(e.target).closest('a, button').length) { return; }
|
if ($(e.target).closest('a, button').length) { return; }
|
||||||
var url = $(this).data('url');
|
var url = $(this).data('url');
|
||||||
|
|||||||
@@ -30,6 +30,8 @@
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@include('verifikasi.sk._kolom_sk_css')
|
||||||
|
|
||||||
#ditolak tbody .btn-primary {
|
#ditolak tbody .btn-primary {
|
||||||
transition: transform 0.1s ease, box-shadow 0.1s ease;
|
transition: transform 0.1s ease, box-shadow 0.1s ease;
|
||||||
}
|
}
|
||||||
@@ -94,8 +96,9 @@
|
|||||||
$('.li-sk').addClass('show');
|
$('.li-sk').addClass('show');
|
||||||
$('.li-sk-ditolak').addClass('active badge-primary-lighten');
|
$('.li-sk-ditolak').addClass('active badge-primary-lighten');
|
||||||
|
|
||||||
|
pasangSkeletonSk('#ditolak');
|
||||||
var table = $('#ditolak').DataTable({
|
var table = $('#ditolak').DataTable({
|
||||||
processing: true,
|
processing: false,
|
||||||
serverSide: true,
|
serverSide: true,
|
||||||
ajax: {
|
ajax: {
|
||||||
url: "{{ route('sk.ditolak.data') }}",
|
url: "{{ route('sk.ditolak.data') }}",
|
||||||
@@ -114,7 +117,7 @@
|
|||||||
{
|
{
|
||||||
data: 'no_sk',
|
data: 'no_sk',
|
||||||
name: 'no_sk',
|
name: 'no_sk',
|
||||||
className: 'text-center'
|
className: 'text-start'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
data: 'tentang',
|
data: 'tentang',
|
||||||
@@ -148,6 +151,7 @@
|
|||||||
if (existing) { existing.dispose(); }
|
if (existing) { existing.dispose(); }
|
||||||
new bootstrap.Tooltip(el, { trigger: 'hover', container: 'body' });
|
new bootstrap.Tooltip(el, { trigger: 'hover', container: 'body' });
|
||||||
});
|
});
|
||||||
|
initKolomSk('#ditolak');
|
||||||
},
|
},
|
||||||
order: [[2, 'asc']],
|
order: [[2, 'asc']],
|
||||||
language: {
|
language: {
|
||||||
@@ -157,6 +161,8 @@
|
|||||||
|
|
||||||
@include('verifikasi.sk._filter_unit_kerja_js')
|
@include('verifikasi.sk._filter_unit_kerja_js')
|
||||||
|
|
||||||
|
@include('verifikasi.sk._kolom_sk_js')
|
||||||
|
|
||||||
$('#ditolak').on('click', 'tbody tr', function(e) {
|
$('#ditolak').on('click', 'tbody tr', function(e) {
|
||||||
if ($(e.target).closest('a, button').length) { return; }
|
if ($(e.target).closest('a, button').length) { return; }
|
||||||
var url = $(this).data('url');
|
var url = $(this).data('url');
|
||||||
|
|||||||
@@ -1,391 +0,0 @@
|
|||||||
@extends('layouts.main')
|
|
||||||
|
|
||||||
@section('breadcrumb')
|
|
||||||
<ol class="breadcrumb m-0">
|
|
||||||
<li class="breadcrumb-item"><a href="javascript:void(0);">Verifikasi</a></li>
|
|
||||||
<li class="breadcrumb-item"><a href="{{ route('sk.klaim-ulang.index') }}{{ request('unit_id') ? '?unit_id=' . request('unit_id') : '' }}">SK - Klaim Ulang</a></li>
|
|
||||||
<li class="breadcrumb-item active" aria-current="page">{{ $title }}</li>
|
|
||||||
</ol>
|
|
||||||
@endsection
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
<input type="hidden" id="berita_acara_uploaded" value="{{ $beritaAcaraUploaded ? '1' : '0' }}">
|
|
||||||
<input type="hidden" id="berita_acara_message" value="{{ $beritaAcaraMessage ?? '' }}">
|
|
||||||
|
|
||||||
<div class="card border">
|
|
||||||
<div class="card-body">
|
|
||||||
<div class="table-responsive">
|
|
||||||
<table class="table table-sm">
|
|
||||||
<!-- ID SK -->
|
|
||||||
<tr>
|
|
||||||
<th width="200">ID SK</th>
|
|
||||||
<td class="text-primary fw-bold">{{ $sk['id'] }}</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<!-- Nomor SK -->
|
|
||||||
<tr>
|
|
||||||
<th>Nomor SK</th>
|
|
||||||
<td>{{ $sk['no_sk'] }}</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<!-- Tentang -->
|
|
||||||
<tr>
|
|
||||||
<th>Tentang</th>
|
|
||||||
<td>
|
|
||||||
<textarea class="form-control" name="tentang" id="tentang" cols="30" rows="3" readonly>{{ $sk['tentang'] }}</textarea>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<!-- Tanggal SK -->
|
|
||||||
<tr>
|
|
||||||
<th>Tanggal SK</th>
|
|
||||||
<td>{{ \Carbon\Carbon::parse($sk['tanggal_sk'])->format('d/m/Y') }}</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<!-- TMT -->
|
|
||||||
<tr>
|
|
||||||
<th>Terhitung pada</th>
|
|
||||||
<td>{{ \Carbon\Carbon::parse($sk['tmt'])->format('d/m/Y') }} - {{ \Carbon\Carbon::parse($sk['tst'])->format('d/m/Y') }}</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<!-- Status Klaim -->
|
|
||||||
<tr>
|
|
||||||
<th>Status</th>
|
|
||||||
<td>
|
|
||||||
@if (!$periodeAktif)
|
|
||||||
<span class="badge bg-secondary rounded-pill fs-6 px-2 py-1">Periode Tidak Aktif</span>
|
|
||||||
@elseif ($sudahDiklaim)
|
|
||||||
<span class="badge bg-success rounded-pill fs-6 px-2 py-1">Sudah Diklaim</span>
|
|
||||||
@else
|
|
||||||
<span class="badge bg-warning rounded-pill fs-6 px-2 py-1">Belum Diklaim</span>
|
|
||||||
@endif
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<!-- Periode Terakhir Klaim -->
|
|
||||||
@if ($periodeNama)
|
|
||||||
<tr>
|
|
||||||
<th>Periode Terakhir Klaim</th>
|
|
||||||
<td>{{ $periodeNama }}</td>
|
|
||||||
</tr>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
<!-- File SK -->
|
|
||||||
<tr>
|
|
||||||
<th>File SK</th>
|
|
||||||
<td>
|
|
||||||
<a href="{{ $sk['sk'] }}" class="btn btn-sm btn-info" target="_blank">
|
|
||||||
<i class="uil-file-alt"></i> Preview SK
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Opsi Edit Jangka Waktu -->
|
|
||||||
@can('Verifikasi SK Klaim Ulang')
|
|
||||||
@if ($periodeAktif && !$sudahDiklaim)
|
|
||||||
<div class="card border">
|
|
||||||
<div class="card-body">
|
|
||||||
@include('components.datatable-header', [
|
|
||||||
'title' => 'Opsi Edit Jangka Waktu',
|
|
||||||
'description' => 'Pilih metode untuk mengatur jangka waktu anggota SK'
|
|
||||||
])
|
|
||||||
|
|
||||||
|
|
||||||
<div class="mb-3">
|
|
||||||
<div class="form-check mb-2">
|
|
||||||
<input class="form-check-input" type="radio" name="editMode" id="editModeSingle" value="single" checked>
|
|
||||||
<label class="form-check-label" for="editModeSingle">
|
|
||||||
<strong>Opsi 1:</strong> Terapkan jangka waktu yang sama untuk semua anggota
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<div class="form-check">
|
|
||||||
<input class="form-check-input" type="radio" name="editMode" id="editModeIndividual" value="individual">
|
|
||||||
<label class="form-check-label" for="editModeIndividual">
|
|
||||||
<strong>Opsi 2:</strong> Edit jangka waktu per anggota (custom)
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Form Jangka Waktu Global (Opsi 1) -->
|
|
||||||
<div id="singleModeForm" class="mt-3">
|
|
||||||
<div class="row align-items-end">
|
|
||||||
<div class="col-md-3">
|
|
||||||
<label for="globalJangkaWaktu" class="form-label">Jangka Waktu (Bulan)</label>
|
|
||||||
<input type="number" class="form-control" id="globalJangkaWaktu" min="0" value="0" placeholder="Masukkan jumlah bulan">
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3">
|
|
||||||
<button type="button" class="btn {{ $beritaAcaraUploaded ? 'btn-secondary' : 'btn-primary' }}" id="btnTerapkanGlobal" {{ $beritaAcaraUploaded ? 'disabled' : '' }}>
|
|
||||||
<i class="uil-check"></i> Terapkan ke Semua
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Info Opsi 2 -->
|
|
||||||
<div id="individualModeInfo" class="mt-3" style="display: none;">
|
|
||||||
<div class="alert alert-info mb-0">
|
|
||||||
<i class="uil-info-circle"></i> Mode edit individual aktif. Anda dapat mengubah jangka waktu masing-masing anggota di kolom "Jangka Waktu" pada tabel di bawah.
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
@endcan
|
|
||||||
|
|
||||||
<!-- Tabel Anggota SK -->
|
|
||||||
<div class="card border">
|
|
||||||
<div class="card-body">
|
|
||||||
@include('components.datatable-header', [
|
|
||||||
'title' => 'Daftar Anggota SK',
|
|
||||||
'description' => 'Berikut adalah daftar anggota yang terdaftar dalam Surat Keputusan (SK) ini'
|
|
||||||
])
|
|
||||||
|
|
||||||
<div class="table-responsive">
|
|
||||||
<table class="table table-bordered table-striped w-100" id="anggota-table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>No</th>
|
|
||||||
<th>Nama</th>
|
|
||||||
<th>NIP</th>
|
|
||||||
<th>Keterangan</th>
|
|
||||||
<th>Posisi</th>
|
|
||||||
<th>Jangka Waktu</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Button Klaim Ulang -->
|
|
||||||
@can('Verifikasi SK Klaim Ulang')
|
|
||||||
@if ($periodeAktif && !$sudahDiklaim)
|
|
||||||
<div class="card border">
|
|
||||||
<div class="card-body">
|
|
||||||
<div class="d-flex justify-content-center gap-2">
|
|
||||||
<button type="button" class="btn {{ $beritaAcaraUploaded ? 'btn-secondary' : 'btn-success' }}" id="btnKlaimUlang" {{ $beritaAcaraUploaded ? 'disabled' : '' }}>
|
|
||||||
<i class="uil-redo"></i> Klaim Ulang SK
|
|
||||||
</button>
|
|
||||||
<a href="{{ route('sk.klaim-ulang.index') }}{{ request('unit_id') ? '?unit_id=' . request('unit_id') : '' }}" class="btn btn-secondary">
|
|
||||||
<i class="uil-arrow-left"></i> Kembali
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
@endcan
|
|
||||||
@endsection
|
|
||||||
|
|
||||||
@section('js')
|
|
||||||
<!-- Berita Acara Warning -->
|
|
||||||
<script>
|
|
||||||
$(document).ready(function() {
|
|
||||||
var beritaAcaraUploaded = $('#berita_acara_uploaded').val() === '1';
|
|
||||||
var beritaAcaraMessage = $('#berita_acara_message').val();
|
|
||||||
|
|
||||||
if (beritaAcaraUploaded) {
|
|
||||||
$('#btnTerapkanGlobal, #btnKlaimUlang').on('click', function(e) {
|
|
||||||
e.preventDefault();
|
|
||||||
e.stopImmediatePropagation();
|
|
||||||
showWarning('Peringatan', beritaAcaraMessage);
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
$(document).ready(function() {
|
|
||||||
$('.si-sk').addClass('menuitem-active');
|
|
||||||
$('.ni-sk').addClass('badge-primary-lighten');
|
|
||||||
$('.li-sk').addClass('show');
|
|
||||||
$('.li-sk-klaim-ulang').addClass('active badge-primary-lighten');
|
|
||||||
|
|
||||||
// Initialize DataTable for Anggota
|
|
||||||
const columns = [
|
|
||||||
{
|
|
||||||
data: 'DT_RowIndex',
|
|
||||||
name: 'DT_RowIndex',
|
|
||||||
className: 'text-center',
|
|
||||||
orderable: false,
|
|
||||||
searchable: false,
|
|
||||||
width: '50px'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
data: 'nama',
|
|
||||||
name: 'nama'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
data: 'nip',
|
|
||||||
name: 'nip',
|
|
||||||
className: 'text-center',
|
|
||||||
width: '150px'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
data: 'keterangan',
|
|
||||||
name: 'keterangan',
|
|
||||||
className: 'text-center',
|
|
||||||
width: '120px',
|
|
||||||
render: function(data) {
|
|
||||||
return data ? data.charAt(0).toUpperCase() + data.slice(1) : '-';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
data: 'posisi',
|
|
||||||
name: 'posisi',
|
|
||||||
width: '150px'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
data: 'jangka_waktu',
|
|
||||||
name: 'jangka_waktu',
|
|
||||||
className: 'text-center',
|
|
||||||
width: '150px',
|
|
||||||
@if ($periodeAktif && !$sudahDiklaim)
|
|
||||||
render: function(data, type, row) {
|
|
||||||
return '<input type="number" class="form-control form-control-sm jangka-waktu-input" data-id="' + row.id + '" value="' + (data || 0) + '" min="0" style="width: 100px; margin: 0 auto;">';
|
|
||||||
}
|
|
||||||
@else
|
|
||||||
render: function(data) {
|
|
||||||
return data || '-';
|
|
||||||
}
|
|
||||||
@endif
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
const anggotaTable = $('#anggota-table').DataTable({
|
|
||||||
processing: true,
|
|
||||||
serverSide: true,
|
|
||||||
ajax: "{{ route('sk.klaim-ulang.data-anggota', $sk['id']) }}",
|
|
||||||
columns: columns,
|
|
||||||
language: {
|
|
||||||
processing: "<div class='spinner'></div> Sedang Memuat...",
|
|
||||||
},
|
|
||||||
pageLength: 25
|
|
||||||
});
|
|
||||||
|
|
||||||
@can('Verifikasi SK Klaim Ulang')
|
|
||||||
@if ($periodeAktif && !$sudahDiklaim)
|
|
||||||
// Event handler untuk radio button mode edit
|
|
||||||
$('input[name="editMode"]').on('change', function() {
|
|
||||||
const mode = $(this).val();
|
|
||||||
|
|
||||||
if (mode === 'single') {
|
|
||||||
// Tampilkan form global, sembunyikan info individual
|
|
||||||
$('#singleModeForm').show();
|
|
||||||
$('#individualModeInfo').hide();
|
|
||||||
|
|
||||||
// Disable semua input jangka waktu di tabel
|
|
||||||
$('.jangka-waktu-input').prop('readonly', true).addClass('bg-light');
|
|
||||||
} else {
|
|
||||||
// Sembunyikan form global, tampilkan info individual
|
|
||||||
$('#singleModeForm').hide();
|
|
||||||
$('#individualModeInfo').show();
|
|
||||||
|
|
||||||
// Enable semua input jangka waktu di tabel
|
|
||||||
$('.jangka-waktu-input').prop('readonly', false).removeClass('bg-light');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Event handler untuk button "Terapkan ke Semua"
|
|
||||||
$('#btnTerapkanGlobal').on('click', function() {
|
|
||||||
const globalValue = $('#globalJangkaWaktu').val();
|
|
||||||
|
|
||||||
if (globalValue === '' || globalValue < 0) {
|
|
||||||
showWarning('Peringatan', 'Masukkan jangka waktu yang valid (minimal 0)');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set semua input jangka waktu dengan nilai global
|
|
||||||
$('.jangka-waktu-input').val(globalValue);
|
|
||||||
|
|
||||||
showSuccess('Berhasil', 'Jangka waktu ' + globalValue + ' bulan telah diterapkan ke semua anggota');
|
|
||||||
});
|
|
||||||
|
|
||||||
// Initialize mode default (single) setelah DataTable loaded
|
|
||||||
anggotaTable.on('draw', function() {
|
|
||||||
const currentMode = $('input[name="editMode"]:checked').val();
|
|
||||||
if (currentMode === 'single') {
|
|
||||||
$('.jangka-waktu-input').prop('readonly', true).addClass('bg-light');
|
|
||||||
} else {
|
|
||||||
$('.jangka-waktu-input').prop('readonly', false).removeClass('bg-light');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
@endif
|
|
||||||
@endcan
|
|
||||||
|
|
||||||
@can('Verifikasi SK Klaim Ulang')
|
|
||||||
// Event handler untuk button Klaim Ulang
|
|
||||||
$(document).on('click', '#btnKlaimUlang', function() {
|
|
||||||
@if ($periodeAktif && !$sudahDiklaim)
|
|
||||||
// Kumpulkan data jangka waktu yang sudah diedit
|
|
||||||
const anggotaData = [];
|
|
||||||
$('.jangka-waktu-input').each(function() {
|
|
||||||
const anggotaId = $(this).data('id');
|
|
||||||
const jangkaWaktu = $(this).val();
|
|
||||||
anggotaData.push({
|
|
||||||
id: anggotaId,
|
|
||||||
jangka_waktu: jangkaWaktu
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
if (confirm('Apakah Anda yakin ingin mengklaim ulang SK ini?')) {
|
|
||||||
@else
|
|
||||||
if (confirm('Apakah Anda yakin ingin mengklaim ulang SK ini?')) {
|
|
||||||
@endif
|
|
||||||
// Disable button untuk mencegah double click
|
|
||||||
const btn = $(this);
|
|
||||||
btn.prop('disabled', true);
|
|
||||||
btn.html('<i class="uil-spinner-alt spinner"></i> Memproses...');
|
|
||||||
|
|
||||||
@if ($periodeAktif && !$sudahDiklaim)
|
|
||||||
const requestData = {
|
|
||||||
_token: "{{ csrf_token() }}",
|
|
||||||
anggota: anggotaData,
|
|
||||||
unit_id: "{{ request('unit_id') }}"
|
|
||||||
};
|
|
||||||
@else
|
|
||||||
const requestData = {
|
|
||||||
_token: "{{ csrf_token() }}",
|
|
||||||
unit_id: "{{ request('unit_id') }}"
|
|
||||||
};
|
|
||||||
@endif
|
|
||||||
|
|
||||||
// Kirim request ke server
|
|
||||||
$.ajax({
|
|
||||||
url: "{{ route('sk.klaim-ulang.proses-klaim', $sk['id']) }}",
|
|
||||||
type: 'POST',
|
|
||||||
data: requestData,
|
|
||||||
success: function(response) {
|
|
||||||
if (response.success) {
|
|
||||||
showSuccess('Berhasil', response.message);
|
|
||||||
// Redirect ke halaman detail SK dengan delay untuk menampilkan notifikasi
|
|
||||||
setTimeout(function() {
|
|
||||||
if (response.redirect) {
|
|
||||||
window.location.href = response.redirect;
|
|
||||||
} else {
|
|
||||||
window.location.reload();
|
|
||||||
}
|
|
||||||
}, 1000);
|
|
||||||
} else {
|
|
||||||
showError('Gagal', response.message);
|
|
||||||
btn.prop('disabled', false);
|
|
||||||
btn.html('<i class="uil-redo"></i> Klaim Ulang SK');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
error: function(xhr, status, error) {
|
|
||||||
// Gunakan handleAjaxError yang sudah didefinisikan di layouts.main
|
|
||||||
handleAjaxError(xhr, status, error);
|
|
||||||
btn.prop('disabled', false);
|
|
||||||
btn.html('<i class="uil-redo"></i> Klaim Ulang SK');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
@endcan
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
@endsection
|
|
||||||
@@ -36,6 +36,8 @@
|
|||||||
transition: background-color 0s;
|
transition: background-color 0s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@include('verifikasi.sk._kolom_sk_css')
|
||||||
|
|
||||||
#table-belum-diklaim tbody .btn-primary,
|
#table-belum-diklaim tbody .btn-primary,
|
||||||
#table-sudah-diklaim tbody .btn-primary {
|
#table-sudah-diklaim tbody .btn-primary {
|
||||||
transition: transform 0.1s ease, box-shadow 0.1s ease;
|
transition: transform 0.1s ease, box-shadow 0.1s ease;
|
||||||
@@ -177,7 +179,7 @@
|
|||||||
{
|
{
|
||||||
data: 'no_sk',
|
data: 'no_sk',
|
||||||
name: 'no_sk',
|
name: 'no_sk',
|
||||||
className: 'text-center'
|
className: 'text-start'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
data: 'tentang',
|
data: 'tentang',
|
||||||
@@ -205,8 +207,9 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
// Inisialisasi DataTable untuk Belum Diklaim
|
// Inisialisasi DataTable untuk Belum Diklaim
|
||||||
|
pasangSkeletonSk('#table-belum-diklaim');
|
||||||
var tableBelumDiklaim = $('#table-belum-diklaim').DataTable({
|
var tableBelumDiklaim = $('#table-belum-diklaim').DataTable({
|
||||||
processing: true,
|
processing: false,
|
||||||
serverSide: true,
|
serverSide: true,
|
||||||
ajax: {
|
ajax: {
|
||||||
url: "{{ route('sk.klaim-ulang.data') }}",
|
url: "{{ route('sk.klaim-ulang.data') }}",
|
||||||
@@ -223,15 +226,18 @@
|
|||||||
.attr('data-bs-placement', 'top')
|
.attr('data-bs-placement', 'top')
|
||||||
.attr('title', 'Klik untuk detail');
|
.attr('title', 'Klik untuk detail');
|
||||||
},
|
},
|
||||||
|
@endcan
|
||||||
drawCallback: function() {
|
drawCallback: function() {
|
||||||
|
@can('Verifikasi SK Klaim Ulang')
|
||||||
document.querySelectorAll('body > .tooltip').forEach(function(el) { el.remove(); });
|
document.querySelectorAll('body > .tooltip').forEach(function(el) { el.remove(); });
|
||||||
document.querySelectorAll('#table-belum-diklaim tbody [data-bs-toggle="tooltip"]').forEach(function(el) {
|
document.querySelectorAll('#table-belum-diklaim tbody [data-bs-toggle="tooltip"]').forEach(function(el) {
|
||||||
var existing = bootstrap.Tooltip.getInstance(el);
|
var existing = bootstrap.Tooltip.getInstance(el);
|
||||||
if (existing) { existing.dispose(); }
|
if (existing) { existing.dispose(); }
|
||||||
new bootstrap.Tooltip(el, { trigger: 'hover' });
|
new bootstrap.Tooltip(el, { trigger: 'hover' });
|
||||||
});
|
});
|
||||||
|
@endcan
|
||||||
|
initKolomSk('#table-belum-diklaim');
|
||||||
},
|
},
|
||||||
@endcan
|
|
||||||
language: {
|
language: {
|
||||||
processing: "<div class='spinner'></div> Sedang Memuat...",
|
processing: "<div class='spinner'></div> Sedang Memuat...",
|
||||||
},
|
},
|
||||||
@@ -239,8 +245,9 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Inisialisasi DataTable untuk Sudah Diklaim
|
// Inisialisasi DataTable untuk Sudah Diklaim
|
||||||
|
pasangSkeletonSk('#table-sudah-diklaim');
|
||||||
var tableSudahDiklaim = $('#table-sudah-diklaim').DataTable({
|
var tableSudahDiklaim = $('#table-sudah-diklaim').DataTable({
|
||||||
processing: true,
|
processing: false,
|
||||||
serverSide: true,
|
serverSide: true,
|
||||||
ajax: {
|
ajax: {
|
||||||
url: "{{ route('sk.klaim-ulang.data') }}",
|
url: "{{ route('sk.klaim-ulang.data') }}",
|
||||||
@@ -257,21 +264,26 @@
|
|||||||
.attr('data-bs-placement', 'top')
|
.attr('data-bs-placement', 'top')
|
||||||
.attr('title', 'Klik untuk detail');
|
.attr('title', 'Klik untuk detail');
|
||||||
},
|
},
|
||||||
|
@endcan
|
||||||
drawCallback: function() {
|
drawCallback: function() {
|
||||||
|
@can('Verifikasi SK Klaim Ulang')
|
||||||
document.querySelectorAll('body > .tooltip').forEach(function(el) { el.remove(); });
|
document.querySelectorAll('body > .tooltip').forEach(function(el) { el.remove(); });
|
||||||
document.querySelectorAll('#table-sudah-diklaim tbody [data-bs-toggle="tooltip"]').forEach(function(el) {
|
document.querySelectorAll('#table-sudah-diklaim tbody [data-bs-toggle="tooltip"]').forEach(function(el) {
|
||||||
var existing = bootstrap.Tooltip.getInstance(el);
|
var existing = bootstrap.Tooltip.getInstance(el);
|
||||||
if (existing) { existing.dispose(); }
|
if (existing) { existing.dispose(); }
|
||||||
new bootstrap.Tooltip(el, { trigger: 'hover' });
|
new bootstrap.Tooltip(el, { trigger: 'hover' });
|
||||||
});
|
});
|
||||||
|
@endcan
|
||||||
|
initKolomSk('#table-sudah-diklaim');
|
||||||
},
|
},
|
||||||
@endcan
|
|
||||||
language: {
|
language: {
|
||||||
processing: "<div class='spinner'></div> Sedang Memuat...",
|
processing: "<div class='spinner'></div> Sedang Memuat...",
|
||||||
},
|
},
|
||||||
order: [[2, 'asc']]
|
order: [[2, 'asc']]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@include('verifikasi.sk._kolom_sk_js')
|
||||||
|
|
||||||
// Event listener untuk filter unit kerja (Select2)
|
// Event listener untuk filter unit kerja (Select2)
|
||||||
$('#unit_kerja_filter').on('select2:select select2:clear', function() {
|
$('#unit_kerja_filter').on('select2:select select2:clear', function() {
|
||||||
tableBelumDiklaim.ajax.reload();
|
tableBelumDiklaim.ajax.reload();
|
||||||
@@ -297,7 +309,7 @@
|
|||||||
showWarning('Peringatan!', 'Pilih Unit Kerja terlebih dahulu sebelum membuka detail SK.');
|
showWarning('Peringatan!', 'Pilih Unit Kerja terlebih dahulu sebelum membuka detail SK.');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (unitId) { url += '?unit_id=' + unitId; }
|
if (unitId) { url += (url.indexOf('?') === -1 ? '?' : '&') + 'unit_id=' + unitId; }
|
||||||
var tooltipInstance = bootstrap.Tooltip.getInstance(this);
|
var tooltipInstance = bootstrap.Tooltip.getInstance(this);
|
||||||
if (tooltipInstance) { tooltipInstance.dispose(); }
|
if (tooltipInstance) { tooltipInstance.dispose(); }
|
||||||
$('body').css('cursor', 'wait');
|
$('body').css('cursor', 'wait');
|
||||||
|
|||||||
@@ -30,6 +30,8 @@
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@include('verifikasi.sk._kolom_sk_css')
|
||||||
|
|
||||||
#perlu-perbaikan tbody .btn-primary {
|
#perlu-perbaikan tbody .btn-primary {
|
||||||
transition: transform 0.1s ease, box-shadow 0.1s ease;
|
transition: transform 0.1s ease, box-shadow 0.1s ease;
|
||||||
}
|
}
|
||||||
@@ -94,8 +96,9 @@
|
|||||||
$('.li-sk').addClass('show');
|
$('.li-sk').addClass('show');
|
||||||
$('.li-sk-perlu-perbaikan').addClass('active badge-primary-lighten');
|
$('.li-sk-perlu-perbaikan').addClass('active badge-primary-lighten');
|
||||||
|
|
||||||
|
pasangSkeletonSk('#perlu-perbaikan');
|
||||||
var table = $('#perlu-perbaikan').DataTable({
|
var table = $('#perlu-perbaikan').DataTable({
|
||||||
processing: true,
|
processing: false,
|
||||||
serverSide: true,
|
serverSide: true,
|
||||||
ajax: {
|
ajax: {
|
||||||
url: "{{ route('sk.perlu-perbaikan.data') }}",
|
url: "{{ route('sk.perlu-perbaikan.data') }}",
|
||||||
@@ -114,7 +117,7 @@
|
|||||||
{
|
{
|
||||||
data: 'no_sk',
|
data: 'no_sk',
|
||||||
name: 'no_sk',
|
name: 'no_sk',
|
||||||
className: 'text-center'
|
className: 'text-start'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
data: 'tentang',
|
data: 'tentang',
|
||||||
@@ -149,6 +152,7 @@
|
|||||||
if (existing) { existing.dispose(); }
|
if (existing) { existing.dispose(); }
|
||||||
new bootstrap.Tooltip(el, { trigger: 'hover', container: 'body' });
|
new bootstrap.Tooltip(el, { trigger: 'hover', container: 'body' });
|
||||||
});
|
});
|
||||||
|
initKolomSk('#perlu-perbaikan');
|
||||||
},
|
},
|
||||||
order: [[2, 'asc']],
|
order: [[2, 'asc']],
|
||||||
language: {
|
language: {
|
||||||
@@ -158,6 +162,8 @@
|
|||||||
|
|
||||||
@include('verifikasi.sk._filter_unit_kerja_js')
|
@include('verifikasi.sk._filter_unit_kerja_js')
|
||||||
|
|
||||||
|
@include('verifikasi.sk._kolom_sk_js')
|
||||||
|
|
||||||
$('#perlu-perbaikan').on('click', 'tbody tr', function(e) {
|
$('#perlu-perbaikan').on('click', 'tbody tr', function(e) {
|
||||||
if ($(e.target).closest('a, button').length) { return; }
|
if ($(e.target).closest('a, button').length) { return; }
|
||||||
var url = $(this).data('url');
|
var url = $(this).data('url');
|
||||||
|
|||||||
@@ -30,6 +30,8 @@
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@include('verifikasi.sk._kolom_sk_css')
|
||||||
|
|
||||||
#sudah-diperbaiki tbody .btn-primary {
|
#sudah-diperbaiki tbody .btn-primary {
|
||||||
transition: transform 0.1s ease, box-shadow 0.1s ease;
|
transition: transform 0.1s ease, box-shadow 0.1s ease;
|
||||||
}
|
}
|
||||||
@@ -94,8 +96,9 @@
|
|||||||
$('.li-sk').addClass('show');
|
$('.li-sk').addClass('show');
|
||||||
$('.li-sk-sudah-diperbaiki').addClass('active badge-primary-lighten');
|
$('.li-sk-sudah-diperbaiki').addClass('active badge-primary-lighten');
|
||||||
|
|
||||||
|
pasangSkeletonSk('#sudah-diperbaiki');
|
||||||
var table = $('#sudah-diperbaiki').DataTable({
|
var table = $('#sudah-diperbaiki').DataTable({
|
||||||
processing: true,
|
processing: false,
|
||||||
serverSide: true,
|
serverSide: true,
|
||||||
ajax: {
|
ajax: {
|
||||||
url: "{{ route('sk.sudah-diperbaiki.data') }}",
|
url: "{{ route('sk.sudah-diperbaiki.data') }}",
|
||||||
@@ -114,7 +117,7 @@
|
|||||||
{
|
{
|
||||||
data: 'no_sk',
|
data: 'no_sk',
|
||||||
name: 'no_sk',
|
name: 'no_sk',
|
||||||
className: 'text-center'
|
className: 'text-start'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
data: 'tentang',
|
data: 'tentang',
|
||||||
@@ -149,6 +152,7 @@
|
|||||||
if (existing) { existing.dispose(); }
|
if (existing) { existing.dispose(); }
|
||||||
new bootstrap.Tooltip(el, { trigger: 'hover', container: 'body' });
|
new bootstrap.Tooltip(el, { trigger: 'hover', container: 'body' });
|
||||||
});
|
});
|
||||||
|
initKolomSk('#sudah-diperbaiki');
|
||||||
},
|
},
|
||||||
order: [[2, 'asc']],
|
order: [[2, 'asc']],
|
||||||
language: {
|
language: {
|
||||||
@@ -158,6 +162,8 @@
|
|||||||
|
|
||||||
@include('verifikasi.sk._filter_unit_kerja_js')
|
@include('verifikasi.sk._filter_unit_kerja_js')
|
||||||
|
|
||||||
|
@include('verifikasi.sk._kolom_sk_js')
|
||||||
|
|
||||||
$('#sudah-diperbaiki').on('click', 'tbody tr', function(e) {
|
$('#sudah-diperbaiki').on('click', 'tbody tr', function(e) {
|
||||||
if ($(e.target).closest('a, button').length) { return; }
|
if ($(e.target).closest('a, button').length) { return; }
|
||||||
var url = $(this).data('url');
|
var url = $(this).data('url');
|
||||||
|
|||||||
@@ -15,6 +15,61 @@
|
|||||||
#atasan-table tbody tr:hover td {
|
#atasan-table tbody tr:hover td {
|
||||||
background-color: #e3f2fd;
|
background-color: #e3f2fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Lebar kolom dikunci (sama seperti tabel anggota di detail SK) */
|
||||||
|
#atasan-table {
|
||||||
|
table-layout: fixed;
|
||||||
|
}
|
||||||
|
#atasan-table th:nth-child(1) { width: 36% !important; }
|
||||||
|
#atasan-table th:nth-child(2) { width: 28% !important; }
|
||||||
|
#atasan-table th:nth-child(3) { width: 36% !important; }
|
||||||
|
|
||||||
|
#atasan-table tbody td {
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Tabel bawahan di modal: gaya & lebar kolom mengikuti tabel anggota di detail SK */
|
||||||
|
#modalBawahanTable tbody tr > * {
|
||||||
|
transition: background-color 0.25s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
#modalBawahanTable td,
|
||||||
|
#modalBawahanTable th {
|
||||||
|
border-color: #ced4da !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#modalBawahanTable {
|
||||||
|
table-layout: fixed;
|
||||||
|
}
|
||||||
|
|
||||||
|
#modalBawahanTable th:nth-child(1) { width: 30% !important; }
|
||||||
|
#modalBawahanTable th:nth-child(2) { width: 27% !important; }
|
||||||
|
#modalBawahanTable th:nth-child(3) { width: 33% !important; }
|
||||||
|
#modalBawahanTable th:nth-child(4) { width: 10% !important; }
|
||||||
|
|
||||||
|
#modalBawahanTable tbody td.nama-col .text-truncate {
|
||||||
|
max-width: 240px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#modalBawahanTable tbody td.nama-col > div {
|
||||||
|
line-height: 1.3;
|
||||||
|
}
|
||||||
|
|
||||||
|
#modalBawahanTable tbody td {
|
||||||
|
padding-top: 0.5rem;
|
||||||
|
padding-bottom: 0.5rem;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
#modalBawahanTable thead th {
|
||||||
|
background: #2563eb !important; background-color: #2563eb !important;
|
||||||
|
color: #fff !important;
|
||||||
|
border-color: #2563eb !important;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
#atasan-table tbody td.nama-col > div {
|
||||||
|
line-height: 1.3;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@@ -33,23 +88,15 @@
|
|||||||
])
|
])
|
||||||
|
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table id="atasan-table" class="table table-striped table-bordered w-100">
|
<table id="atasan-table" class="table table-bordered w-100">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th width="60">No</th>
|
<th>Pegawai</th>
|
||||||
<th>Nama</th>
|
<th class="d-none">NIP</th>
|
||||||
<th>NIP</th>
|
<th>Unit Kerja</th>
|
||||||
|
<th>Jabatan</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
|
||||||
@foreach ($allPegawais as $index => $peg)
|
|
||||||
<tr class="atasan-row" data-nip="{{ $peg->nip }}" data-nama="{{ $peg->nama }}">
|
|
||||||
<td class="text-center">{{ $index + 1 }}</td>
|
|
||||||
<td>{{ $peg->nama }}</td>
|
|
||||||
<td class="text-center">{{ $peg->nip }}</td>
|
|
||||||
</tr>
|
|
||||||
@endforeach
|
|
||||||
</tbody>
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -119,7 +166,7 @@
|
|||||||
@if (isset($isAdmin) && $isAdmin)
|
@if (isset($isAdmin) && $isAdmin)
|
||||||
<!-- Modal Detail & Kelola Bawahan -->
|
<!-- Modal Detail & Kelola Bawahan -->
|
||||||
<div class="modal fade" id="modalBawahan" tabindex="-1" aria-hidden="true" data-bs-backdrop="static">
|
<div class="modal fade" id="modalBawahan" tabindex="-1" aria-hidden="true" data-bs-backdrop="static">
|
||||||
<div class="modal-dialog modal-lg modal-dialog-scrollable">
|
<div class="modal-dialog modal-xl modal-dialog-scrollable">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h5 class="modal-title mb-0">Daftar Bawahan - <span id="modalAtasanNama"></span></h5>
|
<h5 class="modal-title mb-0">Daftar Bawahan - <span id="modalAtasanNama"></span></h5>
|
||||||
@@ -139,13 +186,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table id="modalBawahanTable" class="table table-sm table-striped table-bordered w-100 mb-0">
|
<table id="modalBawahanTable" class="table table-bordered w-100 mb-0">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th width="40">No</th>
|
<th>Pegawai</th>
|
||||||
<th>NIP</th>
|
<th class="d-none">NIP</th>
|
||||||
<th>Nama</th>
|
<th>Unit Kerja</th>
|
||||||
<th width="90">Aksi</th>
|
<th>Jabatan</th>
|
||||||
|
<th class="text-center">Aksi</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="modalBawahanBody">
|
<tbody id="modalBawahanBody">
|
||||||
@@ -197,8 +245,9 @@
|
|||||||
let removedBawahan = [];
|
let removedBawahan = [];
|
||||||
|
|
||||||
// Initialize DataTable - client-side pagination with server data
|
// Initialize DataTable - client-side pagination with server data
|
||||||
|
pasangSkeletonSk('table#bawahans', 5, ['pendek', 'pendek', 'dua', 'tombol']);
|
||||||
let bawahanTable = $('table#bawahans').DataTable({
|
let bawahanTable = $('table#bawahans').DataTable({
|
||||||
processing: true,
|
processing: false,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
ajax: {
|
ajax: {
|
||||||
url: "{{ route('tri-dharma.bawahan.data') }}",
|
url: "{{ route('tri-dharma.bawahan.data') }}",
|
||||||
@@ -463,37 +512,101 @@
|
|||||||
const modalEl = document.getElementById('modalBawahan');
|
const modalEl = document.getElementById('modalBawahan');
|
||||||
const modalBawahan = new bootstrap.Modal(modalEl);
|
const modalBawahan = new bootstrap.Modal(modalEl);
|
||||||
|
|
||||||
// Nomor urut ulang setelah search/sort/paging
|
function renderJenisPegawaiTag(jenis) {
|
||||||
function renumber(table) {
|
const config = {
|
||||||
const start = table.page.info().start;
|
'dosen': { color: 'var(--ct-primary)', rgb: 'var(--ct-primary-rgb)', icon: 'uil-user-graduate' },
|
||||||
table.column(0, {
|
'tendik': { color: '#fd7e14', rgb: '253, 126, 20', icon: 'uil-briefcase-alt' }
|
||||||
search: 'applied',
|
};
|
||||||
order: 'applied',
|
const normalizedJenis = (jenis || '').toString().toLowerCase();
|
||||||
page: 'current'
|
const c = config[normalizedJenis];
|
||||||
}).nodes().each(function(cell, i) {
|
if (!c) {
|
||||||
cell.innerHTML = start + i + 1;
|
return '';
|
||||||
});
|
}
|
||||||
|
return '<small class="d-inline-block fw-bold" style="padding: 1px 18px 1px 6px; color: ' +
|
||||||
|
c.color + '; background: linear-gradient(to right, rgba(' + c.rgb + ', 0.25), rgba(' + c.rgb +
|
||||||
|
', 0)); clip-path: polygon(0 0, 100% 0, calc(100% - 20px) 100%, 0 100%);"><i class="' + c.icon +
|
||||||
|
'"></i> ' + normalizedJenis.toUpperCase() + '</small>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Daftar atasan
|
function escapeHtml(value) {
|
||||||
|
return $('<div>').text(value || '').html().replace(/"/g, '"');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Kolom Pegawai, NIP (tersembunyi), Unit Kerja, Jabatan - dipakai tabel atasan & tabel bawahan di modal
|
||||||
|
function kolomPegawaiSidia() {
|
||||||
|
return [{
|
||||||
|
data: 'nama',
|
||||||
|
name: 'nama',
|
||||||
|
className: 'nama-col',
|
||||||
|
render: function(data, type, row) {
|
||||||
|
if (type !== 'display') { return data; }
|
||||||
|
const tag = renderJenisPegawaiTag(row.jenis_pegawai);
|
||||||
|
return '<div>' +
|
||||||
|
'<div class="fw-semibold text-truncate" title="' + escapeHtml(data) + '">' + (data ? escapeHtml(data) : '-') + '</div>' +
|
||||||
|
'<div class="text-muted small font-monospace">' + (row.nip ? escapeHtml(row.nip) : '-') + '</div>' +
|
||||||
|
(tag ? '<div class="mt-1">' + tag + '</div>' : '') +
|
||||||
|
'</div>';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// Disembunyikan, tetap dipakai untuk pencarian NIP
|
||||||
|
data: 'nip',
|
||||||
|
name: 'nip',
|
||||||
|
orderable: false,
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
data: 'unit_kerja',
|
||||||
|
name: 'unit_kerja',
|
||||||
|
orderable: false,
|
||||||
|
searchable: false,
|
||||||
|
render: function(data, type) {
|
||||||
|
if (type !== 'display') { return data; }
|
||||||
|
return '<div class="fw-semibold text-truncate" title="' + escapeHtml(data) + '">' + (data ? escapeHtml(data) : '-') + '</div>';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
data: 'jabatan_fungsional',
|
||||||
|
name: 'jabatan_fungsional',
|
||||||
|
orderable: false,
|
||||||
|
searchable: false,
|
||||||
|
render: function(data, type, row) {
|
||||||
|
if (type !== 'display') { return data; }
|
||||||
|
const baris = function(label, nilai, extraClass) {
|
||||||
|
return '<div class="text-muted small ' + extraClass + '">' + label + '</div>' +
|
||||||
|
'<div class="fw-semibold text-truncate" title="' + escapeHtml(nilai) + '">' + (nilai ? escapeHtml(nilai) : '-') + '</div>';
|
||||||
|
};
|
||||||
|
return baris('Fungsional', row.jabatan_fungsional, '') +
|
||||||
|
baris('Tambahan', row.jabatan_tambahan, 'mt-1');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Daftar atasan (server-side, skeleton selama dimuat)
|
||||||
|
pasangSkeletonSk('#atasan-table', 5, ['tiga', 'dua', 'tiga']);
|
||||||
const atasanTable = $('#atasan-table').DataTable({
|
const atasanTable = $('#atasan-table').DataTable({
|
||||||
|
autoWidth: false,
|
||||||
|
processing: false,
|
||||||
|
serverSide: true,
|
||||||
|
ajax: "{{ route('tri-dharma.bawahan.data-atasan') }}",
|
||||||
|
columns: kolomPegawaiSidia(),
|
||||||
order: [
|
order: [
|
||||||
[1, 'asc']
|
[0, 'asc']
|
||||||
],
|
],
|
||||||
columnDefs: [{
|
createdRow: function(row, data) {
|
||||||
targets: 0,
|
$(row).addClass('atasan-row')
|
||||||
orderable: false,
|
.attr('data-nip', data.nip)
|
||||||
searchable: false
|
.attr('data-nama', data.nama);
|
||||||
}],
|
},
|
||||||
language: {
|
language: {
|
||||||
emptyTable: 'Tidak ada data atasan'
|
emptyTable: 'Tidak ada data atasan',
|
||||||
|
processing: "<div class='spinner'></div> Sedang Memuat..."
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
atasanTable.on('draw.dt', function() {
|
|
||||||
renumber(atasanTable);
|
|
||||||
}).draw(false);
|
|
||||||
|
|
||||||
// Tabel bawahan di modal (dibangun ulang setiap data berubah)
|
// Tabel bawahan di modal (Yajra server-side). Daftar NIP - termasuk perubahan yang belum
|
||||||
|
// disimpan - dikirim ke server setiap tabel digambar.
|
||||||
let modalDataTable = null;
|
let modalDataTable = null;
|
||||||
|
|
||||||
function destroyModalTable() {
|
function destroyModalTable() {
|
||||||
@@ -504,40 +617,54 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function renderModalTable() {
|
function renderModalTable() {
|
||||||
const page = modalDataTable ? modalDataTable.page() : 0;
|
// Tabel sudah ada: cukup muat ulang (halaman saat ini dipertahankan)
|
||||||
destroyModalTable();
|
if (modalDataTable) {
|
||||||
|
modalDataTable.ajax.reload(function(json) {
|
||||||
|
if (json.data.length === 0 && modalDataTable.page() > 0) {
|
||||||
|
modalDataTable.page('previous').draw('page');
|
||||||
|
}
|
||||||
|
}, false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const $body = $('#modalBawahanBody').empty();
|
// Skeleton selama data dimuat (dipasang sekali saja)
|
||||||
|
if (!$('#modalBawahanTable').data('skeleton-terpasang')) {
|
||||||
currentBawahan.forEach(function(b, idx) {
|
$('#modalBawahanTable').data('skeleton-terpasang', true);
|
||||||
$body.append(
|
pasangSkeletonSk('#modalBawahanTable', 5, ['tiga', 'dua', 'dua', 'tombol']);
|
||||||
'<tr>' +
|
}
|
||||||
'<td class="text-center">' + (idx + 1) + '</td>' +
|
|
||||||
'<td>' + b.nip + '</td>' +
|
|
||||||
'<td>' + b.nama + '</td>' +
|
|
||||||
'<td class="text-center"><button type="button" class="btn btn-sm btn-danger btn-hapus-modal" data-nip="' + b.nip + '" data-nama="' + b.nama + '"><i class="uil-trash-alt"></i></button></td>' +
|
|
||||||
'</tr>'
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
modalDataTable = $('#modalBawahanTable').DataTable({
|
modalDataTable = $('#modalBawahanTable').DataTable({
|
||||||
autoWidth: false,
|
autoWidth: false,
|
||||||
order: [
|
processing: false,
|
||||||
[2, 'asc']
|
serverSide: true,
|
||||||
],
|
ajax: {
|
||||||
columnDefs: [{
|
url: "{{ route('tri-dharma.bawahan.data-bawahan-atasan') }}",
|
||||||
targets: [0, 3],
|
type: 'POST',
|
||||||
|
headers: {
|
||||||
|
'X-CSRF-TOKEN': '{{ csrf_token() }}'
|
||||||
|
},
|
||||||
|
data: function(d) {
|
||||||
|
d.nips = currentBawahan.map(b => b.nip);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
columns: kolomPegawaiSidia().concat([{
|
||||||
|
data: 'nip',
|
||||||
|
name: 'aksi',
|
||||||
orderable: false,
|
orderable: false,
|
||||||
searchable: false
|
searchable: false,
|
||||||
}],
|
className: 'text-center',
|
||||||
|
render: function(data, type, row) {
|
||||||
|
if (type !== 'display') { return data; }
|
||||||
|
return '<button type="button" class="btn btn-sm btn-danger btn-hapus-modal" data-nip="' + escapeHtml(row.nip) + '" data-nama="' + escapeHtml(row.nama) + '"><i class="uil-trash-alt"></i></button>';
|
||||||
|
}
|
||||||
|
}]),
|
||||||
|
order: [
|
||||||
|
[0, 'asc']
|
||||||
|
],
|
||||||
language: {
|
language: {
|
||||||
emptyTable: 'Belum ada bawahan yang ditugaskan'
|
emptyTable: 'Belum ada bawahan yang ditugaskan'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
modalDataTable.on('draw.dt', function() {
|
|
||||||
renumber(modalDataTable);
|
|
||||||
});
|
|
||||||
modalDataTable.page(Math.min(page, Math.max(modalDataTable.page.info().pages - 1, 0))).draw('page');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderModalSelectOptions() {
|
function renderModalSelectOptions() {
|
||||||
@@ -561,11 +688,25 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Skeleton baris tabel bawahan di modal selama data dimuat
|
||||||
|
function skeletonModalRows(jumlah) {
|
||||||
|
let baris = '';
|
||||||
|
for (let i = 0; i < jumlah; i++) {
|
||||||
|
baris += '<tr class="skeleton-row">' +
|
||||||
|
'<td><div class="skel skel-line" style="width: 85%;"></div><div class="skel skel-line sm" style="width: 60%;"></div><div class="skel skel-line sm" style="width: 45%;"></div></td>' +
|
||||||
|
'<td><div class="skel skel-line" style="width: 80%;"></div><div class="skel skel-line" style="width: 55%;"></div></td>' +
|
||||||
|
'<td><div class="skel skel-line" style="width: 70%;"></div><div class="skel skel-line" style="width: 85%;"></div></td>' +
|
||||||
|
'<td><div class="skel skel-btn mx-auto" style="width: 36px; height: 30px;"></div></td>' +
|
||||||
|
'</tr>';
|
||||||
|
}
|
||||||
|
return baris;
|
||||||
|
}
|
||||||
|
|
||||||
function loadModalData(nip, nama) {
|
function loadModalData(nip, nama) {
|
||||||
currentNipAtasan = nip;
|
currentNipAtasan = nip;
|
||||||
$('#modalAtasanNama').text(nama);
|
$('#modalAtasanNama').text(nama);
|
||||||
destroyModalTable();
|
destroyModalTable();
|
||||||
$('#modalBawahanBody').html('<tr><td colspan="4" class="text-center text-muted py-3">Memuat data...</td></tr>');
|
$('#modalBawahanBody').html(skeletonModalRows(5));
|
||||||
currentBawahan = [];
|
currentBawahan = [];
|
||||||
availablePegawais = [];
|
availablePegawais = [];
|
||||||
|
|
||||||
|
|||||||
@@ -747,8 +747,10 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Skeleton selama data dimuat (checkbox, kode, nama, prodi, fakultas, SKS, pertemuan, poin)
|
||||||
|
pasangSkeletonSk('#mataKuliahTable', 5, ['kotak', 'pendek', 'dua', 'dua', 'dua', 'pendek', 'pendek', 'pendek']);
|
||||||
table = $('#mataKuliahTable').DataTable({
|
table = $('#mataKuliahTable').DataTable({
|
||||||
processing: true,
|
processing: false,
|
||||||
serverSide: true,
|
serverSide: true,
|
||||||
ajax: {
|
ajax: {
|
||||||
url: "{{ route('tri-dharma.mata-kuliah.data-detail', ['nip' => $nip]) }}",
|
url: "{{ route('tri-dharma.mata-kuliah.data-detail', ['nip' => $nip]) }}",
|
||||||
|
|||||||
@@ -9,6 +9,10 @@
|
|||||||
|
|
||||||
@section('css')
|
@section('css')
|
||||||
<style>
|
<style>
|
||||||
|
#mataKuliahTable tbody td.nama-col > div {
|
||||||
|
line-height: 1.3;
|
||||||
|
}
|
||||||
|
|
||||||
/* Prevent horizontal scroll on modals */
|
/* Prevent horizontal scroll on modals */
|
||||||
.modal-body {
|
.modal-body {
|
||||||
overflow-x: hidden !important;
|
overflow-x: hidden !important;
|
||||||
@@ -133,7 +137,7 @@
|
|||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<label for="filter_unit_kerja" class="form-label">Unit Kerja</label>
|
<label for="filter_unit_kerja" class="form-label">Unit Kerja</label>
|
||||||
<select class="form-control select2" id="filter_unit_kerja" name="filter_unit_kerja"
|
<select class="form-control select2" id="filter_unit_kerja" name="filter_unit_kerja"
|
||||||
data-placeholder="-- Semua Unit Kerja --">
|
data-placeholder="Pilih Unit Kerja">
|
||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
@@ -144,8 +148,8 @@
|
|||||||
<table class="table table-bordered w-100 dt-styled" id="mataKuliahTable">
|
<table class="table table-bordered w-100 dt-styled" id="mataKuliahTable">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>NIP</th>
|
<th>Dosen</th>
|
||||||
<th>Nama Dosen</th>
|
<th class="d-none">NIP</th>
|
||||||
<th>Unit Kerja</th>
|
<th>Unit Kerja</th>
|
||||||
<th>Jumlah Mata Kuliah</th>
|
<th>Jumlah Mata Kuliah</th>
|
||||||
<th>Total Poin Remunerasi</th>
|
<th>Total Poin Remunerasi</th>
|
||||||
@@ -327,6 +331,22 @@
|
|||||||
$('.li-tri-dharma').addClass('show');
|
$('.li-tri-dharma').addClass('show');
|
||||||
$('.li-tri-dharma-mata-kuliah').addClass('active badge-primary-lighten');
|
$('.li-tri-dharma-mata-kuliah').addClass('active badge-primary-lighten');
|
||||||
|
|
||||||
|
function renderJenisPegawaiTag(jenis) {
|
||||||
|
var config = {
|
||||||
|
'dosen': { color: 'var(--ct-primary)', rgb: 'var(--ct-primary-rgb)', icon: 'uil-user-graduate' },
|
||||||
|
'tendik': { color: '#fd7e14', rgb: '253, 126, 20', icon: 'uil-briefcase-alt' }
|
||||||
|
};
|
||||||
|
var normalizedJenis = (jenis || '').toString().toLowerCase();
|
||||||
|
var c = config[normalizedJenis];
|
||||||
|
if (!c) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
return '<small class="d-inline-block fw-bold" style="padding: 1px 18px 1px 6px; color: ' +
|
||||||
|
c.color + '; background: linear-gradient(to right, rgba(' + c.rgb + ', 0.25), rgba(' + c.rgb +
|
||||||
|
', 0)); clip-path: polygon(0 0, 100% 0, calc(100% - 20px) 100%, 0 100%);"><i class="' + c.icon +
|
||||||
|
'"></i> ' + normalizedJenis.toUpperCase() + '</small>';
|
||||||
|
}
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
const teamUnitKerjaId = {{ $teamUnitKerjaId ?? 'null' }};
|
const teamUnitKerjaId = {{ $teamUnitKerjaId ?? 'null' }};
|
||||||
|
|
||||||
@@ -348,8 +368,10 @@
|
|||||||
@endif
|
@endif
|
||||||
|
|
||||||
// Initialize DataTable
|
// Initialize DataTable
|
||||||
|
// Skeleton selama data dimuat (kolom terlihat: Dosen, Unit Kerja, Jumlah, Total Poin)
|
||||||
|
pasangSkeletonSk('#mataKuliahTable', 5, ['tiga', 'dua', 'pendek', 'pendek']);
|
||||||
table = $('#mataKuliahTable').DataTable({
|
table = $('#mataKuliahTable').DataTable({
|
||||||
processing: true,
|
processing: false,
|
||||||
serverSide: true,
|
serverSide: true,
|
||||||
ajax: {
|
ajax: {
|
||||||
url: "{{ route('tri-dharma.mata-kuliah.data') }}",
|
url: "{{ route('tri-dharma.mata-kuliah.data') }}",
|
||||||
@@ -364,32 +386,44 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
columns: [
|
columns: [
|
||||||
{
|
|
||||||
data: 'nip',
|
|
||||||
name: 'nip',
|
|
||||||
width: '15%'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
data: 'nama_dosen',
|
data: 'nama_dosen',
|
||||||
name: 'nama_dosen',
|
name: 'nama_dosen',
|
||||||
width: '28%'
|
className: 'nama-col',
|
||||||
|
width: '33%',
|
||||||
|
render: function(data, type, row) {
|
||||||
|
if (type !== 'display') { return data; }
|
||||||
|
var escape = function(v) { return $('<div>').text(v || '').html(); };
|
||||||
|
return '<div>' +
|
||||||
|
'<div class="fw-semibold">' + (data ? escape(data) : '-') + '</div>' +
|
||||||
|
'<div class="text-muted small font-monospace">' + (row.nip ? escape(row.nip) : '-') + '</div>' +
|
||||||
|
'<div class="mt-1">' + renderJenisPegawaiTag('dosen') + '</div>' +
|
||||||
|
'</div>';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// Disembunyikan, tetap dipakai untuk pencarian NIP
|
||||||
|
data: 'nip',
|
||||||
|
name: 'nip',
|
||||||
|
orderable: false,
|
||||||
|
visible: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
data: 'unit_kerja',
|
data: 'unit_kerja',
|
||||||
name: 'unit_kerja',
|
name: 'unit_kerja',
|
||||||
width: '28%'
|
width: '30%'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
data: 'jumlah_matkul',
|
data: 'jumlah_matkul',
|
||||||
name: 'jumlah_matkul',
|
name: 'jumlah_matkul',
|
||||||
className: 'text-center',
|
className: 'text-center',
|
||||||
width: '15%'
|
width: '18%'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
data: 'total_poin_remunerasi',
|
data: 'total_poin_remunerasi',
|
||||||
name: 'total_poin_remunerasi',
|
name: 'total_poin_remunerasi',
|
||||||
className: 'text-center',
|
className: 'text-center',
|
||||||
width: '14%'
|
width: '19%'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
createdRow: function(row, data) {
|
createdRow: function(row, data) {
|
||||||
|
|||||||
@@ -145,7 +145,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="min-w-0">
|
<div class="min-w-0">
|
||||||
<div class="text-xs font-semibold uppercase tracking-wide text-slate-500">{{ $stat['label'] }}</div>
|
<div class="text-xs font-semibold uppercase tracking-wide text-slate-500">{{ $stat['label'] }}</div>
|
||||||
<div class="nominal-cell mt-0.5 text-[1.75rem] font-bold leading-none tabular-nums text-slate-900" id="{{ $stat['id'] }}">...</div>
|
<div class="mt-0.5 text-[1.75rem] font-bold leading-none tabular-nums text-slate-900" id="{{ $stat['id'] }}"><span class="skel d-inline-block align-middle" style="width: 96px; height: 28px;"></span></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
@@ -820,17 +820,25 @@
|
|||||||
$('#poin-menunggu-verifikasi').text(formatPoin(json.poin_menunggu_verifikasi));
|
$('#poin-menunggu-verifikasi').text(formatPoin(json.poin_menunggu_verifikasi));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Pasang skeleton tabel sekali per tabel (DataTable di-destroy & dibuat ulang tiap ganti tab)
|
||||||
|
function pasangSkeletonSekali(selector, pola) {
|
||||||
|
var $tabel = $(selector);
|
||||||
|
if ($tabel.data('skeleton-terpasang')) { return; }
|
||||||
|
$tabel.data('skeleton-terpasang', true);
|
||||||
|
pasangSkeletonSk(selector, 5, pola);
|
||||||
|
}
|
||||||
|
|
||||||
function initDataTable(category) {
|
function initDataTable(category) {
|
||||||
showLoading();
|
showLoading();
|
||||||
|
|
||||||
if (dataTable) {
|
if (dataTable) {
|
||||||
dataTable.destroy();
|
dataTable.destroy();
|
||||||
$('#total-poin-pengajuan').text('...');
|
|
||||||
$('#poin-diterima').text('...');
|
|
||||||
$('#poin-ditolak').text('...');
|
|
||||||
$('#poin-menunggu-verifikasi').text('...');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Skeleton kartu poin selama data dimuat
|
||||||
|
$('#total-poin-pengajuan, #poin-diterima, #poin-ditolak, #poin-menunggu-verifikasi')
|
||||||
|
.html('<span class="skel d-inline-block align-middle" style="width: 96px; height: 28px;"></span>');
|
||||||
|
|
||||||
if (category === 'buku-ajar') {
|
if (category === 'buku-ajar') {
|
||||||
var canVerifyBukuAjar = $('#can_verify_buku_ajar').val() === '1';
|
var canVerifyBukuAjar = $('#can_verify_buku_ajar').val() === '1';
|
||||||
var bukuAjarColumns = [];
|
var bukuAjarColumns = [];
|
||||||
@@ -845,8 +853,11 @@
|
|||||||
{ data: 'poin_akhir', name: 'poin_akhir', searchable: false, orderable: true, className: 'text-center' },
|
{ data: 'poin_akhir', name: 'poin_akhir', searchable: false, orderable: true, className: 'text-center' },
|
||||||
{ data: 'status_badge', name: 'status_badge', searchable: false, orderable: false, className: 'text-center' },
|
{ data: 'status_badge', name: 'status_badge', searchable: false, orderable: false, className: 'text-center' },
|
||||||
]);
|
]);
|
||||||
|
var polaBukuAjar = ['dua', 'dua', 'pendek', 'pendek', 'pendek', 'pil'];
|
||||||
|
if (canVerifyBukuAjar) { polaBukuAjar.unshift('kotak'); }
|
||||||
|
pasangSkeletonSekali('#buku-ajar-content', polaBukuAjar);
|
||||||
dataTable = $('#buku-ajar-content').DataTable({
|
dataTable = $('#buku-ajar-content').DataTable({
|
||||||
processing: true,
|
processing: false,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
ajax: {
|
ajax: {
|
||||||
url: "{{ route('tri-dharma.pengajuan.data-buku-ajar', ':id') }}".replace(':id', nip),
|
url: "{{ route('tri-dharma.pengajuan.data-buku-ajar', ':id') }}".replace(':id', nip),
|
||||||
@@ -878,8 +889,9 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pasangSkeletonSekali(`#${category}-content`, ['kotak', 'dua', 'dua', 'pendek', 'pendek', 'pendek', 'pil']);
|
||||||
dataTable = $(`#${category}-content`).DataTable({
|
dataTable = $(`#${category}-content`).DataTable({
|
||||||
processing: true,
|
processing: false,
|
||||||
serverSide: true,
|
serverSide: true,
|
||||||
ajax: {
|
ajax: {
|
||||||
url: "{{ route('tri-dharma.pengajuan.data-detail', ':id') }}".replace(':id', nip),
|
url: "{{ route('tri-dharma.pengajuan.data-detail', ':id') }}".replace(':id', nip),
|
||||||
|
|||||||
@@ -26,6 +26,20 @@
|
|||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Lebar kolom dikunci (sama seperti tabel anggota di detail SK) */
|
||||||
|
#pegawai-table {
|
||||||
|
table-layout: fixed;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pegawai-table th:nth-child(1) { width: 32% !important; }
|
||||||
|
#pegawai-table th:nth-child(2) { width: 30% !important; }
|
||||||
|
#pegawai-table th:nth-child(3) { width: 14% !important; }
|
||||||
|
#pegawai-table th:nth-child(4) { width: 24% !important; }
|
||||||
|
|
||||||
|
#pegawai-table tbody td.nama-col .text-truncate {
|
||||||
|
max-width: 240px;
|
||||||
|
}
|
||||||
|
|
||||||
#pegawai-table tbody td.nama-col > div {
|
#pegawai-table tbody td.nama-col > div {
|
||||||
line-height: 1.3;
|
line-height: 1.3;
|
||||||
}
|
}
|
||||||
@@ -98,6 +112,7 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Pegawai</th>
|
<th>Pegawai</th>
|
||||||
|
<th>Jabatan</th>
|
||||||
<th class="d-none">NIP</th>
|
<th class="d-none">NIP</th>
|
||||||
<th>Status Aktif</th>
|
<th>Status Aktif</th>
|
||||||
<th>Status Pengajuan</th>
|
<th>Status Pengajuan</th>
|
||||||
@@ -137,8 +152,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
// Skeleton selama data dimuat (kolom terlihat: Pegawai, Jabatan, Status Aktif, Status Pengajuan)
|
||||||
|
pasangSkeletonSk('#pegawai-table', 5, ['tiga', 'dua', 'pil', 'pendek']);
|
||||||
var table = $('#pegawai-table').DataTable({
|
var table = $('#pegawai-table').DataTable({
|
||||||
processing: true,
|
autoWidth: false,
|
||||||
|
processing: false,
|
||||||
serverSide: true,
|
serverSide: true,
|
||||||
ajax: {
|
ajax: {
|
||||||
url: "{{ route('tri-dharma.pengajuan.data') }}",
|
url: "{{ route('tri-dharma.pengajuan.data') }}",
|
||||||
@@ -155,12 +173,30 @@
|
|||||||
render: function(data, type, row) {
|
render: function(data, type, row) {
|
||||||
if (type !== 'display') { return data; }
|
if (type !== 'display') { return data; }
|
||||||
return '<div>' +
|
return '<div>' +
|
||||||
'<div class="fw-semibold">' + (data || '-') + '</div>' +
|
'<div class="fw-semibold text-truncate" title="' + $('<div>').text(data || '').html().replace(/"/g, '"') + '">' + (data || '-') + '</div>' +
|
||||||
'<div class="text-muted small font-monospace">' + (row.nip || '-') + '</div>' +
|
'<div class="text-muted small font-monospace">' + (row.nip || '-') + '</div>' +
|
||||||
'<div class="mt-1">' + renderJenisPegawaiTag(row.jenis_pegawai) + '</div>' +
|
'<div class="mt-1">' + renderJenisPegawaiTag(row.jenis_pegawai) + '</div>' +
|
||||||
'</div>';
|
'</div>';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
data: 'jabatan_fungsional_nama',
|
||||||
|
name: 'jabatan_fungsional_nama',
|
||||||
|
orderable: false,
|
||||||
|
render: function(data, type, row) {
|
||||||
|
if (type !== 'display') { return data; }
|
||||||
|
var escape = function(v) { return $('<div>').text(v).html().replace(/"/g, '"'); };
|
||||||
|
var baris = function(label, nilai, extraClass) {
|
||||||
|
var teks = nilai ? escape(nilai) : '-';
|
||||||
|
return '<div class="text-muted small ' + extraClass + '">' + label + '</div>' +
|
||||||
|
'<div class="fw-semibold text-truncate" title="' + (nilai ? teks : '') + '">' + teks + '</div>';
|
||||||
|
};
|
||||||
|
return '<div>' +
|
||||||
|
baris('Fungsional', row.jabatan_fungsional_nama, '') +
|
||||||
|
baris('Tambahan', row.jabatan_dtt_nama, 'mt-1') +
|
||||||
|
'</div>';
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
data: 'nip',
|
data: 'nip',
|
||||||
name: 'nip',
|
name: 'nip',
|
||||||
@@ -295,34 +331,28 @@
|
|||||||
var url = $(this).attr('data-url');
|
var url = $(this).attr('data-url');
|
||||||
if (!url) { return; }
|
if (!url) { return; }
|
||||||
|
|
||||||
@if (Auth::user()->id == 1)
|
var $row = $(this);
|
||||||
$('body').css('cursor', 'wait');
|
$.ajax({
|
||||||
$(this).css('cursor', 'wait');
|
url: url,
|
||||||
window.location.href = url;
|
type: 'GET',
|
||||||
@else
|
headers: { 'X-Requested-With': 'XMLHttpRequest' },
|
||||||
var $row = $(this);
|
success: function(response) {
|
||||||
$.ajax({
|
if (response.success) {
|
||||||
url: url,
|
$('body').css('cursor', 'wait');
|
||||||
type: 'GET',
|
$row.css('cursor', 'wait');
|
||||||
headers: { 'X-Requested-With': 'XMLHttpRequest' },
|
window.location.href = url;
|
||||||
success: function(response) {
|
} else {
|
||||||
if (response.success) {
|
showInfo('Info', response.message || 'Periode verifikasi tidak aktif');
|
||||||
$('body').css('cursor', 'wait');
|
|
||||||
$row.css('cursor', 'wait');
|
|
||||||
window.location.href = url;
|
|
||||||
} else {
|
|
||||||
showWarning('Peringatan', response.message || 'Periode verifikasi tidak aktif');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
error: function(xhr) {
|
|
||||||
var message = 'Periode verifikasi tidak aktif';
|
|
||||||
if (xhr.responseJSON && xhr.responseJSON.message) {
|
|
||||||
message = xhr.responseJSON.message;
|
|
||||||
}
|
|
||||||
showWarning('Peringatan', message);
|
|
||||||
}
|
}
|
||||||
});
|
},
|
||||||
@endif
|
error: function(xhr) {
|
||||||
|
var message = 'Periode verifikasi tidak aktif';
|
||||||
|
if (xhr.responseJSON && xhr.responseJSON.message) {
|
||||||
|
message = xhr.responseJSON.message;
|
||||||
|
}
|
||||||
|
showInfo('Info', message);
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$(window).on('pageshow', function() {
|
$(window).on('pageshow', function() {
|
||||||
|
|||||||
@@ -145,7 +145,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="min-w-0">
|
<div class="min-w-0">
|
||||||
<div class="text-xs font-semibold uppercase tracking-wide text-slate-500">{{ $stat['label'] }}</div>
|
<div class="text-xs font-semibold uppercase tracking-wide text-slate-500">{{ $stat['label'] }}</div>
|
||||||
<div class="nominal-cell mt-0.5 text-[1.75rem] font-bold leading-none tabular-nums text-slate-900" id="{{ $stat['id'] }}">...</div>
|
<div class="mt-0.5 text-[1.75rem] font-bold leading-none tabular-nums text-slate-900" id="{{ $stat['id'] }}"><span class="skel d-inline-block align-middle" style="width: 96px; height: 28px;"></span></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
@@ -866,17 +866,25 @@
|
|||||||
$('#poin-menunggu-verifikasi').text(formatPoin(json.poin_menunggu_verifikasi));
|
$('#poin-menunggu-verifikasi').text(formatPoin(json.poin_menunggu_verifikasi));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Pasang skeleton tabel sekali per tabel (DataTable di-destroy & dibuat ulang tiap ganti tab)
|
||||||
|
function pasangSkeletonSekali(selector, pola) {
|
||||||
|
var $tabel = $(selector);
|
||||||
|
if ($tabel.data('skeleton-terpasang')) { return; }
|
||||||
|
$tabel.data('skeleton-terpasang', true);
|
||||||
|
pasangSkeletonSk(selector, 5, pola);
|
||||||
|
}
|
||||||
|
|
||||||
function initDataTable(category) {
|
function initDataTable(category) {
|
||||||
showLoading();
|
showLoading();
|
||||||
|
|
||||||
if (dataTable) {
|
if (dataTable) {
|
||||||
dataTable.destroy();
|
dataTable.destroy();
|
||||||
$('#total-poin-pengajuan').text('...');
|
|
||||||
$('#poin-diterima').text('...');
|
|
||||||
$('#poin-ditolak').text('...');
|
|
||||||
$('#poin-menunggu-verifikasi').text('...');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Skeleton kartu poin selama data dimuat
|
||||||
|
$('#total-poin-pengajuan, #poin-diterima, #poin-ditolak, #poin-menunggu-verifikasi')
|
||||||
|
.html('<span class="skel d-inline-block align-middle" style="width: 96px; height: 28px;"></span>');
|
||||||
|
|
||||||
if (category === 'buku-ajar') {
|
if (category === 'buku-ajar') {
|
||||||
var bukuAjarColumns = [];
|
var bukuAjarColumns = [];
|
||||||
if (canVerifyBukuAjar) {
|
if (canVerifyBukuAjar) {
|
||||||
@@ -891,8 +899,11 @@
|
|||||||
{ data: 'status_badge', name: 'status_badge', searchable: false, orderable: false, className: 'text-center' },
|
{ data: 'status_badge', name: 'status_badge', searchable: false, orderable: false, className: 'text-center' },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
var polaBukuAjar = ['dua', 'dua', 'pendek', 'pendek', 'pendek', 'pil'];
|
||||||
|
if (canVerifyBukuAjar) { polaBukuAjar.unshift('kotak'); }
|
||||||
|
pasangSkeletonSekali('#buku-ajar-content', polaBukuAjar);
|
||||||
dataTable = $('#buku-ajar-content').DataTable({
|
dataTable = $('#buku-ajar-content').DataTable({
|
||||||
processing: true,
|
processing: false,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
ajax: {
|
ajax: {
|
||||||
url: "{{ route('tri-dharma.pleno.data-buku-ajar', ':id') }}".replace(':id', nip),
|
url: "{{ route('tri-dharma.pleno.data-buku-ajar', ':id') }}".replace(':id', nip),
|
||||||
@@ -927,8 +938,9 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pasangSkeletonSekali(`#${category}-content`, ['kotak', 'dua', 'dua', 'pendek', 'pendek', 'pendek', 'pil']);
|
||||||
dataTable = $(`#${category}-content`).DataTable({
|
dataTable = $(`#${category}-content`).DataTable({
|
||||||
processing: true,
|
processing: false,
|
||||||
serverSide: true,
|
serverSide: true,
|
||||||
ajax: {
|
ajax: {
|
||||||
url: "{{ route('tri-dharma.pleno.data-detail', ':id') }}".replace(':id', nip),
|
url: "{{ route('tri-dharma.pleno.data-detail', ':id') }}".replace(':id', nip),
|
||||||
|
|||||||
@@ -26,6 +26,20 @@
|
|||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Lebar kolom dikunci (sama seperti tabel anggota di detail SK) */
|
||||||
|
#pegawai-table {
|
||||||
|
table-layout: fixed;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pegawai-table th:nth-child(1) { width: 32% !important; }
|
||||||
|
#pegawai-table th:nth-child(2) { width: 30% !important; }
|
||||||
|
#pegawai-table th:nth-child(3) { width: 14% !important; }
|
||||||
|
#pegawai-table th:nth-child(4) { width: 24% !important; }
|
||||||
|
|
||||||
|
#pegawai-table tbody td.nama-col .text-truncate {
|
||||||
|
max-width: 240px;
|
||||||
|
}
|
||||||
|
|
||||||
#pegawai-table tbody td.nama-col > div {
|
#pegawai-table tbody td.nama-col > div {
|
||||||
line-height: 1.3;
|
line-height: 1.3;
|
||||||
}
|
}
|
||||||
@@ -98,6 +112,7 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Pegawai</th>
|
<th>Pegawai</th>
|
||||||
|
<th>Jabatan</th>
|
||||||
<th class="d-none">NIP</th>
|
<th class="d-none">NIP</th>
|
||||||
<th>Status Aktif</th>
|
<th>Status Aktif</th>
|
||||||
<th>Status Pleno</th>
|
<th>Status Pleno</th>
|
||||||
@@ -137,8 +152,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
// Skeleton selama data dimuat (kolom terlihat: Pegawai, Jabatan, Status Aktif, Status Pleno)
|
||||||
|
pasangSkeletonSk('#pegawai-table', 5, ['tiga', 'dua', 'pil', 'pendek']);
|
||||||
var table = $('#pegawai-table').DataTable({
|
var table = $('#pegawai-table').DataTable({
|
||||||
processing: true,
|
autoWidth: false,
|
||||||
|
processing: false,
|
||||||
serverSide: true,
|
serverSide: true,
|
||||||
ajax: {
|
ajax: {
|
||||||
url: "{{ route('tri-dharma.pleno.data') }}",
|
url: "{{ route('tri-dharma.pleno.data') }}",
|
||||||
@@ -155,12 +173,30 @@
|
|||||||
render: function(data, type, row) {
|
render: function(data, type, row) {
|
||||||
if (type !== 'display') { return data; }
|
if (type !== 'display') { return data; }
|
||||||
return '<div>' +
|
return '<div>' +
|
||||||
'<div class="fw-semibold">' + (data || '-') + '</div>' +
|
'<div class="fw-semibold text-truncate" title="' + $('<div>').text(data || '').html().replace(/"/g, '"') + '">' + (data || '-') + '</div>' +
|
||||||
'<div class="text-muted small font-monospace">' + (row.nip || '-') + '</div>' +
|
'<div class="text-muted small font-monospace">' + (row.nip || '-') + '</div>' +
|
||||||
'<div class="mt-1">' + renderJenisPegawaiTag(row.jenis_pegawai) + '</div>' +
|
'<div class="mt-1">' + renderJenisPegawaiTag(row.jenis_pegawai) + '</div>' +
|
||||||
'</div>';
|
'</div>';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
data: 'jabatan_fungsional_nama',
|
||||||
|
name: 'jabatan_fungsional_nama',
|
||||||
|
orderable: false,
|
||||||
|
render: function(data, type, row) {
|
||||||
|
if (type !== 'display') { return data; }
|
||||||
|
var escape = function(v) { return $('<div>').text(v).html().replace(/"/g, '"'); };
|
||||||
|
var baris = function(label, nilai, extraClass) {
|
||||||
|
var teks = nilai ? escape(nilai) : '-';
|
||||||
|
return '<div class="text-muted small ' + extraClass + '">' + label + '</div>' +
|
||||||
|
'<div class="fw-semibold text-truncate" title="' + (nilai ? teks : '') + '">' + teks + '</div>';
|
||||||
|
};
|
||||||
|
return '<div>' +
|
||||||
|
baris('Fungsional', row.jabatan_fungsional_nama, '') +
|
||||||
|
baris('Tambahan', row.jabatan_dtt_nama, 'mt-1') +
|
||||||
|
'</div>';
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
data: 'nip',
|
data: 'nip',
|
||||||
name: 'nip',
|
name: 'nip',
|
||||||
@@ -295,34 +331,28 @@
|
|||||||
var url = $(this).attr('data-url');
|
var url = $(this).attr('data-url');
|
||||||
if (!url) { return; }
|
if (!url) { return; }
|
||||||
|
|
||||||
@if (Auth::user()->id == 1)
|
var $row = $(this);
|
||||||
$('body').css('cursor', 'wait');
|
$.ajax({
|
||||||
$(this).css('cursor', 'wait');
|
url: url,
|
||||||
window.location.href = url;
|
type: 'GET',
|
||||||
@else
|
headers: { 'X-Requested-With': 'XMLHttpRequest' },
|
||||||
var $row = $(this);
|
success: function(response) {
|
||||||
$.ajax({
|
if (response.success) {
|
||||||
url: url,
|
$('body').css('cursor', 'wait');
|
||||||
type: 'GET',
|
$row.css('cursor', 'wait');
|
||||||
headers: { 'X-Requested-With': 'XMLHttpRequest' },
|
window.location.href = url;
|
||||||
success: function(response) {
|
} else {
|
||||||
if (response.success) {
|
showInfo('Info', response.message || 'Periode verifikasi tidak aktif');
|
||||||
$('body').css('cursor', 'wait');
|
|
||||||
$row.css('cursor', 'wait');
|
|
||||||
window.location.href = url;
|
|
||||||
} else {
|
|
||||||
showWarning('Peringatan', response.message || 'Periode verifikasi tidak aktif');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
error: function(xhr) {
|
|
||||||
var message = 'Periode verifikasi tidak aktif';
|
|
||||||
if (xhr.responseJSON && xhr.responseJSON.message) {
|
|
||||||
message = xhr.responseJSON.message;
|
|
||||||
}
|
|
||||||
showWarning('Peringatan', message);
|
|
||||||
}
|
}
|
||||||
});
|
},
|
||||||
@endif
|
error: function(xhr) {
|
||||||
|
var message = 'Periode verifikasi tidak aktif';
|
||||||
|
if (xhr.responseJSON && xhr.responseJSON.message) {
|
||||||
|
message = xhr.responseJSON.message;
|
||||||
|
}
|
||||||
|
showInfo('Info', message);
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$(window).on('pageshow', function() {
|
$(window).on('pageshow', function() {
|
||||||
|
|||||||
@@ -66,7 +66,9 @@ Route::middleware('permission:Baca Tri Dharma,Verifikasi Tri Dharma,Baca Pleno T
|
|||||||
Route::prefix('/bawahan')->name('bawahan.')->group(function () {
|
Route::prefix('/bawahan')->name('bawahan.')->group(function () {
|
||||||
Route::get('/', [BawahanController::class, 'index'])->name('index');
|
Route::get('/', [BawahanController::class, 'index'])->name('index');
|
||||||
Route::get('/data', [BawahanController::class, 'data'])->name('data');
|
Route::get('/data', [BawahanController::class, 'data'])->name('data');
|
||||||
|
Route::get('/data-atasan', [BawahanController::class, 'dataAtasan'])->name('data-atasan');
|
||||||
Route::get('/modal-data', [BawahanController::class, 'modalData'])->name('modal-data');
|
Route::get('/modal-data', [BawahanController::class, 'modalData'])->name('modal-data');
|
||||||
|
Route::post('/data-bawahan-atasan', [BawahanController::class, 'dataBawahanAtasan'])->name('data-bawahan-atasan');
|
||||||
Route::post('/update', [BawahanController::class, 'update'])->name('update');
|
Route::post('/update', [BawahanController::class, 'update'])->name('update');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user