[Warning] Penambahan Simulasi dan Aturan Jurnal SINTA
This commit is contained in:
@@ -42,14 +42,21 @@
|
||||
<div class="card-body">
|
||||
@php
|
||||
$actionHeader = '
|
||||
<div class="d-flex align-items-center gap-2">
|
||||
<div class="form-check form-switch m-0 d-flex align-items-center gap-2 border rounded px-2 py-1 bg-light">
|
||||
<div class="d-flex align-items-center gap-2 flex-nowrap">
|
||||
<div style="width:230px;flex-shrink:0;">
|
||||
<select id="aturanPerhitungan" class="form-select select2" data-placeholder="Pilih Aturan Perhitungan">
|
||||
<option value=""></option>
|
||||
<option value="standar">Aturan Standar (Sebelum 401)</option>
|
||||
<option value="baru">Aturan Baru (Periode 401)</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-check form-switch m-0 d-flex align-items-center gap-2 border rounded px-2 py-1 bg-light flex-shrink-0 text-nowrap">
|
||||
<input class="form-check-input m-0" type="checkbox" id="checkDataApi" style="width:2.2em;height:1.2em;cursor:pointer;">
|
||||
<label class="form-check-label fw-bold small m-0 user-select-none" for="checkDataApi" style="cursor:pointer;color:#7b1fa2">
|
||||
<i class="uil-cloud-check me-1 fs-5 align-middle"></i>Data API
|
||||
</label>
|
||||
</div>
|
||||
<a href="#" class="btn btn-sm btn-outline-success export"><i class="uil-file-download-alt"></i> Export Excel</a>
|
||||
<a href="#" class="btn btn-sm btn-outline-success export flex-shrink-0 text-nowrap"><i class="uil-file-download-alt"></i> Export Excel</a>
|
||||
</div>
|
||||
';
|
||||
@endphp
|
||||
@@ -259,6 +266,17 @@
|
||||
localStorage.setItem('simulasi_p2_data_api', $(this).is(':checked') ? '1' : '0');
|
||||
});
|
||||
|
||||
// Aturan perhitungan (dipakai pada halaman rincian pegawai) default-nya mengikuti
|
||||
// aturan yang aktif di menu Aturan Perhitungan untuk periode yang dipilih
|
||||
var aturanPerPeriode = @json($aturanPerPeriode);
|
||||
|
||||
function setAturanDefault() {
|
||||
$('#aturanPerhitungan').val(aturanPerPeriode[$('select#periode').val()] || 'standar').trigger('change');
|
||||
}
|
||||
|
||||
setAturanDefault();
|
||||
$('select#periode').on('change', setAturanDefault);
|
||||
|
||||
$('#p2 tbody').on('click', 'tr', function() {
|
||||
var data = table.row(this).data();
|
||||
if (!data) return;
|
||||
@@ -269,6 +287,7 @@
|
||||
var url = "{{ route('lainnya.simulasi-p2-mengajar-2026.detail', ':nip') }}"
|
||||
.replace(':nip', nip)
|
||||
+ '?periode=' + encodeURIComponent(periode)
|
||||
+ '&aturan=' + encodeURIComponent($('#aturanPerhitungan').val() || 'standar')
|
||||
+ (useDataApi ? '&data_api=1' : '');
|
||||
$('html').addClass('row-loading');
|
||||
$(window).one('pagehide', function() { $('html').removeClass('row-loading'); });
|
||||
|
||||
@@ -116,18 +116,27 @@
|
||||
<div class="d-flex align-items-center gap-2">
|
||||
<i class="uil-info-circle fs-4 text-info"></i>
|
||||
<div>
|
||||
<strong>Simulasi P2 Mengajar 2026:</strong> Perhitungan pada rincian pegawai ini menggunakan <strong>Aturan Standar (Sebelum Periode 401)</strong>.
|
||||
<strong>Simulasi P2 Mengajar 2026:</strong> Perhitungan pada rincian pegawai ini menggunakan <strong>{{ $aturanBaru ? 'Aturan Baru (Periode 401)' : 'Aturan Standar (Sebelum Periode 401)' }}</strong>.
|
||||
@if (request()->boolean('data_api'))
|
||||
<span class="badge text-white ms-2" style="background:#7b1fa2"><i class="uil-cloud-check me-1"></i>Data API Aktif</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@if (request()->routeIs('lainnya.simulasi-p2-mengajar-2026.*') || request()->has('data_api'))
|
||||
<div class="form-check form-switch d-flex align-items-center gap-2 m-0 bg-white px-3 py-1 rounded border shadow-sm">
|
||||
<input class="form-check-input m-0" type="checkbox" id="switchDetailDataApi" {{ request()->boolean('data_api') ? 'checked' : '' }} style="cursor:pointer;width:2em;height:1em;">
|
||||
<label class="form-check-label fw-bold small m-0" for="switchDetailDataApi" style="cursor:pointer;color:#7b1fa2">
|
||||
Gunakan Data API
|
||||
</label>
|
||||
<div class="d-flex align-items-center gap-2 flex-nowrap ms-auto">
|
||||
<div style="width:230px;flex-shrink:0;">
|
||||
<select id="selectDetailAturan" class="form-select select2" data-placeholder="Pilih Aturan Perhitungan">
|
||||
<option value=""></option>
|
||||
<option value="standar" {{ $aturanBaru ? '' : 'selected' }}>Aturan Standar (Sebelum 401)</option>
|
||||
<option value="baru" {{ $aturanBaru ? 'selected' : '' }}>Aturan Baru (Periode 401)</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-check form-switch d-flex align-items-center gap-2 m-0 bg-white px-3 py-1 rounded border shadow-sm flex-shrink-0 text-nowrap">
|
||||
<input class="form-check-input m-0" type="checkbox" id="switchDetailDataApi" {{ request()->boolean('data_api') ? 'checked' : '' }} style="cursor:pointer;width:2em;height:1em;">
|
||||
<label class="form-check-label fw-bold small m-0" for="switchDetailDataApi" style="cursor:pointer;color:#7b1fa2">
|
||||
Gunakan Data API
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@@ -718,6 +727,13 @@
|
||||
}
|
||||
});
|
||||
|
||||
$('#selectDetailAturan').on('change', function () {
|
||||
var url = new URL(window.location.href);
|
||||
url.searchParams.set('aturan', $(this).val() || 'standar');
|
||||
$('body').addClass('page-loading');
|
||||
window.location.href = url.toString();
|
||||
});
|
||||
|
||||
$('#switchDetailDataApi').on('change', function () {
|
||||
var isChecked = $(this).is(':checked');
|
||||
var url = new URL(window.location.href);
|
||||
|
||||
Reference in New Issue
Block a user