194 lines
6.8 KiB
PHP
194 lines
6.8 KiB
PHP
@extends('layouts.main')
|
|
|
|
@section('css')
|
|
<style>
|
|
#sudah-diperbaiki tbody tr {
|
|
cursor: pointer;
|
|
}
|
|
|
|
#sudah-diperbaiki tbody tr > * {
|
|
transition: background-color 0.25s ease;
|
|
}
|
|
|
|
#sudah-diperbaiki tbody tr:hover > * {
|
|
background-color: rgba(13, 110, 253, 0.08) !important;
|
|
}
|
|
|
|
#sudah-diperbaiki tbody tr:active > * {
|
|
background-color: rgba(13, 110, 253, 0.22) !important;
|
|
transition: background-color 0s;
|
|
}
|
|
|
|
#sudah-diperbaiki td, #sudah-diperbaiki th {
|
|
border-color: #ced4da !important;
|
|
}
|
|
|
|
#sudah-diperbaiki thead th {
|
|
background: #2563eb !important; background-color: #2563eb !important;
|
|
color: #fff !important;
|
|
border-color: #2563eb !important;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
@include('verifikasi.sk._kolom_sk_css')
|
|
|
|
#sudah-diperbaiki tbody .btn-primary {
|
|
transition: transform 0.1s ease, box-shadow 0.1s ease;
|
|
}
|
|
|
|
#sudah-diperbaiki 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 Sudah Diperbaiki',
|
|
'description' => 'Berikut adalah daftar Surat Keputusan (SK) yang sudah diperbaiki'
|
|
])
|
|
|
|
<div class="table-responsive">
|
|
<table class="table table-bordered w-100" id="sudah-diperbaiki">
|
|
<thead>
|
|
<tr>
|
|
<th>SK</th>
|
|
<th>Nomor SK</th>
|
|
<th>Tentang</th>
|
|
<th>Tanggal</th>
|
|
<th>Status</th>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endsection
|
|
|
|
@section('js')
|
|
<script>
|
|
$('.si-sk').addClass('menuitem-active');
|
|
$('.ni-sk').addClass('badge-primary-lighten');
|
|
$('.li-sk').addClass('show');
|
|
$('.li-sk-sudah-diperbaiki').addClass('active badge-primary-lighten');
|
|
|
|
var table = $('#sudah-diperbaiki').DataTable({
|
|
processing: true,
|
|
serverSide: true,
|
|
ajax: {
|
|
url: "{{ route('sk.sudah-diperbaiki.data') }}",
|
|
data: function (d) {
|
|
d.unit_id = $('#unit_kerja_filter').val();
|
|
}
|
|
},
|
|
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: 'status_verifikator',
|
|
name: 'status_verifikator',
|
|
className: 'text-center'
|
|
},
|
|
],
|
|
createdRow: function(row, data) {
|
|
var title = data.no_anggota
|
|
? '⚠️ SK ini tidak memiliki anggota — harap tambahkan anggota terlebih dahulu'
|
|
: 'Klik untuk verifikasi';
|
|
$(row).attr('data-url', data.url_detail)
|
|
.attr('data-no-anggota', data.no_anggota ? '1' : '0')
|
|
.attr('data-bs-toggle', 'tooltip')
|
|
.attr('data-bs-placement', 'top')
|
|
.attr('title', title);
|
|
},
|
|
drawCallback: function() {
|
|
document.querySelectorAll('body > .tooltip').forEach(function(el) { el.remove(); });
|
|
document.querySelectorAll('#sudah-diperbaiki 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' });
|
|
});
|
|
initKolomSk('#sudah-diperbaiki');
|
|
},
|
|
order: [[2, 'asc']],
|
|
language: {
|
|
processing: "<div class='spinner'></div> Sedang Memuat...",
|
|
}
|
|
});
|
|
|
|
@include('verifikasi.sk._filter_unit_kerja_js')
|
|
|
|
@include('verifikasi.sk._kolom_sk_js')
|
|
|
|
$('#sudah-diperbaiki').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 noAnggota = $(this).data('no-anggota') == '1';
|
|
|
|
if (noAnggota) {
|
|
var tooltipInstance = bootstrap.Tooltip.getInstance(this);
|
|
if (tooltipInstance) { tooltipInstance.dispose(); }
|
|
showWarning('Perhatian', 'SK ini tidak memiliki anggota.');
|
|
return;
|
|
}
|
|
|
|
var tooltipInstance = bootstrap.Tooltip.getInstance(this);
|
|
if (tooltipInstance) { tooltipInstance.dispose(); }
|
|
$('body').css('cursor', 'wait');
|
|
$(this).css('cursor', 'wait');
|
|
window.location.href = url;
|
|
});
|
|
</script>
|
|
@endsection
|