NEROSA {{ ucfirst($role) }} Panel
@stack('styles')
@php $role = auth()->user()->role ?? 'author'; $menu = [ 'admin' => [ ['label' => 'Dashboard', 'icon' => 'dashboard', 'href' => route('dashboard')], ['label' => 'Articles Workflow', 'icon' => 'description', 'href' => route('admin.workflow.articles.index')], ['label' => 'Add Article', 'icon' => 'note_add', 'href' => route('articles.create')], ['label' => 'Users', 'icon' => 'group', 'href' => route('admin.users.index')], ['label' => 'Categories', 'icon' => 'category', 'href' => route('admin.categories.index')], ['label' => 'Volumes', 'icon' => 'library_books', 'href' => route('admin.volumes.index')], ['label' => 'Issues', 'icon' => 'book_2', 'href' => route('admin.issues.index')], ['label' => 'Static Pages', 'icon' => 'auto_stories', 'href' => route('admin.content.pages')], ['label' => 'Homepage Slides', 'icon' => 'photo_library', 'href' => route('admin.content.slides.index')], ['label' => 'Website Content', 'icon' => 'settings_suggest', 'href' => route('admin.content.site.edit')], ], 'editor' => [ ['label' => 'Dashboard', 'icon' => 'dashboard', 'href' => route('dashboard')], ['label' => 'Assigned Articles', 'icon' => 'description', 'href' => route('editor.articles.index')], ], 'reviewer' => [ ['label' => 'Dashboard', 'icon' => 'dashboard', 'href' => route('dashboard')], ['label' => 'Assigned Reviews', 'icon' => 'description', 'href' => route('reviewer.assignments.index')], ], 'author' => [ ['label' => 'Dashboard', 'icon' => 'dashboard', 'href' => route('dashboard')], ['label' => 'Author Profile', 'icon' => 'badge', 'href' => route('author.profile.edit')], ['label' => 'My Submissions', 'icon' => 'description', 'href' => route('author.submissions.index')], ['label' => 'Submit New', 'icon' => 'add', 'href' => route('author.submissions.create')], ], ]; $items = $menu[$role] ?? $menu['author']; $flashMessage = session('ok'); if (! $flashMessage) { $status = session('status'); if ($status === 'profile-updated') { $flashMessage = 'Profile updated successfully.'; } elseif ($status === 'password-updated') { $flashMessage = 'Password updated successfully.'; } elseif ($status === 'verification-link-sent') { $flashMessage = 'Verification link sent successfully.'; } } $flashType = $errors->any() || $errors->updatePassword->any() ? 'error' : 'success'; $shouldOpenProfileModal = $errors->hasAny(['name', 'email', 'profile_photo']) || $errors->updatePassword->any(); $avatarUrl = auth()->user()->profile_photo_path ? asset('storage/'.auth()->user()->profile_photo_path) : null; @endphp