From ae627b076eb432da929b13a4f557beef017bc6e1 Mon Sep 17 00:00:00 2001 From: Yoga Pangestu Date: Thu, 12 Mar 2026 10:12:23 +0700 Subject: [PATCH] refactor: Adjust Filament navigation sort orders for various resources, pages, and plugins. --- app/Filament/Pages/Information/CourseSchedule/Index.php | 2 +- app/Filament/Pages/Learning/StudyGroup/Index.php | 2 +- app/Filament/Pages/System/ManageSettings.php | 2 +- .../Resources/Learning/Assignments/AssignmentResource.php | 2 +- .../Resources/Learning/Materials/MaterialResource.php | 2 +- app/Filament/Resources/Master/Courses/CourseResource.php | 2 +- .../Resources/Master/Students/StudentResource.php | 2 +- app/Providers/Filament/AdminPanelProvider.php | 8 ++++++-- 8 files changed, 13 insertions(+), 9 deletions(-) diff --git a/app/Filament/Pages/Information/CourseSchedule/Index.php b/app/Filament/Pages/Information/CourseSchedule/Index.php index a5e82d9..b0a4a56 100644 --- a/app/Filament/Pages/Information/CourseSchedule/Index.php +++ b/app/Filament/Pages/Information/CourseSchedule/Index.php @@ -37,7 +37,7 @@ class Index extends Page implements HasActions, HasForms protected static ?string $title = 'Jadwal Kuliah'; - protected static ?int $navigationSort = 1; + protected static ?int $navigationSort = 5; protected static ?string $recordTitleAttribute = 'day_of_week'; diff --git a/app/Filament/Pages/Learning/StudyGroup/Index.php b/app/Filament/Pages/Learning/StudyGroup/Index.php index 5cf4a0e..325e628 100644 --- a/app/Filament/Pages/Learning/StudyGroup/Index.php +++ b/app/Filament/Pages/Learning/StudyGroup/Index.php @@ -39,7 +39,7 @@ class Index extends Page implements HasActions, HasForms protected static ?string $title = 'Kelompok Belajar'; - protected static ?int $navigationSort = 10; + protected static ?int $navigationSort = 20; protected static ?string $slug = 'learning/study-groups'; diff --git a/app/Filament/Pages/System/ManageSettings.php b/app/Filament/Pages/System/ManageSettings.php index 74a2b0f..160b014 100644 --- a/app/Filament/Pages/System/ManageSettings.php +++ b/app/Filament/Pages/System/ManageSettings.php @@ -36,7 +36,7 @@ public static function getPagePermission(): string return 'View:ManageSettings'; } - protected static ?int $navigationSort = 10; + protected static ?int $navigationSort = 5; protected static string $settings = GeneralSettings::class; diff --git a/app/Filament/Resources/Learning/Assignments/AssignmentResource.php b/app/Filament/Resources/Learning/Assignments/AssignmentResource.php index 19d2379..68ea40b 100644 --- a/app/Filament/Resources/Learning/Assignments/AssignmentResource.php +++ b/app/Filament/Resources/Learning/Assignments/AssignmentResource.php @@ -27,7 +27,7 @@ class AssignmentResource extends Resource protected static ?string $navigationLabel = 'Tugas'; - protected static ?int $navigationSort = 5; + protected static ?int $navigationSort = 15; protected static ?string $recordTitleAttribute = 'title'; diff --git a/app/Filament/Resources/Learning/Materials/MaterialResource.php b/app/Filament/Resources/Learning/Materials/MaterialResource.php index 3cbe331..8518da3 100644 --- a/app/Filament/Resources/Learning/Materials/MaterialResource.php +++ b/app/Filament/Resources/Learning/Materials/MaterialResource.php @@ -47,7 +47,7 @@ class MaterialResource extends Resource protected static ?string $navigationLabel = 'Materi'; - protected static ?int $navigationSort = 3; + protected static ?int $navigationSort = 10; protected static ?string $recordTitleAttribute = 'title'; diff --git a/app/Filament/Resources/Master/Courses/CourseResource.php b/app/Filament/Resources/Master/Courses/CourseResource.php index d7575e0..705e4bc 100644 --- a/app/Filament/Resources/Master/Courses/CourseResource.php +++ b/app/Filament/Resources/Master/Courses/CourseResource.php @@ -37,7 +37,7 @@ class CourseResource extends Resource protected static ?string $navigationLabel = 'Mata Kuliah'; - protected static ?int $navigationSort = 20; + protected static ?int $navigationSort = 15; protected static ?string $recordTitleAttribute = 'name'; diff --git a/app/Filament/Resources/Master/Students/StudentResource.php b/app/Filament/Resources/Master/Students/StudentResource.php index 3bb10df..32d8aef 100644 --- a/app/Filament/Resources/Master/Students/StudentResource.php +++ b/app/Filament/Resources/Master/Students/StudentResource.php @@ -25,7 +25,7 @@ class StudentResource extends Resource protected static ?string $navigationLabel = 'Mahasiswa'; - protected static ?int $navigationSort = 1; + protected static ?int $navigationSort = 5; protected static ?string $recordTitleAttribute = 'full_name'; diff --git a/app/Providers/Filament/AdminPanelProvider.php b/app/Providers/Filament/AdminPanelProvider.php index c679d97..c46ad3f 100644 --- a/app/Providers/Filament/AdminPanelProvider.php +++ b/app/Providers/Filament/AdminPanelProvider.php @@ -69,7 +69,9 @@ public function panel(Panel $panel): Panel Authenticate::class, ]) ->plugins([ - FilamentShieldPlugin::make(), + FilamentShieldPlugin::make() + ->navigationSort(5), + AuthUIEnhancerPlugin::make() ->formPanelPosition('left') ->formPanelWidth('40%') @@ -93,7 +95,8 @@ public function panel(Panel $panel): Panel ->navigationLabel('Log') ->navigationUrl('/system/logs') ->pollingTime(null) - ->authorize(fn () => auth()->user()->can('View:LogTable')), + ->authorize(fn () => auth()->user()->can('View:LogTable')) + ->navigationSort(10), MobileBottomNav::make() ->items([ @@ -131,6 +134,7 @@ public function panel(Panel $panel): Panel 'Pembelajaran', 'Informasi', 'Sistem', + 'Pelindung', ]); } }