Files
verifikator/resources/views/layouts/main.blade.php
T

1485 lines
60 KiB
PHP

<!DOCTYPE html>
<html lang="en">
<head>
@include('layouts.header')
@yield('css')
<style>
/* ===== Styled DataTable & App Table Headers ===== */
.dt-styled td, .dt-styled th,
table.dataTable td, table.dataTable th,
.table-bordered td, .table-bordered th,
.table td, .table th {
border-color: #ced4da !important;
vertical-align: middle;
}
.dt-styled thead th,
table.dataTable thead th,
.table thead th,
.tab-content .table thead th,
#table-belum-selesai thead th,
#table-selesai thead th,
.dt-styled thead th.sorting,
.dt-styled thead th.sorting_asc,
.dt-styled thead th.sorting_desc,
.dt-styled thead th.sorting_asc_disabled,
.dt-styled thead th.sorting_desc_disabled,
.dt-styled thead th.font-monospace,
.dt-styled thead th.nip-col,
.dt-styled thead th.nominal-cell {
background: #2563eb !important;
background-color: #2563eb !important;
color: #fff !important;
white-space: nowrap;
border-color: #2563eb !important;
}
.dt-styled thead th.sorting:before,
.dt-styled thead th.sorting:after,
.dt-styled thead th.sorting_asc:before,
.dt-styled thead th.sorting_asc:after,
.dt-styled thead th.sorting_desc:before,
.dt-styled thead th.sorting_desc:after,
.dt-styled thead th.sorting_asc_disabled:before,
.dt-styled thead th.sorting_asc_disabled:after,
.dt-styled thead th.sorting_desc_disabled:before,
.dt-styled thead th.sorting_desc_disabled:after {
color: #fff !important;
}
/* ===== Modern Rounded Pagination ===== */
.dataTables_paginate ul.pagination,
.dataTables_wrapper .pagination,
.pagination {
display: inline-flex !important;
align-items: center !important;
gap: 5px !important;
margin: 6px 0 !important;
padding: 0 !important;
flex-wrap: wrap !important;
}
.dataTables_paginate ul.pagination .page-item,
.dataTables_wrapper .pagination .page-item,
.pagination .page-item {
margin: 0 !important;
}
.dataTables_paginate ul.pagination .page-link,
.dataTables_wrapper .pagination .page-link,
.pagination .page-link {
border-radius: 8px !important;
margin: 0 !important;
border: 1px solid #e2e8f0 !important;
background-color: #ffffff !important;
color: #475569 !important;
font-weight: 600 !important;
font-size: 13px !important;
min-width: 34px !important;
height: 34px !important;
padding: 0 10px !important;
display: inline-flex !important;
align-items: center !important;
justify-content: center !important;
transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
cursor: pointer !important;
}
.dataTables_paginate ul.pagination .page-link:hover,
.dataTables_wrapper .pagination .page-link:hover,
.pagination .page-link:hover {
background-color: #f1f5f9 !important;
border-color: #cbd5e1 !important;
color: #2563eb !important;
transform: translateY(-1px);
box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08) !important;
}
.dataTables_paginate ul.pagination .page-item.active .page-link,
.dataTables_wrapper .pagination .page-item.active .page-link,
.pagination .page-item.active .page-link {
background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
border-color: #2563eb !important;
color: #ffffff !important;
font-weight: 700 !important;
box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
transform: translateY(-1px);
}
.dataTables_paginate ul.pagination .page-item.disabled .page-link,
.dataTables_wrapper .pagination .page-item.disabled .page-link,
.pagination .page-item.disabled .page-link {
background-color: #f8fafc !important;
border-color: #e2e8f0 !important;
color: #94a3b8 !important;
opacity: 0.65 !important;
cursor: not-allowed !important;
transform: none !important;
box-shadow: none !important;
}
.dataTables_wrapper .dataTables_info {
color: #475569 !important;
font-size: 13px !important;
font-weight: 500 !important;
padding-top: 8px !important;
}
/* Nav Pills / Status Tabs & Smooth Switch Animation */
@keyframes tabPaneFadeInUp {
0% {
opacity: 0;
transform: translateY(12px);
}
100% {
opacity: 1;
transform: none;
}
}
@keyframes tabNavActivePulse {
0% {
transform: scale(0.96);
}
60% {
transform: scale(1.02);
}
100% {
transform: none;
}
}
.nav-pills .nav-link,
.nav-tabs .nav-link {
transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
cursor: pointer !important;
position: relative;
}
.nav-pills .nav-link:active,
.nav-tabs .nav-link:active {
transform: scale(0.97) !important;
}
.nav-pills .nav-link:hover:not(.active),
.nav-tabs .nav-link:hover:not(.active) {
background-color: #f1f5f9 !important;
color: #2563eb !important;
transform: translateY(-1px);
}
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link,
.nav-tabs .nav-link.active {
background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
background-color: #2563eb !important;
color: #fff !important;
box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25) !important;
animation: tabNavActivePulse 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}
/* Animasi Tab Panes Masuk Ketika Tab Berpindah (Semua Halaman) */
.tab-content > .tab-pane.active,
.tab-content > .tab-pane.tab-animating,
.tab-pane.active,
.tab-pane.tab-animating {
animation: tabPaneFadeInUp 0.32s cubic-bezier(0.16, 1, 0.3, 1) both !important;
}
/* ===== Responsive Mobile DataTables Controls (2 Columns: Length & Search) ===== */
@media (max-width: 767.98px) {
.dataTables_wrapper > .row:first-child,
.dataTables_wrapper > div.row:first-of-type,
div.dataTables_wrapper div.row:first-child {
display: flex !important;
flex-direction: row !important;
flex-wrap: nowrap !important;
align-items: center !important;
justify-content: space-between !important;
gap: 8px !important;
margin-left: 0 !important;
margin-right: 0 !important;
margin-bottom: 12px !important;
padding: 0 !important;
}
/* Kolom Kiri: Show entries / Length dropdown */
.dataTables_wrapper > .row:first-child > div:first-child,
.dataTables_wrapper > div.row:first-of-type > div:first-child,
.dataTables_wrapper > .row:first-child > div:has(.dataTables_length),
div.dataTables_wrapper div.dataTables_length {
width: auto !important;
max-width: none !important;
flex: 0 0 auto !important;
padding: 0 !important;
margin: 0 !important;
text-align: left !important;
}
/* Kolom Kanan: Search / Filter input */
.dataTables_wrapper > .row:first-child > div:last-child,
.dataTables_wrapper > div.row:first-of-type > div:last-child,
.dataTables_wrapper > .row:first-child > div:has(.dataTables_filter),
div.dataTables_wrapper div.dataTables_filter {
width: auto !important;
max-width: none !important;
flex: 1 1 auto !important;
min-width: 0 !important;
padding: 0 !important;
margin: 0 !important;
text-align: right !important;
}
/* Hilangkan teks 'Show' & 'entries' pada label, tampilkan hanya select dropdown box */
div.dataTables_wrapper div.dataTables_length label {
font-size: 0 !important;
color: transparent !important;
line-height: 0 !important;
margin: 0 !important;
padding: 0 !important;
display: inline-flex !important;
align-items: center !important;
}
div.dataTables_wrapper div.dataTables_length select {
font-size: 13.5px !important;
line-height: 1.4 !important;
font-weight: 500 !important;
color: #1e293b !important;
margin: 0 !important;
padding: 6px 30px 6px 12px !important;
border: 1px solid #cbd5e1 !important;
border-radius: 8px !important;
background-color: #ffffff !important;
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
background-repeat: no-repeat !important;
background-position: right 10px center !important;
background-size: 12px 10px !important;
appearance: none !important;
-webkit-appearance: none !important;
-moz-appearance: none !important;
height: 38px !important;
min-width: 68px !important;
cursor: pointer !important;
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}
div.dataTables_wrapper div.dataTables_length select:focus {
border-color: #2563eb !important;
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
outline: none !important;
}
/* Hilangkan teks 'Search:' pada label, input melebar memenuhi kolom dengan icon search */
div.dataTables_wrapper div.dataTables_filter label {
font-size: 0 !important;
color: transparent !important;
line-height: 0 !important;
margin: 0 !important;
padding: 0 !important;
width: 100% !important;
display: flex !important;
align-items: center !important;
position: relative !important;
}
div.dataTables_wrapper div.dataTables_filter input {
font-size: 13.5px !important;
line-height: 1.4 !important;
color: #1e293b !important;
margin: 0 !important;
padding: 6px 12px 6px 36px !important;
border: 1px solid #cbd5e1 !important;
border-radius: 8px !important;
background-color: #ffffff !important;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z' /%3E%3C/svg%3E") !important;
background-repeat: no-repeat !important;
background-position: 11px center !important;
background-size: 16px 16px !important;
width: 100% !important;
min-width: 0 !important;
height: 38px !important;
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}
div.dataTables_wrapper div.dataTables_filter input:focus {
border-color: #2563eb !important;
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
outline: none !important;
}
}
.dt-styled tbody tr {
cursor: pointer;
}
.dt-styled tbody tr > * {
transition: background-color 0.25s ease;
}
.dt-styled tbody tr:hover > * {
background-color: rgba(13, 110, 253, 0.08) !important;
}
.dt-styled tbody tr:active > * {
background-color: rgba(13, 110, 253, 0.22) !important;
transition: background-color 0s;
}
.dt-styled tbody tr.row-selected > * {
background-color: rgba(13, 110, 253, 0.18) !important;
}
.dt-styled tbody tr.row-selected:hover > * {
background-color: rgba(13, 110, 253, 0.26) !important;
}
.dt-styled thead th .form-check-input {
border-color: rgba(255, 255, 255, 0.7);
cursor: pointer;
margin: 0;
}
.dt-styled tbody .row-checkbox {
cursor: pointer;
}
/* ===== End Styled DataTable ===== */
/* ===== Global Page Loading Cursor ===== */
body.page-loading,
body.page-loading * {
cursor: wait !important;
}
/* ===== End Global Page Loading Cursor ===== */
/* Custom Button Purple Outline */
.btn-outline-purple {
border-color: #6f42c1;
color: #6f42c1;
}
.btn-outline-purple:hover {
background-color: #6f42c1;
border-color: #6f42c1;
color: #fff;
}
.btn-outline-purple:focus,
.btn-outline-purple:active {
background-color: #6f42c1;
border-color: #6f42c1;
color: #fff;
box-shadow: 0 0 0 0.2rem rgba(111, 66, 193, 0.25);
}
/* Team Name Marquee */
.team-name-container {
width: 100%;
overflow: hidden;
position: relative;
}
.team-name-text {
display: inline-block;
white-space: nowrap;
}
.team-name-text.marquee {
animation: marquee 5s ease-in-out 1s infinite alternate;
}
@keyframes marquee {
0% {
transform: translateX(0);
}
100% {
transform: translateX(var(--marquee-distance));
}
}
.tooltip-tolak .tooltip-inner {
max-width: 320px;
text-align: left;
}
/* ===== Sidebar Desktop & Mobile Smooth Drawer Support ===== */
#main-sidebar {
will-change: transform, translate;
transition: transform 0.7s cubic-bezier(0.25, 1, 0.5, 1), translate 0.7s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.7s ease !important;
}
#main-content-wrapper {
transition: padding-left 0.6s cubic-bezier(0.25, 1, 0.5, 1) !important;
}
/* Responsive Mobile Drawer State Handling */
@media (max-width: 1023px) {
#main-sidebar {
transform: translateX(-100%) !important;
translate: none !important;
}
#main-sidebar.mobile-open,
#main-sidebar:not(.-translate-x-full) {
transform: translateX(0) !important;
translate: none !important;
box-shadow: 0 10px 40px -10px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(15, 23, 42, 0.05) !important;
}
}
/* Backdrop with smooth fade in/out transition */
#sidebar-backdrop {
opacity: 0;
visibility: hidden;
pointer-events: none;
transition: opacity 0.7s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.7s ease, backdrop-filter 0.7s ease !important;
will-change: opacity, backdrop-filter;
}
#sidebar-backdrop.active {
opacity: 1 !important;
visibility: visible !important;
pointer-events: auto !important;
}
@media (min-width: 1024px) {
#main-sidebar {
transform: translateX(0) !important;
translate: none !important;
}
body.sidebar-collapsed #main-sidebar {
transform: translateX(-100%) !important;
}
body.sidebar-collapsed #main-content-wrapper {
padding-left: 0 !important;
}
}
/* ===== Modal & Backdrop Stacking Fix ===== */
.modal {
z-index: 1060 !important;
}
.modal-backdrop {
z-index: 1050 !important;
}
/* ===== Page Title Font Size (Kompak & Proporsional) ===== */
.page-title-anim h1,
.app-main-content .page-title-anim h1 {
font-size: 1.25rem !important;
font-weight: 700 !important;
letter-spacing: -0.02em !important;
line-height: 1.35 !important;
margin: 0 !important;
color: #0f172a !important;
}
@media (max-width: 640px) {
.page-title-anim h1,
.app-main-content .page-title-anim h1 {
font-size: 1.125rem !important;
}
}
</style>
</head>
<body data-leftbar-theme="light" class="bg-slate-50 text-slate-800 antialiased font-sans selection:bg-blue-600 selection:text-white">
<!-- Main Application Shell (100% Full Tailwind CSS) -->
<div class="min-h-screen bg-slate-50 flex">
<!-- Sidebar Component -->
@include('layouts.sidebar')
<!-- Mobile Sidebar Backdrop Overlay -->
<div id="sidebar-backdrop" class="fixed inset-0 z-40 bg-slate-900/50 backdrop-blur-xs lg:hidden"></div>
<!-- Main Column Content Wrapper -->
<div id="main-content-wrapper" class="flex-1 flex flex-col min-w-0 min-h-screen transition-all duration-300 lg:pl-64">
<!-- Topbar Header -->
@include('layouts.topbar')
<!-- Main Page Content Body -->
<main class="flex-1 px-3 sm:px-5 pt-2 pb-5 app-main-content">
<!-- Page Title & Breadcrumb Header (Kompak, Rapi, Tanpa Garis Pembatas Sesuai Permintaan) -->
<div class="mb-2 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-1 page-title-anim">
<div>
<h1 class="page-title text-base sm:text-lg font-bold tracking-tight text-slate-900 leading-snug m-0">{{ $title }}</h1>
</div>
<nav class="flex items-center text-xs font-medium text-slate-500">
@yield('breadcrumb')
</nav>
</div>
<div class="page-content-anim">
@yield('content')
@yield('modal')
@yield('modal-alert-blade')
</div>
<!-- Modal Ganti Team (Global) -->
@php
$authUser = Auth::user();
$authUserTeams = $authUser->teams;
@endphp
@if ($authUserTeams->count() > 1)
<div class="modal fade" id="changeTeamModal" tabindex="-1"
aria-labelledby="changeTeamModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header bg-primary text-white">
<h5 class="modal-title" id="changeTeamModalLabel">
<i class="mdi mdi-account-switch me-1"></i>Ganti Team Verifikator
</h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"
aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="alert alert-info mb-3" role="alert">
<i class="mdi mdi-information-outline me-1"></i>
Pilih team yang ingin Anda gunakan. Team aktif saat ini:
<strong>{{ $authUserTeams->where('id', session('team_id'))->first()->nama ?? 'Belum dipilih' }}</strong>
</div>
<div class="mb-3">
<label for="change_team_id" class="form-label">Team <span
class="text-danger">*</span></label>
<select class="form-select select2" id="change_team_id"
name="change_team_id" required data-dropdown-parent="#changeTeamModal"
data-placeholder="Pilih Team...">
<option value=""></option>
@foreach ($authUserTeams as $team)
<option value="{{ $team->id }}"
{{ session('team_id') == $team->id ? 'selected' : '' }}>
{{ $team->nama }}
</option>
@endforeach
</select>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">
<i class="mdi mdi-close me-1"></i>Batal
</button>
<button type="button" class="btn btn-primary" id="btnConfirmChangeTeam">
<i class="mdi mdi-check me-1"></i>Ganti Team
</button>
</div>
</div>
</div>
</div>
@endif
</main>
<!-- Modern Footer -->
<footer class="bg-white border-t border-slate-200 py-3.5 px-3 sm:px-5 sm:pr-48 text-sm text-slate-500 flex items-center">
<span>&copy; {{ date('Y') }} <strong class="text-slate-800">Sistem Verifikator Remunerasi</strong> &bull; Universitas Tanjungpura.</span>
</footer>
</div>
</div>
<!-- WhatsApp Helpdesk Button -->
<div class="whatsapp-helpdesk-wrapper">
<div class="whatsapp-helpdesk-bubble" id="waHelpdeskBubble">
<button class="whatsapp-helpdesk-bubble-close" id="waHelpdeskClose" title="Tutup">&times;</button>
<div class="whatsapp-helpdesk-bubble-header">
<div class="whatsapp-helpdesk-bubble-avatar">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="20" height="20">
<path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"/>
</svg>
</div>
<div>
<div class="whatsapp-helpdesk-bubble-name">Tim Helpdesk</div>
<div class="whatsapp-helpdesk-bubble-status">
<span class="whatsapp-helpdesk-online-dot"></span> Online
</div>
</div>
</div>
<div class="whatsapp-helpdesk-bubble-body">
Halo! Ada yang bisa kami bantu? &#128075;<br>
<span style="font-size:12px; opacity:0.85;">Klik tombol di bawah untuk chat langsung via WhatsApp.</span>
</div>
<div class="whatsapp-helpdesk-bubble-arrow"></div>
</div>
@php
$waName = Auth::user()->name ?? 'Pengguna';
$waText = "Halo Tim Helpdesk Verifikator Universitas Tanjungpura\n\nPerkenalkan, nama saya {$waName}. Saya membutuhkan bantuan terkait aplikasi Verifikator. Mohon informasinya, terima kasih.";
$waUrl = 'https://wa.me/6285845408925?text=' . rawurlencode($waText);
@endphp
<a href="{{ $waUrl }}" target="_blank" rel="noopener noreferrer"
class="whatsapp-helpdesk-btn" title="Hubungi Helpdesk via WhatsApp">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="28" height="28">
<path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"/>
</svg>
<span class="whatsapp-helpdesk-label">Helpdesk</span>
</a>
</div>
<style>
.content-page {
padding-bottom: 90px;
}
.whatsapp-helpdesk-wrapper {
position: fixed;
bottom: 28px;
right: 28px;
z-index: 9999;
display: flex;
flex-direction: column;
align-items: flex-end;
gap: 10px;
pointer-events: none;
}
.whatsapp-helpdesk-wrapper > * {
pointer-events: all;
}
/* Gelembung sapaan */
.whatsapp-helpdesk-bubble {
position: relative;
background: #fff;
border-radius: 12px;
box-shadow: 0 4px 20px rgba(0,0,0,0.15);
padding: 14px 16px 14px 14px;
width: 230px;
opacity: 0;
transform: translateY(10px) scale(0.95);
transform-origin: bottom right;
transition: opacity 0.3s ease, transform 0.3s ease;
pointer-events: none;
}
.whatsapp-helpdesk-bubble.show {
opacity: 1;
transform: translateY(0) scale(1);
pointer-events: auto;
}
.whatsapp-helpdesk-bubble-close {
position: absolute;
top: 6px;
right: 8px;
background: none;
border: none;
font-size: 16px;
line-height: 1;
color: #999;
cursor: pointer;
padding: 0 2px;
}
.whatsapp-helpdesk-bubble-close:hover {
color: #333;
}
.whatsapp-helpdesk-bubble-header {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 10px;
}
.whatsapp-helpdesk-bubble-avatar {
background-color: #25D366;
color: #fff;
border-radius: 50%;
width: 38px;
height: 38px;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.whatsapp-helpdesk-bubble-name {
font-weight: 700;
font-size: 13px;
color: #111;
}
.whatsapp-helpdesk-bubble-status {
font-size: 11px;
color: #25D366;
display: flex;
align-items: center;
gap: 4px;
}
.whatsapp-helpdesk-online-dot {
display: inline-block;
width: 7px;
height: 7px;
background: #25D366;
border-radius: 50%;
}
.whatsapp-helpdesk-bubble-body {
font-size: 13px;
color: #333;
line-height: 1.5;
background: #f0fdf4;
border-radius: 8px;
padding: 8px 10px;
}
/* Segitiga penunjuk ke tombol */
.whatsapp-helpdesk-bubble-arrow {
position: absolute;
bottom: -8px;
right: 24px;
width: 0;
height: 0;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
border-top: 8px solid #fff;
filter: drop-shadow(0 2px 2px rgba(0,0,0,0.08));
}
/* Tombol utama */
.whatsapp-helpdesk-btn {
display: flex;
align-items: center;
gap: 8px;
background-color: #25D366;
color: #fff;
border-radius: 50px;
padding: 12px 18px;
text-decoration: none;
box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
transition: background-color 0.2s, box-shadow 0.2s, transform 0.2s;
font-weight: 600;
font-size: 14px;
}
.whatsapp-helpdesk-btn:hover {
background-color: #1ebe5d;
box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
color: #fff;
transform: translateY(-2px);
}
.whatsapp-helpdesk-btn:active {
transform: translateY(0);
}
@media (max-width: 576px) {
.whatsapp-helpdesk-wrapper {
bottom: 20px;
right: 16px;
}
.whatsapp-helpdesk-btn {
padding: 12px;
border-radius: 50%;
}
.whatsapp-helpdesk-label {
display: none;
}
.whatsapp-helpdesk-bubble {
width: 200px;
}
}
</style>
<script>
(function () {
var STORAGE_KEY = 'wa_helpdesk_bubble_closed';
var bubble = document.getElementById('waHelpdeskBubble');
var closeBtn = document.getElementById('waHelpdeskClose');
if (sessionStorage.getItem(STORAGE_KEY)) {
return;
}
setTimeout(function () {
bubble.classList.add('show');
}, 1500);
closeBtn.addEventListener('click', function (e) {
e.preventDefault();
bubble.classList.remove('show');
sessionStorage.setItem(STORAGE_KEY, '1');
});
})();
</script>
<!-- End WhatsApp Helpdesk Button -->
<!-- Right Sidebar -->
<div class="end-bar">
<div class="rightbar-title">
<a href="javascript:void(0);" class="end-bar-toggle float-end">
<i class="dripicons-cross noti-icon"></i>
</a>
<h5 class="m-0">Settings</h5>
</div>
<div class="rightbar-content h-100" data-simplebar>
<div class="p-3">
<div class="alert alert-warning" role="alert">
<strong>Customize </strong> the overall color scheme, sidebar menu, etc.
</div>
<!-- Settings -->
<h5 class="mt-3">Color Scheme</h5>
<hr class="mt-1" />
<div class="form-check form-switch mb-1">
<input class="form-check-input" type="checkbox" name="color-scheme-mode" value="light"
id="light-mode-check" checked>
<label class="form-check-label" for="light-mode-check">Light Mode</label>
</div>
<div class="form-check form-switch mb-1">
<input class="form-check-input" type="checkbox" name="color-scheme-mode" value="dark"
id="dark-mode-check">
<label class="form-check-label" for="dark-mode-check">Dark Mode</label>
</div>
<!-- Width -->
<h5 class="mt-4">Width</h5>
<hr class="mt-1" />
<div class="form-check form-switch mb-1">
<input class="form-check-input" type="checkbox" name="width" value="fluid" id="fluid-check"
checked>
<label class="form-check-label" for="fluid-check">Fluid</label>
</div>
<div class="form-check form-switch mb-1">
<input class="form-check-input" type="checkbox" name="width" value="boxed" id="boxed-check">
<label class="form-check-label" for="boxed-check">Boxed</label>
</div>
<!-- Left Sidebar-->
<h5 class="mt-4">Left Sidebar</h5>
<hr class="mt-1" />
<div class="form-check form-switch mb-1">
<input class="form-check-input" type="checkbox" name="theme" value="default"
id="default-check">
<label class="form-check-label" for="default-check">Default</label>
</div>
<div class="form-check form-switch mb-1">
<input class="form-check-input" type="checkbox" name="theme" value="light" id="light-check"
checked>
<label class="form-check-label" for="light-check">Light</label>
</div>
<div class="form-check form-switch mb-3">
<input class="form-check-input" type="checkbox" name="theme" value="dark" id="dark-check">
<label class="form-check-label" for="dark-check">Dark</label>
</div>
<div class="form-check form-switch mb-1">
<input class="form-check-input" type="checkbox" name="compact" value="fixed" id="fixed-check"
checked>
<label class="form-check-label" for="fixed-check">Fixed</label>
</div>
<div class="form-check form-switch mb-1">
<input class="form-check-input" type="checkbox" name="compact" value="condensed"
id="condensed-check">
<label class="form-check-label" for="condensed-check">Condensed</label>
</div>
<div class="form-check form-switch mb-1">
<input class="form-check-input" type="checkbox" name="compact" value="scrollable"
id="scrollable-check">
<label class="form-check-label" for="scrollable-check">Scrollable</label>
</div>
<div class="d-grid mt-4">
<button class="btn btn-primary" id="resetBtn">Reset to Default</button>
<a href="https://themes.getbootstrap.com/product/hyper-responsive-admin-dashboard-template/"
class="btn btn-danger mt-3" target="_blank"><i class="mdi mdi-basket me-1"></i>
Purchase Now</a>
</div>
</div> <!-- end padding-->
</div>
</div>
<div class="rightbar-overlay"></div>
<!-- /End-bar -->
<!-- bundle -->
<script src="{{ asset('assets/js/vendor.min.js') }}"></script>
<script src="{{ asset('assets/js/app.min.js') }}"></script>
<script>
// Netralkan perilaku auto-condensed Hyper template saat resize
(function() {
if (window.jQuery) {
if (window.jQuery.LayoutThemeApp) {
window.jQuery.LayoutThemeApp._adjustLayout = function() {
document.body.removeAttribute('data-leftbar-compact-mode');
};
}
if (window.jQuery.LeftSidebar) {
window.jQuery.LeftSidebar.activateCondensedSidebar = function() {
document.body.removeAttribute('data-leftbar-compact-mode');
};
}
}
document.body.removeAttribute('data-leftbar-compact-mode');
// MutationObserver untuk segera menghapus attribute data-leftbar-compact-mode jika diset ulang oleh skrip lain
try {
var compactObserver = new MutationObserver(function() {
if (document.body.getAttribute('data-leftbar-compact-mode') === 'condensed') {
document.body.removeAttribute('data-leftbar-compact-mode');
}
});
compactObserver.observe(document.body, { attributes: true, attributeFilter: ['data-leftbar-compact-mode'] });
} catch (e) {}
})();
</script>
<!-- Setup CSRF Token for AJAX -->
<script>
// Hapus semua cursor loading ketika halaman tampil (termasuk restore dari bfcache)
window.addEventListener('pageshow', function() {
$('body').css('cursor', '').removeClass('navigating-row page-loading');
$('tr').css('cursor', '');
});
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
</script>
<!-- Global Navigation Loading Cursor -->
<script>
(function() {
var loadingTimer;
function startLoading() {
clearTimeout(loadingTimer);
$('body').addClass('page-loading');
}
function stopLoading() {
loadingTimer = setTimeout(function() {
$('body').removeClass('page-loading');
}, 50);
}
// Klik pada link navigasi nyata (bukan #, javascript:, atau modal trigger)
$(document).on('click', 'a[href]', function() {
var href = $(this).attr('href');
var isNavigation = href
&& href !== '#'
&& href !== ''
&& !/^javascript/i.test(href)
&& !/^blob:/i.test(href)
&& !$(this).attr('download')
&& !$(this).is('[data-bs-toggle],[data-bs-dismiss]');
if (isNavigation) {
startLoading();
}
});
// Klik pada baris tabel dengan data-detail-url
$(document).on('click', '[data-detail-url]', function(e) {
if ($(e.target).closest('.form-check, .btn').length) {
return;
}
startLoading();
});
// Safety net: hapus saat semua AJAX selesai (mencegah cursor stuck jika navigasi dibatalkan)
$(document).ajaxStop(stopLoading);
})();
</script>
<!-- third party js -->
<script src="{{ asset('assets/js/vendor/apexcharts.min.js') }}"></script>
<script src="{{ asset('assets/js/vendor/jquery-jvectormap-1.2.2.min.js') }}"></script>
<script src="{{ asset('assets/js/vendor/jquery-jvectormap-world-mill-en.js') }}"></script>
<!-- third party js ends -->
<!-- Datatables js -->
<script src="{{ asset('assets/js/vendor/jquery.dataTables.min.js') }}"></script>
<script src="{{ asset('assets/js/vendor/dataTables.bootstrap5.js') }}"></script>
<script src="{{ asset('assets/js/vendor/dataTables.responsive.min.js') }}"></script>
<script src="{{ asset('assets/js/vendor/responsive.bootstrap5.min.js') }}"></script>
<!-- Simple Notify JS -->
<script src="https://cdn.jsdelivr.net/npm/simple-notify/dist/simple-notify.min.js"></script>
<!-- SweetAlert2 JS -->
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<!-- Plotly JS -->
<script src="https://cdn.plot.ly/plotly-2.35.2.min.js" charset="utf-8"></script>
<!-- Simple Notify JS -->
<script>
function showNotification(options = {}) {
const defaultOptions = {
status: 'info',
title: 'Notification',
text: 'Default notification message',
effect: 'fade',
speed: 300,
customClass: null,
customIcon: null,
showIcon: true,
showCloseButton: true,
autoclose: true,
autotimeout: 3000,
gap: 20,
distance: 20,
type: 'outline',
position: 'right top'
};
const config = {
...defaultOptions,
...options
};
new Notify(config);
}
// Fungsi khusus untuk notifikasi sukses
function showSuccess(title = 'Success', text = 'Operation completed successfully') {
showNotification({
status: 'success',
title: title,
text: text,
});
}
// Fungsi khusus untuk notifikasi error
function showError(title = 'Error', text = 'An error occurred') {
showNotification({
status: 'error',
title: title,
text: text,
autotimeout: 5000
});
}
// Fungsi khusus untuk notifikasi warning
function showWarning(title = 'Warning', text = 'Please check your input') {
showNotification({
status: 'warning',
title: title,
text: text,
autotimeout: 5000
});
}
// Fungsi khusus untuk notifikasi info
function showInfo(title = 'Information', text = 'Here is some information') {
showNotification({
status: 'info',
title: title,
text: text,
});
}
// Fungsi untuk menangani error dari jQuery AJAX
function handleAjaxError(xhr, status, error) {
let errorMessage = 'An unexpected error occurred';
let errorTitle = 'Error';
// Fungsi helper untuk extract message dari response
function getMessageFromResponse(xhr) {
try {
const responseData = JSON.parse(xhr.responseText);
return responseData.message || responseData.error || responseData.msg || null;
} catch (e) {
return xhr.responseText || null;
}
}
// Parse error berdasarkan status code
switch (xhr.status) {
case 400:
errorTitle = 'Bad Request';
errorMessage = getMessageFromResponse(xhr) || 'Bad request. Please check your input.';
break;
case 401:
errorTitle = 'Unauthorized';
errorMessage = getMessageFromResponse(xhr) || 'You are not authorized to perform this action.';
break;
case 403:
errorTitle = 'Forbidden';
errorMessage = getMessageFromResponse(xhr) || 'Access denied. You do not have permission.';
break;
case 404:
errorTitle = 'Not Found';
errorMessage = getMessageFromResponse(xhr) || 'The requested resource was not found.';
break;
case 422:
errorTitle = 'Validation Error';
// Coba parse validation errors dari response
try {
const responseData = JSON.parse(xhr.responseText);
if (responseData.errors) {
const errors = Object.values(responseData.errors).flat();
errorMessage = errors.join('<br>');
} else if (responseData.message) {
errorMessage = responseData.message;
} else {
errorMessage = 'Validation failed. Please check your input.';
}
} catch (e) {
errorMessage = 'Validation failed. Please check your input.';
}
break;
case 500:
errorTitle = 'Server Error';
errorMessage = getMessageFromResponse(xhr) || 'Internal server error. Please try again later.';
break;
default:
// Coba parse pesan error dari response
try {
const responseData = JSON.parse(xhr.responseText);
if (responseData.message) {
errorMessage = responseData.message;
}
if (responseData.title) {
errorTitle = responseData.title;
}
} catch (e) {
errorMessage = getMessageFromResponse(xhr) || `Error ${xhr.status}: ${error}`;
}
}
showError(errorTitle, errorMessage);
}
</script>
<!-- Select2 -->
<script>
$('.select2').each(function() {
const $this = $(this);
const dropdownParent = $this.data('dropdown-parent');
const placeholder = $this.data('placeholder');
const options = {
allowClear: true,
placeholder: placeholder || "Pilih salah satu...",
width: '100%'
};
if (dropdownParent) {
options.dropdownParent = $(dropdownParent);
}
$this.select2(options);
});
</script>
<!-- Team Name Marquee -->
<script>
$(document).ready(function() {
const container = $('.team-name-container');
const text = $('.team-name-text');
if (container.length && text.length) {
// Check if text is wider than container
const textWidth = text.outerWidth();
const containerWidth = container.outerWidth();
if (textWidth > containerWidth) {
// Calculate the distance to scroll (negative value to move left)
const distance = -(textWidth - containerWidth);
text.css('--marquee-distance', distance + 'px');
text.addClass('marquee');
}
}
});
</script>
<!-- Flash Message Alert -->
<script>
@if (session('error'))
showError('Akses Ditolak', '{{ session('error') }}');
@endif
@if (session('success'))
showSuccess('Berhasil', '{{ session('success') }}');
@endif
@if (session('info'))
showInfo('Informasi', '{{ session('info') }}');
@endif
@if (session('warning'))
showWarning('Peringatan', '{{ session('warning') }}');
@endif
</script>
<!-- Change Team Modal Script -->
<script>
$(document).ready(function() {
// Initialize select2 untuk change team
if ($('#change_team_id').length) {
$('#change_team_id').select2({
dropdownParent: $('#changeTeamModal'),
placeholder: 'Pilih Team...',
allowClear: true,
width: '100%'
});
}
// Handle click button Ganti Team (Topbar, Sidebar, Dropdown)
$(document).on('click', '#btnChangeTeamTopbar, #btnChangeTeamSidebar, #btnChangeTeamDropdown, .btn-trigger-change-team', function(e) {
e.preventDefault();
$('#changeTeamModal').modal('show');
});
// Handle submit ganti team
$('#btnConfirmChangeTeam').off('click').on('click', function(e) {
e.preventDefault();
e.stopImmediatePropagation();
const teamId = $('#change_team_id').val();
console.log('Changing team to:', teamId);
if (!teamId) {
showWarning('Perhatian', 'Silakan pilih team terlebih dahulu');
return false;
}
// Disable button dan tampilkan loading
const $btn = $(this);
const originalHtml = $btn.html();
$btn.prop('disabled', true).html(
'<i class="mdi mdi-loading mdi-spin me-1"></i>Memproses...');
// Kirim request
fetch('{{ url('/dashboard/set-team') }}', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-CSRF-TOKEN': '{{ csrf_token() }}',
'Accept': 'application/json',
'X-Requested-With': 'XMLHttpRequest'
},
body: JSON.stringify({
team_id: teamId
}),
redirect: 'manual'
})
.then(response => {
console.log('Response status:', response.status);
if (!response.ok) {
return response.json().then(err => {
throw new Error(err.message || 'Terjadi kesalahan');
});
}
return response.json();
})
.then(data => {
console.log('Success response:', data);
if (data.success) {
showSuccess('Berhasil', data.message);
$('#changeTeamModal').modal('hide');
setTimeout(() => {
window.location.reload();
}, 500);
} else {
throw new Error(data.message || 'Terjadi kesalahan');
}
})
.catch(error => {
console.error('Error:', error);
showError('Gagal', error.message || 'Terjadi kesalahan');
$btn.prop('disabled', false).html(originalHtml);
});
return false;
});
// Handle enter key di select
$('#change_team_id').off('keypress').on('keypress', function(e) {
if (e.which === 13) {
e.preventDefault();
$('#btnConfirmChangeTeam').trigger('click');
}
});
});
</script>
<script>
// Skrip Interaksi Sidebar (Desktop & Mobile) & Dropdown Profil
document.addEventListener('DOMContentLoaded', function() {
const sidebar = document.getElementById('main-sidebar');
const backdrop = document.getElementById('sidebar-backdrop');
const toggleBtn = document.getElementById('sidebar-toggle-btn');
const closeBtn = document.getElementById('sidebar-close-btn');
// Cek state collapsed yang tersimpan di localStorage (khusus desktop)
if (window.innerWidth >= 1024) {
const isCollapsed = localStorage.getItem('untan_sidebar_collapsed') === 'true';
if (isCollapsed) {
document.body.classList.add('sidebar-collapsed');
}
}
function toggleSidebar(e) {
if (e) e.preventDefault();
if (window.innerWidth >= 1024) {
// Mode Desktop: toggle class sidebar-collapsed pada body
document.body.classList.toggle('sidebar-collapsed');
const isCollapsed = document.body.classList.contains('sidebar-collapsed');
localStorage.setItem('untan_sidebar_collapsed', isCollapsed);
} else {
// Mode Mobile: toggle offcanvas drawer & backdrop dengan transisi mulus
if (sidebar) {
const isClosed = !sidebar.classList.contains('mobile-open') && sidebar.classList.contains('-translate-x-full');
if (isClosed) {
sidebar.classList.remove('-translate-x-full');
sidebar.classList.add('mobile-open');
if (backdrop) backdrop.classList.add('active');
} else {
closeMobileSidebar();
}
}
}
}
function closeMobileSidebar(e) {
if (e) e.preventDefault();
if (sidebar) {
sidebar.classList.add('-translate-x-full');
sidebar.classList.remove('mobile-open');
}
if (backdrop) {
backdrop.classList.remove('active');
}
}
if (toggleBtn) toggleBtn.addEventListener('click', toggleSidebar);
if (closeBtn) closeBtn.addEventListener('click', closeMobileSidebar);
if (backdrop) backdrop.addEventListener('click', closeMobileSidebar);
// Tutup sidebar mobile dengan tombol Escape (ESC)
document.addEventListener('keydown', function(e) {
if (e.key === 'Escape' && window.innerWidth < 1024 && sidebar && sidebar.classList.contains('mobile-open')) {
closeMobileSidebar();
}
});
// Responsive window resize transition
window.addEventListener('resize', function() {
if (document.body.hasAttribute('data-leftbar-compact-mode')) {
document.body.removeAttribute('data-leftbar-compact-mode');
}
if (window.innerWidth >= 1024) {
if (backdrop) backdrop.classList.remove('active');
if (sidebar) {
sidebar.classList.remove('-translate-x-full');
sidebar.classList.remove('mobile-open');
}
const isCollapsed = localStorage.getItem('untan_sidebar_collapsed') === 'true';
if (isCollapsed) {
document.body.classList.add('sidebar-collapsed');
} else {
document.body.classList.remove('sidebar-collapsed');
}
} else {
if (backdrop && !backdrop.classList.contains('active') && sidebar) {
sidebar.classList.add('-translate-x-full');
sidebar.classList.remove('mobile-open');
}
}
});
// Modal Backdrop Stacking Fix: Pindahkan modal ke body agar tidak tertutup backdrop
if (window.jQuery) {
$(document).on('show.bs.modal', '.modal', function() {
if ($(this).parent().prop('tagName') !== 'BODY') {
$(this).appendTo('body');
}
});
} else {
document.addEventListener('show.bs.modal', function(e) {
if (e.target && e.target.classList && e.target.classList.contains('modal')) {
if (e.target.parentElement !== document.body) {
document.body.appendChild(e.target);
}
}
}, true);
}
// User dropdown toggle
const userMenuBtn = document.getElementById('user-menu-btn');
const userMenuDropdown = document.getElementById('user-menu-dropdown');
if (userMenuBtn && userMenuDropdown) {
userMenuBtn.addEventListener('click', function(e) {
e.stopPropagation();
userMenuDropdown.classList.toggle('hidden');
});
document.addEventListener('click', function(e) {
if (!userMenuDropdown.contains(e.target) && !userMenuBtn.contains(e.target)) {
userMenuDropdown.classList.add('hidden');
}
});
}
// Animasi Halus Saat Berpindah Tab Navigasi (Global untuk Seluruh Menu)
function triggerTabAnimation(targetPane) {
if (!targetPane) return;
targetPane.classList.remove('tab-animating');
void targetPane.offsetWidth; // Force reflow agar animasi selalu re-run
targetPane.classList.add('tab-animating');
}
document.addEventListener('show.bs.tab', function(e) {
if (e.target) {
const targetSelector = e.target.getAttribute('data-bs-target') || e.target.getAttribute('href');
if (targetSelector && targetSelector.startsWith('#') && targetSelector.length > 1) {
const targetPane = document.querySelector(targetSelector);
if (targetPane) triggerTabAnimation(targetPane);
}
}
});
document.addEventListener('click', function(e) {
const navLink = e.target.closest('.nav-link, [data-bs-toggle="tab"], [data-toggle="tab"]');
if (navLink) {
const targetSelector = navLink.getAttribute('data-bs-target') || navLink.getAttribute('data-target') || navLink.getAttribute('href');
if (targetSelector && targetSelector.startsWith('#') && targetSelector.length > 1) {
const targetPane = document.querySelector(targetSelector);
if (targetPane) {
requestAnimationFrame(function() {
triggerTabAnimation(targetPane);
});
}
}
}
});
});
</script>
@yield('js')
@yield('modal-alert-js')
</body>
</html>