From bb49dbba065bb74e062405468a5c2740770b4525 Mon Sep 17 00:00:00 2001 From: Yoga Pangestu Date: Sun, 29 Mar 2026 21:40:59 +0700 Subject: [PATCH] refactor: rename and reorganize study group and course schedule views for improved structure --- .../Information/CourseSchedule/Index.php | 2 +- .../Pages/Learning/StudyGroup/Index.php | 2 +- .../information/course-schedules.blade.php | 128 ++++++++++++++++ .../list-course-schedules.blade.php | 138 ------------------ .../study-groups.blade.php} | 0 5 files changed, 130 insertions(+), 140 deletions(-) create mode 100644 resources/views/filament/pages/information/course-schedules.blade.php delete mode 100644 resources/views/filament/pages/information/list-course-schedules.blade.php rename resources/views/filament/pages/{information/list-study-groups.blade.php => learning/study-groups.blade.php} (100%) diff --git a/app/Filament/Pages/Information/CourseSchedule/Index.php b/app/Filament/Pages/Information/CourseSchedule/Index.php index 9ff338d..5e04376 100644 --- a/app/Filament/Pages/Information/CourseSchedule/Index.php +++ b/app/Filament/Pages/Information/CourseSchedule/Index.php @@ -43,7 +43,7 @@ class Index extends Page implements HasActions, HasForms protected static ?string $slug = 'information/course-schedules'; - protected string $view = 'filament.pages.information.list-course-schedules'; + protected string $view = 'filament.pages.information.course-schedules'; public ?string $search = ''; diff --git a/app/Filament/Pages/Learning/StudyGroup/Index.php b/app/Filament/Pages/Learning/StudyGroup/Index.php index f18185f..2b5caa3 100644 --- a/app/Filament/Pages/Learning/StudyGroup/Index.php +++ b/app/Filament/Pages/Learning/StudyGroup/Index.php @@ -48,7 +48,7 @@ public static function getPagePermission(): string return 'View:StudyGroup'; } - protected string $view = 'filament.pages.information.list-study-groups'; + protected string $view = 'filament.pages.learning.study-groups'; public ?int $course_id = null; diff --git a/resources/views/filament/pages/information/course-schedules.blade.php b/resources/views/filament/pages/information/course-schedules.blade.php new file mode 100644 index 0000000..99ae0e2 --- /dev/null +++ b/resources/views/filament/pages/information/course-schedules.blade.php @@ -0,0 +1,128 @@ + + + List Jadwal Kuliah + Geser ke samping untuk melihat hari lainnya. + +
+
+ {{ $this->form }} +
+
+ + @if ($schedules->isNotEmpty()) +
+
+ + @foreach ($days as $dayNumber => $dayName) + @php + $daySchedules = $schedules->get($dayNumber); + @endphp + + @if ($daySchedules && $daySchedules->count() > 0) +
+ +
+ +

+ {{ $dayName }} +

+
+ +
+ @foreach ($daySchedules as $schedule) +
+ +
+
+
+ + {{ $schedule->course->code ?? 'MATKUL' }} + + + @if ($schedule->mode) + @php + $color = $schedule->mode->getColor(); + @endphp + + {{ $schedule->mode->getLabel() }} + + @endif +
+ + @if ($schedule->room) + + + {{ $schedule->room }} + + @endif +
+ +

+ {{ $schedule->course->name ?? 'Mata Kuliah Tidak Diketahui' }} +

+ +
+ + + {{ $schedule->course->lecturer ?? 'Dosen Belum Ditentukan' }} + +
+ +
+ @if ($schedule->course?->semester) + + + Semester {{ $schedule->course->semester }} + + @endif +
+ +
+
+ + {{ $schedule->start_time->format('H:i') }} + + {{ $schedule->end_time->format('H:i') }} +
+ + + {{ $schedule->course->credit ?? '-' }} SKS + +
+ + @canAny(['Update:CourseSchedule', 'Delete:CourseSchedule']) +
+ {{ ($this->editScheduleAction)(['schedule' => $schedule->id]) }} + + {{ ($this->deleteScheduleAction)(['schedule' => $schedule->id]) }} +
+ @endcanAny +
+
+ @endforeach +
+
+ @endif + @endforeach + +
+
+ @endif + + @if ($schedules->isEmpty()) + + + @endif +
+
diff --git a/resources/views/filament/pages/information/list-course-schedules.blade.php b/resources/views/filament/pages/information/list-course-schedules.blade.php deleted file mode 100644 index c56687b..0000000 --- a/resources/views/filament/pages/information/list-course-schedules.blade.php +++ /dev/null @@ -1,138 +0,0 @@ - -
- -
-
- - -
- Geser ke samping untuk melihat hari lainnya. -
-
-
- -
-
- {{ $this->form }} -
-
- - @if ($schedules->isNotEmpty()) -
-
- - @foreach ($days as $dayNumber => $dayName) - @php - $daySchedules = $schedules->get($dayNumber); - @endphp - - @if ($daySchedules && $daySchedules->count() > 0) -
- -
- -

- {{ $dayName }} -

-
- -
- @foreach ($daySchedules as $schedule) -
- -
-
-
- - {{ $schedule->course->code ?? 'MATKUL' }} - - - @if ($schedule->mode) - @php - $color = $schedule->mode->getColor(); - @endphp - - {{ $schedule->mode->getLabel() }} - - @endif -
- - @if ($schedule->room) - - - {{ $schedule->room }} - - @endif -
- -

- {{ $schedule->course->name ?? 'Mata Kuliah Tidak Diketahui' }} -

- -
- - - {{ $schedule->course->lecturer ?? 'Dosen Belum Ditentukan' }} - -
- -
- @if ($schedule->course?->semester) - - - Semester {{ $schedule->course->semester }} - - @endif -
- -
-
- - {{ $schedule->start_time->format('H:i') }} - - {{ $schedule->end_time->format('H:i') }} -
- - - {{ $schedule->course->credit ?? '-' }} SKS - -
- - @canAny(['Update:CourseSchedule', 'Delete:CourseSchedule']) -
- {{ ($this->editScheduleAction)(['schedule' => $schedule->id]) }} - - {{ ($this->deleteScheduleAction)(['schedule' => $schedule->id]) }} -
- @endcanAny -
-
- @endforeach -
-
- @endif - @endforeach - -
-
- @endif - - @if ($schedules->isEmpty()) - - - @endif -
-
-
diff --git a/resources/views/filament/pages/information/list-study-groups.blade.php b/resources/views/filament/pages/learning/study-groups.blade.php similarity index 100% rename from resources/views/filament/pages/information/list-study-groups.blade.php rename to resources/views/filament/pages/learning/study-groups.blade.php