From addc6759995a63944ab676684762105ac8b5eea7 Mon Sep 17 00:00:00 2001 From: Yoga Pangestu Date: Thu, 2 Apr 2026 12:13:45 +0700 Subject: [PATCH] refactor: remove record title attributes from various resource classes for cleaner code structure --- app/Filament/Pages/Information/CourseSchedule/Index.php | 2 -- .../Resources/Learning/Assignments/AssignmentResource.php | 2 -- .../Resources/Learning/Assignments/Pages/ListAssignments.php | 2 -- .../Resources/Learning/Attendances/AttendanceResource.php | 2 -- .../Resources/Learning/ClassSessions/ClassSessionResource.php | 2 -- app/Filament/Resources/Learning/Materials/MaterialResource.php | 2 -- app/Filament/Resources/Master/Courses/CourseResource.php | 2 -- app/Filament/Resources/Master/Students/StudentResource.php | 2 -- 8 files changed, 16 deletions(-) diff --git a/app/Filament/Pages/Information/CourseSchedule/Index.php b/app/Filament/Pages/Information/CourseSchedule/Index.php index e960f59..0c9cd13 100644 --- a/app/Filament/Pages/Information/CourseSchedule/Index.php +++ b/app/Filament/Pages/Information/CourseSchedule/Index.php @@ -40,8 +40,6 @@ class Index extends Page implements HasActions, HasForms protected static ?int $navigationSort = 5; - protected static ?string $recordTitleAttribute = 'day_of_week'; - protected static ?string $slug = 'information/course-schedules'; protected string $view = 'filament.pages.information.course-schedule.index'; diff --git a/app/Filament/Resources/Learning/Assignments/AssignmentResource.php b/app/Filament/Resources/Learning/Assignments/AssignmentResource.php index 97ceeea..eb31ad3 100644 --- a/app/Filament/Resources/Learning/Assignments/AssignmentResource.php +++ b/app/Filament/Resources/Learning/Assignments/AssignmentResource.php @@ -58,8 +58,6 @@ public static function getNavigationBadgeColor(): ?string protected static ?int $navigationSort = 15; - protected static ?string $recordTitleAttribute = 'title'; - protected static ?string $slug = 'learning/assignments'; public static function form(Schema $schema): Schema diff --git a/app/Filament/Resources/Learning/Assignments/Pages/ListAssignments.php b/app/Filament/Resources/Learning/Assignments/Pages/ListAssignments.php index 0366ed7..a8fbfc1 100644 --- a/app/Filament/Resources/Learning/Assignments/Pages/ListAssignments.php +++ b/app/Filament/Resources/Learning/Assignments/Pages/ListAssignments.php @@ -38,8 +38,6 @@ class ListAssignments extends Page protected static ?string $title = 'Tugas'; - protected static ?string $recordTitleAttribute = 'title'; - public static function getPagePermission(): string { return 'View:CourseSchedule'; diff --git a/app/Filament/Resources/Learning/Attendances/AttendanceResource.php b/app/Filament/Resources/Learning/Attendances/AttendanceResource.php index c38d5bf..a000735 100644 --- a/app/Filament/Resources/Learning/Attendances/AttendanceResource.php +++ b/app/Filament/Resources/Learning/Attendances/AttendanceResource.php @@ -20,8 +20,6 @@ class AttendanceResource extends Resource protected static ?int $navigationSort = 20; - protected static ?string $recordTitleAttribute = 'date'; - protected static ?string $slug = 'learning/attendances'; public static function getPages(): array diff --git a/app/Filament/Resources/Learning/ClassSessions/ClassSessionResource.php b/app/Filament/Resources/Learning/ClassSessions/ClassSessionResource.php index afc8a61..5172d1e 100644 --- a/app/Filament/Resources/Learning/ClassSessions/ClassSessionResource.php +++ b/app/Filament/Resources/Learning/ClassSessions/ClassSessionResource.php @@ -25,8 +25,6 @@ class ClassSessionResource extends Resource protected static ?int $navigationSort = 5; - protected static ?string $recordTitleAttribute = 'session_number'; - protected static ?string $slug = 'learning/class-sessions'; public static function getRelations(): array diff --git a/app/Filament/Resources/Learning/Materials/MaterialResource.php b/app/Filament/Resources/Learning/Materials/MaterialResource.php index fe01bf1..252f09c 100644 --- a/app/Filament/Resources/Learning/Materials/MaterialResource.php +++ b/app/Filament/Resources/Learning/Materials/MaterialResource.php @@ -48,8 +48,6 @@ class MaterialResource extends Resource protected static ?int $navigationSort = 10; - protected static ?string $recordTitleAttribute = 'title'; - protected static ?string $slug = 'learning/materials'; public static function form(Schema $schema): Schema diff --git a/app/Filament/Resources/Master/Courses/CourseResource.php b/app/Filament/Resources/Master/Courses/CourseResource.php index 2f64557..1f6b851 100644 --- a/app/Filament/Resources/Master/Courses/CourseResource.php +++ b/app/Filament/Resources/Master/Courses/CourseResource.php @@ -37,8 +37,6 @@ class CourseResource extends Resource protected static ?int $navigationSort = 10; - protected static ?string $recordTitleAttribute = 'name'; - protected static ?string $slug = 'master/courses'; public static function form(Schema $schema): Schema diff --git a/app/Filament/Resources/Master/Students/StudentResource.php b/app/Filament/Resources/Master/Students/StudentResource.php index 986a13a..36977ad 100644 --- a/app/Filament/Resources/Master/Students/StudentResource.php +++ b/app/Filament/Resources/Master/Students/StudentResource.php @@ -26,8 +26,6 @@ class StudentResource extends Resource protected static ?int $navigationSort = 5; - protected static ?string $recordTitleAttribute = 'full_name'; - protected static ?string $slug = 'master/students'; public static function form(Schema $schema): Schema