{{ $pageTitle ?? 'Class Scheduling System' }}
@hasSection('page-nav') @endif
@php // Opens the guide at the chapter for the page being viewed. $guideRoute = request()->route()?->getName() ?? ''; $guideAnchor = match (true) { str_starts_with($guideRoute, 'dashboard.') => 'admin-dashboard', str_starts_with($guideRoute, 'academic-setup.') => 'academic-setup', str_starts_with($guideRoute, 'teachers.') => 'teacher-management', str_starts_with($guideRoute, 'scheduling.') => 'scheduling', str_starts_with($guideRoute, 'reports.') => 'reports', str_starts_with($guideRoute, 'admin-settings.') => 'admin-settings', $guideRoute === 'principal.dashboard' => 'principal-dashboard', $guideRoute === 'principal.insights' => 'principal-monitoring', $guideRoute === 'password.change' => 'first-login', str_starts_with($guideRoute, 'teacher.schedules.') => auth()->user()?->isPrincipal() ? 'principal-schedules' : 'teacher-portal', default => null, }; @endphp User Guide @if ($setupGuide ?? null) @if ($setupGuide['isComplete']) @else @endif @endif @auth @php $accountUser = auth()->user(); $accountRole = $accountUser->is_admin ? 'Administrator' : ($accountUser->isPrincipal() ? 'Principal' : 'Teacher'); $accountInitials = collect(preg_split('/\s+/', trim($accountUser->name))) ->filter()->take(2)->map(fn ($part) => mb_strtoupper(mb_substr($part, 0, 1)))->implode('') ?: 'U'; @endphp @endauth