{{-- Flash Alert --}}
@if(session('success') || session('error'))
@php
$currentUser = auth()->user();
$hasPendingApproval = \App\Models\PayrollSalary::where('status', 'P')
->whereHas('approval.steps', function($q) use ($currentUser) {
$q->where('status', 'active')->where(fn($sq) => $sq->where('approver_id', $currentUser->id)->orWhereIn('approver_role', $currentUser->getRoleNames()));
})->exists();
@endphp
{{-- ===================== DESKTOP TABLE ===================== --}}
{{-- ===================== VIRTUAL SCROLL MOBILE ===================== --}}