215 lines
8.2 KiB
PHP
215 lines
8.2 KiB
PHP
@extends('layouts.main')
|
|
|
|
@section('css')
|
|
<style>
|
|
.bg-purple {
|
|
background-color: #6f42c1 !important;
|
|
color: white !important;
|
|
}
|
|
|
|
#diterima tbody tr {
|
|
cursor: pointer;
|
|
}
|
|
|
|
#diterima tbody tr > * {
|
|
transition: background-color 0.25s ease;
|
|
}
|
|
|
|
#diterima tbody tr:hover > * {
|
|
background-color: rgba(13, 110, 253, 0.08) !important;
|
|
}
|
|
|
|
#diterima tbody tr:active > * {
|
|
background-color: rgba(13, 110, 253, 0.22) !important;
|
|
transition: background-color 0s;
|
|
}
|
|
|
|
#diterima td, #diterima th {
|
|
border-color: #ced4da !important;
|
|
}
|
|
|
|
#diterima thead th {
|
|
background: #2563eb !important; background-color: #2563eb !important;
|
|
color: #fff !important;
|
|
border-color: #2563eb !important;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
#diterima tbody .btn-primary {
|
|
transition: transform 0.1s ease, box-shadow 0.1s ease;
|
|
}
|
|
|
|
#diterima tbody .btn-primary:active {
|
|
transform: scale(0.88);
|
|
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
|
|
}
|
|
</style>
|
|
@endsection
|
|
|
|
@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="javascript:void(0);">SK</a></li>
|
|
<li class="breadcrumb-item active" aria-current="page">{{ $title }}</li>
|
|
</ol>
|
|
@endsection
|
|
|
|
@section('content')
|
|
@if ($periode && !$periode->canVerifySk() && !auth()->user()->hasRole('Superuser'))
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="alert alert-warning" role="alert">
|
|
<i class="fas fa-exclamation-triangle me-2"></i>
|
|
<strong>Perhatian!</strong> {{ $periode->getSkVerificationErrorMessage() ?? 'Periode verifikasi SK tidak aktif.' }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endif
|
|
|
|
@include('verifikasi.sk._filter_unit_kerja')
|
|
|
|
<div class="card border">
|
|
<div class="card-body">
|
|
@include('components.datatable-header', [
|
|
'title' => 'Daftar SK Diterima',
|
|
'description' => 'Berikut adalah daftar Surat Keputusan (SK) yang telah diterima',
|
|
])
|
|
|
|
<ul class="nav nav-pills bg-nav-pills nav-justified mb-3" id="skTabs" role="tablist">
|
|
<li class="nav-item" role="presentation">
|
|
<button class="nav-link rounded-0 active" id="semua-tab" data-bs-toggle="tab" data-bs-target="#semua"
|
|
type="button" role="tab" aria-controls="semua" aria-selected="true" aria-expanded="true" data-tipe="">
|
|
<i class="uil-files-landscapes d-md-none d-block"></i>
|
|
<span class="d-none d-md-block">Semua SK</span>
|
|
</button>
|
|
</li>
|
|
<li class="nav-item" role="presentation">
|
|
<button class="nav-link rounded-0" id="biasa-tab" data-bs-toggle="tab" data-bs-target="#biasa" type="button"
|
|
role="tab" aria-controls="biasa" aria-selected="false" aria-expanded="false" data-tipe="biasa">
|
|
<i class="uil-file-alt d-md-none d-block"></i>
|
|
<span class="d-none d-md-block">SK Biasa</span>
|
|
</button>
|
|
</li>
|
|
<li class="nav-item" role="presentation">
|
|
<button class="nav-link rounded-0" id="reklaim-tab" data-bs-toggle="tab" data-bs-target="#reklaim"
|
|
type="button" role="tab" aria-controls="reklaim" aria-selected="false" aria-expanded="false" data-tipe="reklaim">
|
|
<i class="uil-redo d-md-none d-block"></i>
|
|
<span class="d-none d-md-block">SK Reklaim</span>
|
|
</button>
|
|
</li>
|
|
</ul>
|
|
|
|
<div class="tab-content" id="skTabsContent">
|
|
<div class="tab-pane fade show active" id="semua" role="tabpanel" aria-labelledby="semua-tab">
|
|
<div class="table-responsive">
|
|
<table class="table table-bordered w-100" id="diterima">
|
|
<thead>
|
|
<tr>
|
|
<th>SK</th>
|
|
<th>Nomor SK</th>
|
|
<th>Tentang</th>
|
|
<th>Tanggal</th>
|
|
<th>Status</th>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endsection
|
|
|
|
@section('js')
|
|
<script>
|
|
$('.si-sk').addClass('menuitem-active');
|
|
$('.ni-sk').addClass('badge-primary-lighten');
|
|
$('.li-sk').addClass('show');
|
|
$('.li-sk-diterima').addClass('active badge-primary-lighten');
|
|
|
|
var table = $('#diterima').DataTable({
|
|
processing: true,
|
|
serverSide: true,
|
|
ajax: {
|
|
url: "{{ route('sk.diterima.data') }}",
|
|
data: function(d) {
|
|
d.unit_id = $('#unit_kerja_filter').val();
|
|
d.tipe_sk = $('#skTabs .nav-link.active').data('tipe');
|
|
}
|
|
},
|
|
columns: [
|
|
{
|
|
data: 'pdf',
|
|
name: 'pdf',
|
|
className: 'text-center',
|
|
orderable: false,
|
|
searchable: false
|
|
},
|
|
{
|
|
data: 'no_sk',
|
|
name: 'no_sk',
|
|
className: 'text-center'
|
|
},
|
|
{
|
|
data: 'tentang',
|
|
name: 'tentang'
|
|
},
|
|
{
|
|
data: 'tanggal_sk',
|
|
name: 'tanggal_sk',
|
|
className: 'text-center',
|
|
width: '100px'
|
|
},
|
|
{
|
|
data: 'status_verifikator',
|
|
name: 'status_verifikator',
|
|
className: 'text-center'
|
|
},
|
|
],
|
|
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 verifikasi');
|
|
},
|
|
drawCallback: function() {
|
|
document.querySelectorAll('body > .tooltip').forEach(function(el) { el.remove(); });
|
|
document.querySelectorAll('#diterima tbody [data-bs-toggle="tooltip"]').forEach(function(el) {
|
|
var existing = bootstrap.Tooltip.getInstance(el);
|
|
if (existing) { existing.dispose(); }
|
|
new bootstrap.Tooltip(el, { trigger: 'hover' });
|
|
});
|
|
},
|
|
order: [[2, 'asc']],
|
|
language: {
|
|
processing: "<div class='spinner'></div> Sedang Memuat...",
|
|
}
|
|
});
|
|
|
|
// Event handler untuk nav tabs
|
|
$('#skTabs button[data-bs-toggle="tab"]').on('shown.bs.tab', function(e) {
|
|
table.ajax.reload();
|
|
});
|
|
|
|
@include('verifikasi.sk._filter_unit_kerja_js')
|
|
|
|
$('#diterima').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 melakukan verifikasi.');
|
|
return;
|
|
}
|
|
if (unitId) { url += '?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;
|
|
});
|
|
|
|
</script>
|
|
@endsection
|