{{-- Shared tab bar for the "Full Time Staff" module. Renders at the top of these pages so navigation between them feels like one unit: Staff Register → /hr (active='register') Payroll Profile → /hr/payroll-profile (active='payroll-profile') Leave Management → /hr/leave (active='leave') Payroll Runs → /payroll (active='payroll-runs') Payments → /payroll/payments (active='payments') Statutory Remittances → /payroll/remittances (active='remittances') Usage: @include('hr.partials.ft-staff-tabs', ['active' => 'register']) Role gating: - Staff Register, Payroll Profile, Leave Management require HR User or Hospital Admin role (matches the existing /hr middleware). - Payroll Runs, Payments, Statutory Remittances require HR User or Hospital Admin (matches the existing /payroll middleware). Both gates are effectively the same set of users; if a future role can hit one set but not the other, hide the tabs they can't reach. --}} @php $tabUser = Auth::user(); $tabIsAdmin = $tabUser && $tabUser->hasAnyRole('Super Admin', 'Hospital Admin'); $tabIsHR = $tabUser && $tabUser->hasRole('HR User'); $tabCanHR = $tabIsAdmin || $tabIsHR; // Payroll module has the same gate as HR module in the current // routes/web.php (role:HR User,Hospital Admin). Keep them aligned. $tabCanPayroll = $tabCanHR; @endphp