Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0da23d7f12 | |||
| bbbe40afb3 | |||
| 8963668618 | |||
| c21910fb7c |
@@ -8,27 +8,48 @@ use Maatwebsite\Excel\Concerns\FromArray;
|
|||||||
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
|
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
|
||||||
use Maatwebsite\Excel\Concerns\WithColumnFormatting;
|
use Maatwebsite\Excel\Concerns\WithColumnFormatting;
|
||||||
use Maatwebsite\Excel\Concerns\WithCustomValueBinder;
|
use Maatwebsite\Excel\Concerns\WithCustomValueBinder;
|
||||||
use Maatwebsite\Excel\Concerns\WithHeadings;
|
use Maatwebsite\Excel\Concerns\WithEvents;
|
||||||
use Maatwebsite\Excel\Concerns\WithMapping;
|
use Maatwebsite\Excel\Concerns\WithMapping;
|
||||||
use Maatwebsite\Excel\Concerns\WithStyles;
|
use Maatwebsite\Excel\Events\AfterSheet;
|
||||||
|
use PhpOffice\PhpSpreadsheet\Cell\Coordinate;
|
||||||
use PhpOffice\PhpSpreadsheet\Style\Alignment;
|
use PhpOffice\PhpSpreadsheet\Style\Alignment;
|
||||||
use PhpOffice\PhpSpreadsheet\Style\Fill;
|
use PhpOffice\PhpSpreadsheet\Style\Fill;
|
||||||
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
|
|
||||||
|
|
||||||
class KeseluruhanExport implements FromArray, ShouldAutoSize, WithColumnFormatting, WithCustomValueBinder, WithHeadings, WithMapping, WithStyles
|
class KeseluruhanExport implements FromArray, ShouldAutoSize, WithColumnFormatting, WithCustomValueBinder, WithEvents, WithMapping
|
||||||
{
|
{
|
||||||
use ForcesTextColumns;
|
use ForcesTextColumns;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Jumlah kolom tetap di depan (No., Nama, NIP, Jenis Pegawai, Unit Kerja) sebelum kolom
|
||||||
|
* bulanan P1 dimulai.
|
||||||
|
*/
|
||||||
|
private const FIXED_COLUMNS = ['No.', 'Nama', 'NIP', 'Jenis Pegawai', 'Unit Kerja'];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Kolom setelah blok bulanan P1 (tidak ikut di-expand per bulan).
|
||||||
|
*/
|
||||||
|
private const TRAILING_COLUMNS = ['Jumlah P2', 'Jumlah THR', 'Jumlah R13', 'Jumlah Publikasi', 'Total'];
|
||||||
|
|
||||||
|
private const BULAN_NAMES = [
|
||||||
|
1 => 'Januari', 2 => 'Februari', 3 => 'Maret', 4 => 'April', 5 => 'Mei', 6 => 'Juni',
|
||||||
|
7 => 'Juli', 8 => 'Agustus', 9 => 'September', 10 => 'Oktober', 11 => 'November', 12 => 'Desember',
|
||||||
|
];
|
||||||
|
|
||||||
|
private array $rows;
|
||||||
|
|
||||||
|
private int $bulanTerakhir;
|
||||||
|
|
||||||
protected function nipColumns(): array
|
protected function nipColumns(): array
|
||||||
{
|
{
|
||||||
return ['C'];
|
return ['C'];
|
||||||
}
|
}
|
||||||
|
|
||||||
private array $rows;
|
public function __construct(int $tahun, ?string $jenisPegawai, mixed $unit, bool $includePppk2025 = false)
|
||||||
|
|
||||||
public function __construct(int $tahun, ?string $jenisPegawai, mixed $unit)
|
|
||||||
{
|
{
|
||||||
$this->rows = app(KeseluruhanController::class)->getRekapRows($tahun, $jenisPegawai, $unit);
|
$controller = app(KeseluruhanController::class);
|
||||||
|
|
||||||
|
$this->rows = $controller->getRekapRows($tahun, $jenisPegawai, $unit, $includePppk2025);
|
||||||
|
$this->bulanTerakhir = $controller->getBulanTerakhir($tahun);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function array(): array
|
public function array(): array
|
||||||
@@ -36,72 +57,96 @@ class KeseluruhanExport implements FromArray, ShouldAutoSize, WithColumnFormatti
|
|||||||
return $this->rows;
|
return $this->rows;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function headings(): array
|
|
||||||
{
|
|
||||||
return [
|
|
||||||
'No.',
|
|
||||||
'Nama',
|
|
||||||
'NIP',
|
|
||||||
'Jenis Pegawai',
|
|
||||||
'Unit Kerja',
|
|
||||||
'Jumlah P1',
|
|
||||||
'Jumlah P2',
|
|
||||||
'Jumlah THR',
|
|
||||||
'Jumlah R13',
|
|
||||||
'Jumlah Publikasi',
|
|
||||||
'Total',
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
public function map($row): array
|
public function map($row): array
|
||||||
{
|
{
|
||||||
static $no = 0;
|
static $no = 0;
|
||||||
$no++;
|
$no++;
|
||||||
|
|
||||||
return [
|
$bulananValues = [];
|
||||||
|
for ($bulan = 1; $bulan <= $this->bulanTerakhir; $bulan++) {
|
||||||
|
$bulananValues[] = $row['jumlah_p1_bulanan'][$bulan] ?? 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return array_merge([
|
||||||
$no,
|
$no,
|
||||||
$row['nama'],
|
$row['nama'],
|
||||||
$row['nip'],
|
$row['nip'],
|
||||||
$row['jenis_pegawai'] === 'dosen' ? 'Dosen' : ($row['jenis_pegawai'] === 'tendik' ? 'Tendik' : '-'),
|
$row['jenis_pegawai'] === 'dosen' ? 'Dosen' : ($row['jenis_pegawai'] === 'tendik' ? 'Tendik' : '-'),
|
||||||
$row['nama_unit'],
|
$row['nama_unit'],
|
||||||
$row['jumlah_p1'],
|
], $bulananValues, [
|
||||||
$row['jumlah_p2'],
|
$row['jumlah_p2'],
|
||||||
$row['jumlah_thr'],
|
$row['jumlah_thr'],
|
||||||
$row['jumlah_r13'],
|
$row['jumlah_r13'],
|
||||||
$row['jumlah_publikasi'],
|
$row['jumlah_publikasi'],
|
||||||
$row['total'],
|
$row['total'],
|
||||||
];
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function columnFormats(): array
|
public function columnFormats(): array
|
||||||
{
|
{
|
||||||
$accountingFormat = '_("Rp"\ * #,##0.00_);_("Rp"\ * \-#,##0.00_);_("Rp"\ * "-"??_);_(@_)';
|
$accountingFormat = '_("Rp"\ * #,##0.00_);_("Rp"\ * \-#,##0.00_);_("Rp"\ * "-"??_);_(@_)';
|
||||||
|
$fixedCount = count(self::FIXED_COLUMNS);
|
||||||
|
$lastIndex = $fixedCount + $this->bulanTerakhir + count(self::TRAILING_COLUMNS);
|
||||||
|
|
||||||
return [
|
$formats = ['C' => '@'];
|
||||||
'C' => '@',
|
for ($i = $fixedCount + 1; $i <= $lastIndex; $i++) {
|
||||||
'F' => $accountingFormat,
|
$formats[Coordinate::stringFromColumnIndex($i)] = $accountingFormat;
|
||||||
'G' => $accountingFormat,
|
}
|
||||||
'H' => $accountingFormat,
|
|
||||||
'I' => $accountingFormat,
|
return $formats;
|
||||||
'J' => $accountingFormat,
|
|
||||||
'K' => $accountingFormat,
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function styles(Worksheet $sheet)
|
/**
|
||||||
|
* Data (via array()+map()) ditulis mulai baris 1 karena export ini sengaja tidak memakai
|
||||||
|
* WithHeadings biasa. Di sini baris 1-2 disisipkan di atasnya untuk header 2 tingkat: baris 1
|
||||||
|
* berisi label grup ("Jumlah P1 (Januari - Sekarang)" yang di-merge selebar kolom bulanannya,
|
||||||
|
* dan label lain yang di-merge vertikal 2 baris), baris 2 berisi nama tiap bulan.
|
||||||
|
*/
|
||||||
|
public function registerEvents(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
1 => [
|
AfterSheet::class => function (AfterSheet $event) {
|
||||||
'font' => ['bold' => true, 'color' => ['rgb' => 'FFFFFF']],
|
$sheet = $event->sheet->getDelegate();
|
||||||
'fill' => [
|
$sheet->insertNewRowBefore(1, 2);
|
||||||
'fillType' => Fill::FILL_SOLID,
|
|
||||||
'startColor' => ['rgb' => '4472C4'],
|
$fixedCount = count(self::FIXED_COLUMNS);
|
||||||
],
|
|
||||||
'alignment' => [
|
foreach (self::FIXED_COLUMNS as $i => $label) {
|
||||||
'horizontal' => Alignment::HORIZONTAL_CENTER,
|
$col = Coordinate::stringFromColumnIndex($i + 1);
|
||||||
'vertical' => Alignment::VERTICAL_CENTER,
|
$sheet->setCellValue($col.'1', $label);
|
||||||
],
|
$sheet->mergeCells($col.'1:'.$col.'2');
|
||||||
],
|
}
|
||||||
|
|
||||||
|
$p1StartCol = Coordinate::stringFromColumnIndex($fixedCount + 1);
|
||||||
|
$p1EndCol = Coordinate::stringFromColumnIndex($fixedCount + $this->bulanTerakhir);
|
||||||
|
$sheet->setCellValue($p1StartCol.'1', 'Jumlah P1 (Januari - Sekarang)');
|
||||||
|
$sheet->mergeCells($p1StartCol.'1:'.$p1EndCol.'1');
|
||||||
|
|
||||||
|
for ($bulan = 1; $bulan <= $this->bulanTerakhir; $bulan++) {
|
||||||
|
$col = Coordinate::stringFromColumnIndex($fixedCount + $bulan);
|
||||||
|
$sheet->setCellValue($col.'2', self::BULAN_NAMES[$bulan]);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (self::TRAILING_COLUMNS as $i => $label) {
|
||||||
|
$col = Coordinate::stringFromColumnIndex($fixedCount + $this->bulanTerakhir + $i + 1);
|
||||||
|
$sheet->setCellValue($col.'1', $label);
|
||||||
|
$sheet->mergeCells($col.'1:'.$col.'2');
|
||||||
|
}
|
||||||
|
|
||||||
|
$lastCol = Coordinate::stringFromColumnIndex($fixedCount + $this->bulanTerakhir + count(self::TRAILING_COLUMNS));
|
||||||
|
$sheet->getStyle('A1:'.$lastCol.'2')->applyFromArray([
|
||||||
|
'font' => ['bold' => true, 'color' => ['rgb' => 'FFFFFF']],
|
||||||
|
'fill' => [
|
||||||
|
'fillType' => Fill::FILL_SOLID,
|
||||||
|
'startColor' => ['rgb' => '4472C4'],
|
||||||
|
],
|
||||||
|
'alignment' => [
|
||||||
|
'horizontal' => Alignment::HORIZONTAL_CENTER,
|
||||||
|
'vertical' => Alignment::VERTICAL_CENTER,
|
||||||
|
'wrapText' => true,
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,8 +42,9 @@ class KeseluruhanController extends Controller
|
|||||||
$tahun = (int) ($request->tahun ?: now()->year);
|
$tahun = (int) ($request->tahun ?: now()->year);
|
||||||
$jenisPegawai = $request->jenis_pegawai ?: null;
|
$jenisPegawai = $request->jenis_pegawai ?: null;
|
||||||
$unit = $request->unit;
|
$unit = $request->unit;
|
||||||
|
$includePppk2025 = $request->boolean('include_pppk_2025');
|
||||||
|
|
||||||
$rows = collect($this->getRekapRows($tahun, $jenisPegawai, $unit));
|
$rows = collect($this->getRekapRows($tahun, $jenisPegawai, $unit, $includePppk2025));
|
||||||
|
|
||||||
return DataTables::of($rows)
|
return DataTables::of($rows)
|
||||||
->editColumn('jenis_pegawai', fn ($row) => $row['jenis_pegawai'] === 'dosen' ? 'Dosen' : ($row['jenis_pegawai'] === 'tendik' ? 'Tendik' : '-'))
|
->editColumn('jenis_pegawai', fn ($row) => $row['jenis_pegawai'] === 'dosen' ? 'Dosen' : ($row['jenis_pegawai'] === 'tendik' ? 'Tendik' : '-'))
|
||||||
@@ -69,6 +70,7 @@ class KeseluruhanController extends Controller
|
|||||||
$tahun = (int) ($request->tahun ?: now()->year);
|
$tahun = (int) ($request->tahun ?: now()->year);
|
||||||
$jenisPegawai = $request->jenis_pegawai ?: null;
|
$jenisPegawai = $request->jenis_pegawai ?: null;
|
||||||
$unit = $request->unit;
|
$unit = $request->unit;
|
||||||
|
$includePppk2025 = $request->boolean('include_pppk_2025');
|
||||||
|
|
||||||
$unitName = '_Semua_Unit_Kerja';
|
$unitName = '_Semua_Unit_Kerja';
|
||||||
if ($unit !== null && $unit !== '') {
|
if ($unit !== null && $unit !== '') {
|
||||||
@@ -80,7 +82,7 @@ class KeseluruhanController extends Controller
|
|||||||
|
|
||||||
$filename = "Remunerasi_Keseluruhan_{$tahun}{$unitName}.xlsx";
|
$filename = "Remunerasi_Keseluruhan_{$tahun}{$unitName}.xlsx";
|
||||||
|
|
||||||
return Excel::download(new KeseluruhanExport($tahun, $jenisPegawai, $unit), $filename);
|
return Excel::download(new KeseluruhanExport($tahun, $jenisPegawai, $unit, $includePppk2025), $filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -88,7 +90,7 @@ class KeseluruhanController extends Controller
|
|||||||
* tahun terpilih. Dipakai bersama oleh data() (DataTables) dan KeseluruhanExport supaya kedua
|
* tahun terpilih. Dipakai bersama oleh data() (DataTables) dan KeseluruhanExport supaya kedua
|
||||||
* sisi (tampilan web & export Excel) selalu konsisten.
|
* sisi (tampilan web & export Excel) selalu konsisten.
|
||||||
*/
|
*/
|
||||||
public function getRekapRows(int $tahun, ?string $jenisPegawai, mixed $unit): array
|
public function getRekapRows(int $tahun, ?string $jenisPegawai, mixed $unit, bool $includePppk2025 = false): array
|
||||||
{
|
{
|
||||||
$rows = $this->buildRekap($tahun, $jenisPegawai);
|
$rows = $this->buildRekap($tahun, $jenisPegawai);
|
||||||
|
|
||||||
@@ -103,30 +105,48 @@ class KeseluruhanController extends Controller
|
|||||||
})->values();
|
})->values();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! $includePppk2025) {
|
||||||
|
$rows = $rows->filter(fn ($row) => ! str_contains($row['nip'] ?? '', '202521'))->values();
|
||||||
|
}
|
||||||
|
|
||||||
return $rows->sortBy('nama', SORT_NATURAL | SORT_FLAG_CASE)->values()->all();
|
return $rows->sortBy('nama', SORT_NATURAL | SORT_FLAG_CASE)->values()->all();
|
||||||
}
|
}
|
||||||
|
|
||||||
private function buildRekap(int $tahun, ?string $jenisPegawai): Collection
|
private function buildRekap(int $tahun, ?string $jenisPegawai): Collection
|
||||||
{
|
{
|
||||||
$cacheKey = 'remunerasi_keseluruhan_v1_'.$tahun.'_'.($jenisPegawai ?: 'semua');
|
$cacheKey = 'remunerasi_keseluruhan_v2_'.$tahun.'_'.($jenisPegawai ?: 'semua');
|
||||||
|
|
||||||
return collect(Cache::remember($cacheKey, now()->addHours(6), fn () => $this->computeRekap($tahun, $jenisPegawai)));
|
return collect(Cache::remember($cacheKey, now()->addHours(6), fn () => $this->computeRekap($tahun, $jenisPegawai)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Bulan terakhir yang diikutkan dalam akumulasi P1 "Januari - Sekarang": bulan berjalan kalau
|
||||||
|
* tahun yang dipilih adalah tahun sekarang, atau Desember kalau tahun yang dipilih sudah lewat.
|
||||||
|
* Dipakai bersama oleh computeRekap() dan KeseluruhanExport supaya jumlah kolom bulanan konsisten.
|
||||||
|
*/
|
||||||
|
public function getBulanTerakhir(int $tahun): int
|
||||||
|
{
|
||||||
|
return $tahun === (int) now()->year ? (int) now()->month : 12;
|
||||||
|
}
|
||||||
|
|
||||||
private function computeRekap(int $tahun, ?string $jenisPegawai): array
|
private function computeRekap(int $tahun, ?string $jenisPegawai): array
|
||||||
{
|
{
|
||||||
$normalize = fn ($nip) => preg_replace("/['.\-]/", '', (string) $nip);
|
$normalize = fn ($nip) => preg_replace("/['.\-]/", '', (string) $nip);
|
||||||
|
|
||||||
// 1. P1 = akumulasi Januari s.d. bulan berjalan (atau Desember untuk tahun yang sudah lewat)
|
// 1. P1 = akumulasi Januari s.d. bulan berjalan (atau Desember untuk tahun yang sudah lewat)
|
||||||
$bulanTerakhir = $tahun === (int) now()->year ? (int) now()->month : 12;
|
$bulanTerakhir = $this->getBulanTerakhir($tahun);
|
||||||
|
|
||||||
$p1 = P1::query()
|
$p1Rows = P1::query()
|
||||||
->where('tahun', $tahun)
|
->where('tahun', $tahun)
|
||||||
->whereBetween('bulan', [1, $bulanTerakhir])
|
->whereBetween('bulan', [1, $bulanTerakhir])
|
||||||
->when($jenisPegawai, fn ($q) => $q->whereRaw('LOWER(jenis_pegawai) = ?', [strtolower($jenisPegawai)]))
|
->when($jenisPegawai, fn ($q) => $q->whereRaw('LOWER(jenis_pegawai) = ?', [strtolower($jenisPegawai)]))
|
||||||
->get()
|
->get()
|
||||||
->groupBy(fn ($row) => $normalize($row->nip))
|
->groupBy(fn ($row) => $normalize($row->nip));
|
||||||
->map(fn ($rows) => (float) $rows->sum('gaji_yang_dibayarkan'));
|
|
||||||
|
$p1 = $p1Rows->map(fn ($rows) => (float) $rows->sum('gaji_yang_dibayarkan'));
|
||||||
|
|
||||||
|
// Rincian per bulan (dipakai untuk breakdown kolom bulanan di export Excel).
|
||||||
|
$p1Bulanan = $p1Rows->map(fn ($rows) => $rows->groupBy('bulan')->map(fn ($bulanRows) => (float) $bulanRows->sum('gaji_yang_dibayarkan')));
|
||||||
|
|
||||||
// 2. P2 = Semester 1 tahun terpilih
|
// 2. P2 = Semester 1 tahun terpilih
|
||||||
$periodeSemester1 = Periode::where('nama', 'LIKE', "%{$tahun} Semester 1%")->value('id_periode');
|
$periodeSemester1 = Periode::where('nama', 'LIKE', "%{$tahun} Semester 1%")->value('id_periode');
|
||||||
@@ -211,7 +231,7 @@ class KeseluruhanController extends Controller
|
|||||||
->get()
|
->get()
|
||||||
->keyBy(fn ($row) => $normalize($row->nip));
|
->keyBy(fn ($row) => $normalize($row->nip));
|
||||||
|
|
||||||
return $allNips->map(function ($nip) use ($pegawaiInfo, $p1, $p2, $thr, $r13, $publikasi, $jenisPegawai) {
|
return $allNips->map(function ($nip) use ($pegawaiInfo, $p1, $p1Bulanan, $bulanTerakhir, $p2, $thr, $r13, $publikasi, $jenisPegawai) {
|
||||||
$info = $pegawaiInfo->get($nip);
|
$info = $pegawaiInfo->get($nip);
|
||||||
|
|
||||||
if (! $info) {
|
if (! $info) {
|
||||||
@@ -233,6 +253,12 @@ class KeseluruhanController extends Controller
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$bulananNip = $p1Bulanan->get($nip);
|
||||||
|
$jumlahP1Bulanan = [];
|
||||||
|
for ($bulan = 1; $bulan <= $bulanTerakhir; $bulan++) {
|
||||||
|
$jumlahP1Bulanan[$bulan] = $bulananNip?->get($bulan, 0.0) ?? 0.0;
|
||||||
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'nip' => ltrim($info->nip ?? $nip, "'"),
|
'nip' => ltrim($info->nip ?? $nip, "'"),
|
||||||
'nama' => $info->nama ?? '-',
|
'nama' => $info->nama ?? '-',
|
||||||
@@ -240,6 +266,7 @@ class KeseluruhanController extends Controller
|
|||||||
'unit_kerja_id' => $info->unit_kerja_id,
|
'unit_kerja_id' => $info->unit_kerja_id,
|
||||||
'nama_unit' => $info->nama_unit ?? '-',
|
'nama_unit' => $info->nama_unit ?? '-',
|
||||||
'jumlah_p1' => $jumlahP1,
|
'jumlah_p1' => $jumlahP1,
|
||||||
|
'jumlah_p1_bulanan' => $jumlahP1Bulanan,
|
||||||
'jumlah_p2' => $jumlahP2,
|
'jumlah_p2' => $jumlahP2,
|
||||||
'jumlah_thr' => $jumlahThr,
|
'jumlah_thr' => $jumlahThr,
|
||||||
'jumlah_r13' => $jumlahR13,
|
'jumlah_r13' => $jumlahR13,
|
||||||
|
|||||||
@@ -77,6 +77,10 @@
|
|||||||
<option value="dosen">Dosen</option>
|
<option value="dosen">Dosen</option>
|
||||||
<option value="tendik">Tendik</option>
|
<option value="tendik">Tendik</option>
|
||||||
</select>
|
</select>
|
||||||
|
<div class="form-check mt-1">
|
||||||
|
<input class="form-check-input" type="checkbox" id="include_pppk_2025">
|
||||||
|
<label class="form-check-label" for="include_pppk_2025">PPPK 2025</label>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-sm-3">
|
<div class="col-sm-3">
|
||||||
@@ -164,6 +168,7 @@
|
|||||||
d.jenis_pegawai = $('#filter-jenis-pegawai').val();
|
d.jenis_pegawai = $('#filter-jenis-pegawai').val();
|
||||||
d.unit = $('#filter-unit').val();
|
d.unit = $('#filter-unit').val();
|
||||||
d.tahun = $('#filter-tahun').val();
|
d.tahun = $('#filter-tahun').val();
|
||||||
|
d.include_pppk_2025 = $('#include_pppk_2025').is(':checked') ? 1 : 0;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
columns: [
|
columns: [
|
||||||
@@ -209,7 +214,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#filter-jenis-pegawai, #filter-unit, #filter-tahun').on('change', function() {
|
$('#filter-jenis-pegawai, #filter-unit, #filter-tahun, #include_pppk_2025').on('change', function() {
|
||||||
table.draw();
|
table.draw();
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -233,10 +238,12 @@
|
|||||||
var jenisPegawai = $('#filter-jenis-pegawai').val();
|
var jenisPegawai = $('#filter-jenis-pegawai').val();
|
||||||
var unit = $('#filter-unit').val();
|
var unit = $('#filter-unit').val();
|
||||||
var tahun = $('#filter-tahun').val();
|
var tahun = $('#filter-tahun').val();
|
||||||
|
var includePppk2025 = $('#include_pppk_2025').is(':checked') ? 1 : 0;
|
||||||
|
|
||||||
if (jenisPegawai) { params.push('jenis_pegawai=' + jenisPegawai); }
|
if (jenisPegawai) { params.push('jenis_pegawai=' + jenisPegawai); }
|
||||||
if (unit) { params.push('unit=' + unit); }
|
if (unit) { params.push('unit=' + unit); }
|
||||||
if (tahun) { params.push('tahun=' + tahun); }
|
if (tahun) { params.push('tahun=' + tahun); }
|
||||||
|
params.push('include_pppk_2025=' + includePppk2025);
|
||||||
|
|
||||||
var url = "{{ route('remunerasi.keseluruhan.export') }}";
|
var url = "{{ route('remunerasi.keseluruhan.export') }}";
|
||||||
if (params.length > 0) {
|
if (params.length > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user