feat: enhance sorting in CourseService for improved course selection
This commit is contained in:
parent
a94ebfb77d
commit
8528a3258d
@ -16,6 +16,7 @@ public function getAllForSelect(): Collection
|
||||
->with('department:id,name')
|
||||
->orderBy('departments.name')
|
||||
->orderBy('courses.semester_number')
|
||||
->orderBy('courses.name')
|
||||
->get();
|
||||
}
|
||||
|
||||
@ -45,6 +46,7 @@ public function paginated(int $perPage = 25, string $search = '', ?int $departme
|
||||
->when($user->hasRole('dosen'), fn ($q) => $q->whereIn('courses.department_id', $user->lecturer?->departments()->pluck('departments.id') ?? []))
|
||||
->orderBy('departments.name')
|
||||
->orderBy('courses.semester_number')
|
||||
->orderBy('courses.name')
|
||||
->paginate($perPage);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user