feat: add initial views and controllers for verification and management modules

This commit is contained in:
Ariyutta
2026-10-07 12:00:05 +07:00
parent 60ae46d69c
commit dc923fb063
50 changed files with 3152 additions and 1345 deletions
@@ -13,9 +13,9 @@
.penunjang-table tbody a.badge:hover,
.penunjang-table tbody button:hover { filter: brightness(0.85); transform: scale(0.97); }
.penunjang-table thead th {
background: linear-gradient(135deg, #2080f5 0%, #0166d2 100%) !important;
background: #2563eb !important; background-color: #2563eb !important;
color: #fff !important;
border-color: #0166d2 !important;
border-color: #2563eb !important;
}
.penunjang-table thead th,
.penunjang-table thead th.nominal-cell,
@@ -13,9 +13,9 @@
.penunjang-table tbody a.badge:hover,
.penunjang-table tbody button:hover { filter: brightness(0.85); transform: scale(0.97); }
.penunjang-table thead th {
background: linear-gradient(135deg, #2080f5 0%, #0166d2 100%) !important;
background: #2563eb !important; background-color: #2563eb !important;
color: #fff !important;
border-color: #0166d2 !important;
border-color: #2563eb !important;
}
.penunjang-table thead th,
.penunjang-table thead th.nominal-cell,
@@ -13,9 +13,9 @@
.penunjang-table tbody a.badge:hover,
.penunjang-table tbody button:hover { filter: brightness(0.85); transform: scale(0.97); }
.penunjang-table thead th {
background: linear-gradient(135deg, #2080f5 0%, #0166d2 100%) !important;
background: #2563eb !important; background-color: #2563eb !important;
color: #fff !important;
border-color: #0166d2 !important;
border-color: #2563eb !important;
}
.penunjang-table thead th,
.penunjang-table thead th.nominal-cell,
@@ -34,9 +34,9 @@
}
#table-detail thead th {
background: linear-gradient(135deg, #2080f5 0%, #0166d2 100%) !important;
background: #2563eb !important; background-color: #2563eb !important;
color: #fff !important;
border-color: #0166d2 !important;
border-color: #2563eb !important;
white-space: nowrap;
}
@@ -9,9 +9,9 @@
#table-belum-selesai thead th,
#table-selesai thead th {
background: linear-gradient(135deg, #2080f5 0%, #0166d2 100%) !important;
background: #2563eb !important; background-color: #2563eb !important;
color: #fff !important;
border-color: #0166d2 !important;
border-color: #2563eb !important;
}
#table-belum-selesai tbody tr,
@@ -9,9 +9,10 @@
#table-belum-selesai thead th,
#table-selesai thead th {
background: linear-gradient(135deg, #2080f5 0%, #0166d2 100%) !important;
background: #2563eb !important;
background-color: #2563eb !important;
color: #fff !important;
border-color: #0166d2 !important;
border-color: #2563eb !important;
}
#table-belum-selesai tbody tr,
@@ -34,9 +34,9 @@
}
#table-detail thead th {
background: linear-gradient(135deg, #2080f5 0%, #0166d2 100%) !important;
background: #2563eb !important; background-color: #2563eb !important;
color: #fff !important;
border-color: #0166d2 !important;
border-color: #2563eb !important;
white-space: nowrap;
}
@@ -9,9 +9,9 @@
#table-belum-selesai thead th,
#table-selesai thead th {
background: linear-gradient(135deg, #2080f5 0%, #0166d2 100%) !important;
background: #2563eb !important; background-color: #2563eb !important;
color: #fff !important;
border-color: #0166d2 !important;
border-color: #2563eb !important;
}
#table-belum-selesai tbody tr,
@@ -24,9 +24,9 @@
}
#belum-finalisasi thead th {
background: linear-gradient(135deg, #2080f5 0%, #0166d2 100%) !important;
background: #2563eb !important; background-color: #2563eb !important;
color: #fff !important;
border-color: #0166d2 !important;
border-color: #2563eb !important;
white-space: nowrap;
}
@@ -24,9 +24,9 @@
}
#belum-verifikasi thead th {
background: linear-gradient(135deg, #2080f5 0%, #0166d2 100%) !important;
background: #2563eb !important; background-color: #2563eb !important;
color: #fff !important;
border-color: #0166d2 !important;
border-color: #2563eb !important;
white-space: nowrap;
}
@@ -58,10 +58,24 @@
border-color: #ced4da !important;
}
table[id^="anggota-sk-"] tbody td.nama-col .text-truncate {
max-width: 240px;
}
table[id^="anggota-sk-"] tbody td.nama-col > div {
line-height: 1.3;
}
table[id^="anggota-sk-"] tbody td {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
vertical-align: middle;
}
table[id^="anggota-sk-"] thead th {
background: linear-gradient(135deg, #2080f5 0%, #0166d2 100%) !important;
background: #2563eb !important; background-color: #2563eb !important;
color: #fff !important;
border-color: #0166d2 !important;
border-color: #2563eb !important;
white-space: nowrap;
}
@@ -111,19 +125,19 @@
<input type="hidden" id="berita_acara_uploaded" value="{{ $beritaAcaraUploaded ? '1' : '0' }}">
<input type="hidden" id="berita_acara_message" value="{{ $beritaAcaraMessage ?? '' }}">
<div class="alert alert-info d-flex justify-content-between align-items-start" role="alert" id="tour-info-alert">
<div class="alert alert-info d-flex justify-content-between align-items-center py-2 px-3 mb-2.5" role="alert" id="tour-info-alert">
<div>
<b><i class="dripicons-information me-2"></i>Info!</b>
<ul class="mb-0 mt-1">
<b><i class="dripicons-information me-1"></i>Info!</b>
<ul class="mb-0 mt-0.5 ps-3" style="font-size: 13px;">
<li><b>Jabatan Tugas Tambahan & TMT-nya, jika tidak boleh diklaim dalam remunerasi, maka ubah jumlah bulan yang dapat diklaim pada kolom Action.</b></li>
<li><b>Untuk dapat mengubah jangka waktu, harap disimpan terlebih dahulu untuk memunculkan opsi jangka waktu.</b></li>
</ul>
</div>
<div class="dropdown ms-3 flex-shrink-0">
<button class="btn btn-sm btn-primary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
<button class="btn btn-sm btn-primary dropdown-toggle py-1 px-2.5" type="button" data-bs-toggle="dropdown" aria-expanded="false">
<i class="uil-question-circle me-1"></i> Panduan
</button>
<ul class="dropdown-menu dropdown-menu-end">
<ul class="dropdown-menu dropdown-menu-end shadow-sm">
<li>
<a class="dropdown-item" href="#" id="start-tour-btn">
<i class="uil-clipboard-notes me-2"></i> Panduan Verifikasi SK
@@ -148,13 +162,13 @@
</div>
</div>
<div class="card border">
<div class="card-body">
<div class="card border mb-3 shadow-2xs">
<div class="card-body py-2.5 px-3">
<div class="table-responsive">
<table class="table table-sm">
<table class="table table-sm align-middle mb-0" style="font-size: 13.5px;">
<!-- ID SK -->
<tr>
<th>ID SK</th>
<th style="width: 160px;">ID SK</th>
<td class="text-primary fw-bold">{{ $sk['id'] }}</td>
</tr>
@@ -162,8 +176,7 @@
<tr>
<th>Tentang</th>
<td>
<textarea class="form-control" name="tentang" id="tentang" cols="30" rows="3" readonly>{{ $sk['tentang'] }}
</textarea>
<textarea class="form-control form-control-sm" name="tentang" id="tentang" rows="2" readonly style="font-size: 13px; resize: vertical;">{{ trim($sk['tentang']) }}</textarea>
</td>
</tr>
@@ -225,7 +238,7 @@
<tr>
<th>Catatan</th>
<td>
<textarea class="form-control" name="catatan" id="catatanReadonly" cols="30" rows="3" readonly>{{ $note->note ?? 'Tidak ada catatan' }}</textarea>
<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
@@ -363,18 +376,19 @@
$kegiatan['selected'] ?? null,
);
@endphp
<div class="card border">
<div class="card-header bg-primary text-white" style="padding-bottom: 0px;">
<h4 class="mb-3">Daftar Anggota - {{ ucfirst($key) }} | {{ $selectedKategori['uraian'] ?? 'Null' }}
</h4>
<div class="card border mb-3 shadow-2xs">
<div class="card-header bg-primary text-white py-2 px-3 d-flex align-items-center">
<h5 class="m-0 text-white fw-bold fs-6">
<i class="uil-users-alt me-1.5"></i> Daftar Anggota - {{ ucfirst($key) }} | {{ $selectedKategori['uraian'] ?? 'Belum Dipilih' }}
</h5>
</div>
<div class="card-body">
<div class="card-body py-2.5 px-3">
@can('Verifikasi SK')
<div class="row">
<!-- Kategori Anggota Pertama -->
@if ($sk['visible'] ?? true)
<div class="col-12 tour-kategori-container">
<h5>Kategori Rubrik</h5>
<div class="col-12 tour-kategori-container mb-2">
<label class="form-label fw-bold mb-1" style="font-size: 13.5px; color: #1e293b;">Kategori Rubrik</label>
<select name="kategori" id="kategori-{{ $loop->iteration }}"
data-kategori="{{ str_replace('/', '-', str_replace(')', '', str_replace('(', '-', str_replace(' ', '-', $key)))) }}"
class="form-select select2 kategori-select" data-toggle="select2"
@@ -479,8 +493,7 @@
</div>
</div>
</th>
<th>NIP</th>
<th>Nama</th>
<th>Pegawai</th>
<th>Jabatan Tambahan</th>
<th>Posisi</th>
<th>Rubrik</th>
@@ -498,38 +511,35 @@
<!-- Fixed Floating Action Bar -->
@if ($sk['visible'] ?? true)
<div id="floatingActionBarBackdrop"
style="display:none; position:fixed; bottom:0; left:0; right:0; height:140px; z-index:1049;
background:linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 100%);
pointer-events:none;"></div>
<div id="floatingActionBarBackdrop" style="display:none; pointer-events:none;"></div>
<div id="floatingActionBar"
style="display:none; position:fixed; bottom:52px; left:50%; transform:translateX(-50%); z-index:1050;
background:#ffffff; border:1px solid #dee2e6; border-radius:8px;
padding:10px 20px; box-shadow:0 8px 32px rgba(0,0,0,0.15);
white-space:nowrap;">
<div class="d-flex align-items-center gap-2">
<span class="text-dark fw-semibold me-2">
<i class="uil-check-circle text-primary"></i>
<span id="floatingSelectedCount">0</span> anggota dipilih
style="display:none; position:fixed; bottom:28px; left:50%; transform:translateX(-50%); z-index:1050;
background:#ffffff; border:1px solid #cbd5e1; border-radius:50px;
padding:8px 20px; box-shadow:0 12px 32px -4px rgba(15,23,42,0.28), 0 4px 12px rgba(15,23,42,0.12);
white-space:nowrap; max-width:calc(100vw - 32px); overflow-x:auto;">
<div class="d-flex align-items-center gap-2 flex-nowrap">
<span class="text-dark fw-semibold me-2 d-inline-flex align-items-center gap-1.5">
<i class="uil-check-circle text-primary fs-5"></i>
<span><span id="floatingSelectedCount" class="fw-bold">0</span> anggota dipilih</span>
</span>
@if (!$sk['finalisasi'] && !$sk['status_verifikator'])
<button type="button" class="btn btn-sm {{ $beritaAcaraUploaded ? 'btn-outline-secondary' : 'btn-outline-purple' }} posisi-multiple-btn">
<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> Ubah Posisi
</button>
@endif
@if ($sk['status_verifikator'])
<button type="button" class="btn btn-sm {{ $beritaAcaraUploaded ? 'btn-outline-secondary' : 'btn-outline-success' }} jangka-waktu-multiple-btn">
<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> Ubah Jangka Waktu
</button>
@endif
@can('Hapus Anggota SK')
<button type="button" class="btn btn-sm {{ $beritaAcaraUploaded ? 'btn-outline-secondary' : 'btn-outline-danger' }} hapus-multiple-btn">
<button type="button" class="btn btn-sm {{ $beritaAcaraUploaded ? 'btn-outline-secondary' : 'btn-outline-danger' }} hapus-multiple-btn rounded-pill px-3">
<i class="uil-trash-alt"></i> Hapus Anggota
</button>
@endcan
<span style="width:1px; height:20px; background:#dee2e6; display:inline-block;"></span>
<button type="button" class="btn btn-sm btn-link text-muted deselect-all-btn px-0">
<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">
<i class="uil-times-circle"></i> Batal Pilih
</button>
</div>
@@ -1194,6 +1204,7 @@
$('.ni-sk').addClass('badge-primary-lighten');
$('.li-sk').addClass('show');
$('.{{ $sidebarClass }}').addClass('active badge-primary-lighten');
$('.{{ $sidebarClass }} > a').addClass('active');
</script>
<script>
@@ -1211,6 +1222,22 @@
var unitId = new URLSearchParams(window.location.search).get('unit_id') || '';
console.log('Unit ID dari URL:', unitId);
function renderJenisPegawaiTag(jenis) {
var config = {
'dosen': { color: 'var(--ct-primary, #2563eb)', rgb: '37, 99, 235', icon: 'uil-user-graduate' },
'tendik': { color: '#fd7e14', rgb: '253, 126, 20', icon: 'uil-briefcase-alt' }
};
var normalizedJenis = (jenis || '').toString().toLowerCase().trim();
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%); font-size: 11px;"><i class="' + c.icon +
'"></i> ' + normalizedJenis.toUpperCase() + '</small>';
}
var kegiatanKeys = @json(array_keys($kegiatans));
kegiatanKeys.forEach(function(key, index) {
@@ -1230,38 +1257,49 @@
columns: [{
data: 'checkbox',
name: 'checkbox',
className: 'text-center',
className: 'text-center align-middle',
orderable: false,
searchable: false
},
{
data: 'nip',
name: 'nip',
className: 'text-center'
searchable: false,
width: '40px'
},
{
data: 'nama',
name: 'nama',
className: 'nama-col align-middle',
orderable: true,
searchable: true
searchable: true,
render: function(data, type, row) {
if (type !== 'display') { return data; }
var nama = data || '-';
var nip = row.nip || '-';
var tag = renderJenisPegawaiTag(row.jenis_pegawai);
return '<div>' +
'<div class="fw-semibold text-truncate" title="' + nama + '">' + nama + '</div>' +
'<div class="text-muted small font-monospace">' + nip + '</div>' +
(tag ? '<div class="mt-1">' + tag + '</div>' : '') +
'</div>';
}
},
{
data: 'jtt',
name: 'jtt',
width: '100px'
className: 'align-middle',
width: '120px'
},
{
data: 'posisi',
name: 'posisi'
name: 'posisi',
className: 'align-middle'
},
{
data: 'rubrik_id',
name: 'rubrik_id'
name: 'rubrik_id',
className: 'align-middle'
},
{
data: 'jangka_waktu',
name: 'jangka_waktu',
className: 'text-center'
className: 'text-center align-middle'
},
],
language: {
@@ -2688,17 +2726,25 @@ $('#btnKonfirmasiBatalkan').on('click', function() {
return $('table[id^="anggota-sk-"] td input[type=checkbox]:checked').not('.select-all');
}
function isTopBtnsInView() {
var sentinel = document.getElementById('top-action-btns');
if (!sentinel) return false;
var rect = sentinel.getBoundingClientRect();
var topbar = document.getElementById('main-topbar');
var topbarBottom = topbar ? topbar.getBoundingClientRect().bottom : 64;
return rect.bottom > topbarBottom && rect.top < (window.innerHeight || document.documentElement.clientHeight);
}
var topBtnsVisible = true;
function updateFloatingBarVisibility() {
var count = getSelectedCheckboxes().length;
$('#floatingSelectedCount').text(count);
topBtnsVisible = isTopBtnsInView();
if (count > 0 && !topBtnsVisible) {
$('#floatingActionBarBackdrop').fadeIn(200);
$('#floatingActionBar').fadeIn(200);
$('#floatingActionBar, #floatingActionBarBackdrop').stop(true, true).fadeIn(150);
} else {
$('#floatingActionBar').fadeOut(200);
$('#floatingActionBarBackdrop').fadeOut(200);
$('#floatingActionBar, #floatingActionBarBackdrop').stop(true, true).fadeOut(150);
}
}
@@ -2708,14 +2754,25 @@ $('#btnKonfirmasiBatalkan').on('click', function() {
updateFloatingBarVisibility();
}
// IntersectionObserver: show floating bar when top action buttons scroll out of view
$(document).ready(function() {
$('#floatingActionBar, #floatingActionBarBackdrop').appendTo('body');
updateButtonCount();
});
// Listener scroll global (useCapture: true menangkap scroll di container mana pun, termasuk SimpleBar & window)
window.addEventListener('scroll', updateFloatingBarVisibility, true);
document.addEventListener('scroll', updateFloatingBarVisibility, true);
// IntersectionObserver tambahan dengan offset topbar 64px
(function () {
var sentinel = document.getElementById('top-action-btns');
if (!sentinel) { topBtnsVisible = false; return; }
if (!sentinel) return;
var observer = new IntersectionObserver(function (entries) {
topBtnsVisible = entries[0].isIntersecting;
updateFloatingBarVisibility();
}, { threshold: 0 });
}, {
rootMargin: '-64px 0px 0px 0px',
threshold: [0, 0.1, 0.5, 1]
});
observer.observe(sentinel);
})();
@@ -2985,15 +3042,18 @@ $('#btnKonfirmasiBatalkan').on('click', function() {
}
#tour-popover {
position: fixed; background: #fff; border-radius: 12px;
padding: 20px; width: 340px;
padding: 18px 20px; width: 350px; max-width: calc(100vw - 28px);
box-sizing: border-box;
box-shadow: 0 10px 40px rgba(0,0,0,0.25);
z-index: 9992; font-family: inherit;
transition: top 0.15s ease-out, left 0.15s ease-out;
}
.tour-step-info { font-size: 12px; color: #6c757d; margin-bottom: 6px; font-weight: 500; }
.tour-title { font-size: 15px; font-weight: 700; color: #1a1a1a; margin-bottom: 8px; }
.tour-text { font-size: 13px; color: #555; line-height: 1.55; margin-bottom: 16px; }
.tour-nav { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tour-nav .btn { white-space: nowrap; }
.tour-text { font-size: 13px; color: #555; line-height: 1.55; margin-bottom: 16px; word-break: break-word; }
.tour-nav { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.tour-nav-buttons { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tour-nav .btn { white-space: nowrap; font-size: 13px; padding: 5px 12px; }
.tour-close-btn {
position: absolute; top: 12px; right: 14px;
background: none; border: none; font-size: 20px;
@@ -3041,6 +3101,13 @@ $('#btnKonfirmasiBatalkan').on('click', function() {
#tour-overlay { animation: tour-overlay-in 0.25s ease forwards; }
#tour-popover { animation: tour-pop-in 0.22s ease forwards; }
#tour-highlight.first-show { animation: tour-highlight-in 0.25s ease forwards; }
.btn-pulse {
animation: tour-btn-glow 1s ease-in-out infinite alternate;
}
@keyframes tour-btn-glow {
from { box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.7); transform: scale(1); }
to { box-shadow: 0 0 0 6px rgba(13, 110, 253, 0); transform: scale(1.04); }
}
`;
document.head.appendChild(styleEl);
}
@@ -3268,6 +3335,60 @@ $('#btnKonfirmasiBatalkan').on('click', function() {
});
}
function getTargetRect(step) {
if (!step || !step.element) return null;
var $el = $(step.element);
if (!$el.length) return null;
if (step.colHighlight) {
var $firstTable = $el.first().closest('table');
var $cells = $el.filter(function () {
return $(this).closest('table').is($firstTable);
});
var top = Infinity, left = Infinity, right = -Infinity, bottom = -Infinity;
var found = false;
$cells.each(function () {
var b = this.getBoundingClientRect();
if (b.width === 0 && b.height === 0) return;
found = true;
top = Math.min(top, b.top);
left = Math.min(left, b.left);
right = Math.max(right, b.right);
bottom = Math.max(bottom, b.bottom);
});
if (found) {
return { top: top, left: left, width: right - left, height: bottom - top, bottom: bottom, right: right };
}
}
var b = $el[0].getBoundingClientRect();
if (b.width === 0 && b.height === 0) return null;
return { top: b.top, left: b.left, width: b.width, height: b.height, bottom: b.bottom, right: b.right };
}
function updateTourPosition() {
if (!$popover || !$popover.is(':visible') || !activeSteps.length) return;
var step = activeSteps[currentStep];
if (!step) return;
var rect = getTargetRect(step);
if (rect) {
var pad = 6;
$highlight.removeClass('no-target').css({
display : 'block',
top : (rect.top - pad) + 'px',
left : (rect.left - pad) + 'px',
width : (rect.width + pad * 2) + 'px',
height : (rect.height + pad * 2) + 'px'
});
} else {
$highlight.removeClass('pulse').addClass('no-target').css({
display: 'block', width: 0, height: 0, top: '50%', left: '50%'
});
}
positionPopover(rect);
}
function createElements() {
$('body').append(
'<div id="tour-overlay"></div>' +
@@ -3278,9 +3399,14 @@ $('#btnKonfirmasiBatalkan').on('click', function() {
$highlight = $('#tour-highlight');
$popover = $('#tour-popover');
$overlay.on('click', end);
$(window).on('resize.sktour scroll.sktour', function () {
updateTourPosition();
});
}
function destroyElements() {
$(window).off('resize.sktour scroll.sktour');
if (checkInterval) { clearInterval(checkInterval); checkInterval = null; }
if ($highlight) { $highlight.css('transition', ''); }
updateFloatingBarVisibility();
@@ -3334,7 +3460,7 @@ $('#btnKonfirmasiBatalkan').on('click', function() {
}
function doRender(retries) {
var rect = $el.length ? $el[0].getBoundingClientRect() : null;
var rect = getTargetRect(step);
if ((!rect || rect.width === 0) && retries > 0) {
setTimeout(function () { doRender(retries - 1); }, 150);
return;
@@ -3343,27 +3469,10 @@ $('#btnKonfirmasiBatalkan').on('click', function() {
$el[0].scrollIntoView({ behavior: 'instant', block: 'center' });
}
setTimeout(function () {
var r;
if (step.colHighlight && $el.length > 0) {
// Hanya ambil elemen dari tabel PERTAMA yang ditemukan
var $firstTable = $el.first().closest('table');
var $cells = $el.filter(function () {
return $(this).closest('table').is($firstTable);
});
var top = Infinity, left = Infinity, right = -Infinity, bottom = -Infinity;
$cells.each(function () {
var b = this.getBoundingClientRect();
if (b.width === 0) { return; }
top = Math.min(top, b.top);
left = Math.min(left, b.left);
right = Math.max(right, b.right);
bottom = Math.max(bottom, b.bottom);
});
r = { top: top, left: left, width: right - left, height: bottom - top, bottom: bottom };
} else {
r = $el.length ? $el[0].getBoundingClientRect() : null;
var r = getTargetRect(step);
if (!r || r.width === 0) {
r = { top: window.innerHeight/2-50, left: window.innerWidth/2-170, width: 340, height: 100, bottom: window.innerHeight/2+50 };
}
if (!r || r.width === 0) { r = { top: window.innerHeight/2-50, left: window.innerWidth/2-170, width: 340, height: 100, bottom: window.innerHeight/2+50 }; }
var pad = 6;
var wasHidden = $highlight.css('display') === 'none';
$highlight.removeClass('no-target pulse').css({
@@ -3411,8 +3520,6 @@ $('#btnKonfirmasiBatalkan').on('click', function() {
function renderPopover(step, rect) {
var isFirst = currentStep === 0;
var isLast = currentStep === activeSteps.length - 1;
var elExists = step.element ? $(step.element).length > 0 : false;
var isBlocked = (step.requireCheck || step.waitForClick || step.requireSelect) && elExists;
var dots = activeSteps.map(function (_, i) {
return '<div class="dot' + (i === currentStep ? ' active' : '') + '"></div>';
@@ -3420,7 +3527,7 @@ $('#btnKonfirmasiBatalkan').on('click', function() {
var nextBtn = isLast
? '<button class="btn btn-sm btn-success" id="tour-finish-btn"><i class="uil-check"></i> Selesai</button>'
: '<button class="btn btn-sm btn-primary" id="tour-next-btn" ' + (isBlocked ? 'disabled' : '') + '>Berikutnya <i class="uil-arrow-right"></i></button>';
: '<button class="btn btn-sm btn-primary" id="tour-next-btn">Berikutnya <i class="uil-arrow-right"></i></button>';
$popover.html(
'<button class="tour-close-btn" id="tour-close-btn">&times;</button>' +
@@ -3430,7 +3537,7 @@ $('#btnKonfirmasiBatalkan').on('click', function() {
'<div class="tour-text">' + step.text + '</div>' +
'<div class="tour-nav">' +
'<button class="btn btn-sm btn-outline-secondary" id="tour-skip-btn">Lewati</button>' +
'<div class="d-flex gap-2">' +
'<div class="tour-nav-buttons">' +
(!isFirst ? '<button class="btn btn-sm btn-outline-primary" id="tour-prev-btn"><i class="uil-arrow-left"></i> Kembali</button>' : '') +
nextBtn +
'</div>' +
@@ -3455,7 +3562,8 @@ $('#btnKonfirmasiBatalkan').on('click', function() {
checkInterval = setInterval(function () {
if (!$('#tour-overlay').length) { clearInterval(checkInterval); return; }
if ($('table[id^="anggota-sk-"] td input[type=checkbox]:checked').length > 0) {
$('#tour-next-btn').prop('disabled', false);
// Indikasi visual bahwa anggota sudah dipilih
$('#tour-next-btn').addClass('btn-pulse');
clearInterval(checkInterval);
checkInterval = null;
}
@@ -3464,7 +3572,6 @@ $('#btnKonfirmasiBatalkan').on('click', function() {
if (step.requireSelect) {
if (checkInterval) { clearInterval(checkInterval); }
// Nonaktifkan transisi highlight agar perluasan terasa real-time
$highlight.css('transition', 'none');
checkInterval = setInterval(function () {
if (!$('#tour-overlay').length) { clearInterval(checkInterval); return; }
@@ -3486,39 +3593,39 @@ $('#btnKonfirmasiBatalkan').on('click', function() {
$highlight.css({ top: (cR.top - pad) + 'px', left: (cR.left - pad) + 'px', width: (cR.width + pad * 2) + 'px', height: (cR.height + pad * 2) + 'px' });
}
}
// Cek apakah kategori sudah dipilih
var selected = $('.kategori-select').filter(function () {
var v = $(this).val();
return v !== null && v !== '' && v !== undefined;
}).length > 0;
if (selected) {
$('#tour-next-btn').prop('disabled', false);
} else {
$('#tour-next-btn').prop('disabled', true);
}
}, 80);
}
}
function positionPopover(rect) {
var pw = 340, ph = $popover.outerHeight() || 200;
if (!$popover || !$popover.length) { return; }
var pw = $popover.outerWidth() || 350;
var ph = $popover.outerHeight() || 200;
var vw = window.innerWidth, vh = window.innerHeight, pad = 14;
var top, left;
if (!rect) {
top = (vh - ph) / 2;
left = (vw - pw) / 2;
} else {
if (rect.bottom + pad + ph < vh) {
// Posisi vertikal: preferensi di bawah elemen, lalu di atas elemen, jika tidak muat di tengah
if (rect.bottom + pad + ph <= vh) {
top = rect.bottom + pad;
} else if (rect.top - pad - ph > 0) {
} else if (rect.top - pad - ph >= 0) {
top = rect.top - pad - ph;
} else {
top = Math.max(pad, (vh - ph) / 2);
top = (vh - ph) / 2;
}
left = rect.left + (rect.width / 2) - (pw / 2);
left = Math.max(pad, Math.min(left, vw - pw - pad));
}
// Strict clamping ke viewport browser agar popover tidak pernah terpotong atau hilang
var maxLeft = Math.max(pad, vw - pw - pad);
var maxTop = Math.max(pad, vh - ph - pad);
left = Math.max(pad, Math.min(left, maxLeft));
top = Math.max(pad, Math.min(top, maxTop));
$popover.css({ top: top + 'px', left: left + 'px' });
}
@@ -29,9 +29,9 @@
}
#diterima thead th {
background: linear-gradient(135deg, #2080f5 0%, #0166d2 100%) !important;
background: #2563eb !important; background-color: #2563eb !important;
color: #fff !important;
border-color: #0166d2 !important;
border-color: #2563eb !important;
white-space: nowrap;
}
@@ -24,9 +24,9 @@
}
#ditolak thead th {
background: linear-gradient(135deg, #2080f5 0%, #0166d2 100%) !important;
background: #2563eb !important; background-color: #2563eb !important;
color: #fff !important;
border-color: #0166d2 !important;
border-color: #2563eb !important;
white-space: nowrap;
}
@@ -9,9 +9,9 @@
#table-belum-diklaim thead th,
#table-sudah-diklaim thead th {
background: linear-gradient(135deg, #2080f5 0%, #0166d2 100%) !important;
background: #2563eb !important; background-color: #2563eb !important;
color: #fff !important;
border-color: #0166d2 !important;
border-color: #2563eb !important;
white-space: nowrap;
}
@@ -24,9 +24,9 @@
}
#perlu-perbaikan thead th {
background: linear-gradient(135deg, #2080f5 0%, #0166d2 100%) !important;
background: #2563eb !important; background-color: #2563eb !important;
color: #fff !important;
border-color: #0166d2 !important;
border-color: #2563eb !important;
white-space: nowrap;
}
@@ -24,9 +24,9 @@
}
#sudah-diperbaiki thead th {
background: linear-gradient(135deg, #2080f5 0%, #0166d2 100%) !important;
background: #2563eb !important; background-color: #2563eb !important;
color: #fff !important;
border-color: #0166d2 !important;
border-color: #2563eb !important;
white-space: nowrap;
}
@@ -24,9 +24,9 @@
}
#pegawais thead th {
background: linear-gradient(135deg, #2080f5 0%, #0166d2 100%) !important;
background: #2563eb !important; background-color: #2563eb !important;
color: #fff !important;
border-color: #0166d2 !important;
border-color: #2563eb !important;
white-space: normal;
}
@@ -151,7 +151,7 @@
aria-hidden="true" data-bs-backdrop="static" data-bs-keyboard="false">
<div class="modal-dialog modal-lg modal-dialog-centered">
<div class="modal-content">
<div class="modal-header border-0" style="background: linear-gradient(135deg, #2080f5 0%, #0166d2 100%);">
<div class="modal-header border-0" style="background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);">
<h5 class="modal-title text-white" id="modalTambahMatkulLabel">
<i class="uil-plus me-1"></i> Tambah Mata Kuliah
</h5>
@@ -292,32 +292,30 @@
</div>
<!-- Floating Action Bar Backdrop -->
<div id="floatingActionBarBackdrop"
style="display:none; position:fixed; bottom:0; left:0; right:0; height:140px; z-index:1049;
background:linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 100%);
pointer-events:none;"></div>
<div id="floatingActionBarBackdrop" style="display:none; pointer-events:none;"></div>
<!-- Floating Action Bar -->
<div id="floatingActionBar"
style="display:none; position:fixed; bottom:52px; left:50%; transform:translateX(-50%); z-index:1050;
background:#ffffff; border:1px solid #dee2e6; border-radius:8px;
padding:10px 20px; box-shadow:0 8px 32px rgba(0,0,0,0.15); white-space:nowrap;">
<div class="d-flex align-items-center gap-2">
<span class="text-dark fw-semibold me-2">
<i class="uil-check-circle text-primary"></i>
<span id="floatingSelectedCount">0</span> mata kuliah dipilih
style="display:none; position:fixed; bottom:28px; left:50%; transform:translateX(-50%); z-index:1050;
background:#ffffff; border:1px solid #cbd5e1; border-radius:50px;
padding:8px 20px; box-shadow:0 12px 32px -4px rgba(15,23,42,0.28), 0 4px 12px rgba(15,23,42,0.12);
white-space:nowrap; max-width:calc(100vw - 32px); overflow-x:auto;">
<div class="d-flex align-items-center gap-2 flex-nowrap">
<span class="text-dark fw-semibold me-2 d-inline-flex align-items-center gap-1.5">
<i class="uil-check-circle text-primary fs-5"></i>
<span><span id="floatingSelectedCount" class="fw-bold">0</span> mata kuliah dipilih</span>
</span>
<button type="button" class="btn btn-sm btn-outline-primary" id="btnDetailSelected">
<button type="button" class="btn btn-sm btn-outline-primary rounded-pill px-3" id="btnDetailSelected">
<i class="uil-eye"></i> Detail
</button>
<button type="button" class="btn btn-sm btn-outline-warning" id="btnEditSelected">
<button type="button" class="btn btn-sm btn-outline-warning rounded-pill px-3" id="btnEditSelected">
<i class="uil-edit"></i> Edit
</button>
<button type="button" class="btn btn-sm btn-outline-danger" id="btnHapusSelected">
<button type="button" class="btn btn-sm btn-outline-danger rounded-pill px-3" id="btnHapusSelected">
<i class="uil-trash-alt"></i> Hapus
</button>
<span style="width:1px; height:20px; background:#dee2e6; display:inline-block;"></span>
<button type="button" class="btn btn-sm btn-link text-muted px-0" id="btnBatalPilih">
<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 px-1 text-decoration-none hover:text-danger" id="btnBatalPilih">
<i class="uil-times-circle"></i> Batal Pilih
</button>
</div>
@@ -485,7 +483,7 @@
<div class="modal-dialog modal-lg modal-dialog-scrollable">
<div class="modal-content">
<div class="modal-header border-0 pb-3"
style="background: linear-gradient(135deg, #2080f5 0%, #0166d2 100%);">
style="background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);">
<div>
<h5 class="modal-title text-white mb-1" id="modalDetailMatkulLabel">
<i class="uil-book-open me-1"></i> Detail Mata Kuliah
@@ -653,6 +651,7 @@
});
$(document).ready(function() {
$('#floatingActionBar, #floatingActionBarBackdrop').appendTo('body');
// Load fakultas untuk filter tabel + modal tambah
$.ajax({
url: "{{ route('tri-dharma.mata-kuliah.get-fakultas') }}",
@@ -163,7 +163,7 @@
aria-hidden="true" data-bs-backdrop="static" data-bs-keyboard="false">
<div class="modal-dialog modal-lg modal-dialog-centered">
<div class="modal-content">
<div class="modal-header border-0" style="background: linear-gradient(135deg, #2080f5 0%, #0166d2 100%);">
<div class="modal-header border-0" style="background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);">
<h5 class="modal-title text-white" id="modalTambahMatkulLabel">
<i class="uil-plus me-1"></i> Tambah Mata Kuliah
</h5>
@@ -33,9 +33,9 @@
}
.tab-content .table thead th {
background: linear-gradient(135deg, #2080f5 0%, #0166d2 100%) !important;
background: #2563eb !important; background-color: #2563eb !important;
color: #fff !important;
border-color: #0166d2 !important;
border-color: #2563eb !important;
}
</style>
@endsection
@@ -11,9 +11,9 @@
}
#pegawai-table thead th {
background: linear-gradient(135deg, #2080f5 0%, #0166d2 100%) !important;
background: #2563eb !important; background-color: #2563eb !important;
color: #fff !important;
border-color: #0166d2 !important;
border-color: #2563eb !important;
}
#pegawai-table tbody tr:hover > * {
@@ -33,9 +33,9 @@
}
.tab-content .table thead th {
background: linear-gradient(135deg, #2080f5 0%, #0166d2 100%) !important;
background: #2563eb !important; background-color: #2563eb !important;
color: #fff !important;
border-color: #0166d2 !important;
border-color: #2563eb !important;
}
</style>
@endsection
@@ -11,9 +11,9 @@
}
#pegawai-table thead th {
background: linear-gradient(135deg, #2080f5 0%, #0166d2 100%) !important;
background: #2563eb !important; background-color: #2563eb !important;
color: #fff !important;
border-color: #0166d2 !important;
border-color: #2563eb !important;
}
#pegawai-table tbody tr:hover > * {