Backend for regular students - #135
Merged
Merged
Conversation
…ate weekly schedule
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a "regular students" feature to the backend, allowing teachers to mark appointment participants as regular (recurring) students, update their weekly schedules, and query the list of regular students/teachers. It also improves the calendar UI on the client side with month-navigation controls and fixes a date-selection highlight bug.
Changes:
- New backend endpoints and data model fields (
isRegularStudent,weeklySchedule,addedToRegularAt) for managing regular student relationships on appointments - Calendar component refactored to support month navigation (previous/next) and corrected selected-date highlighting across months
- Removed booked-slot overlay from the teacher's lesson-schedule editor
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
server/src/types/appointment/appointment.types.ts |
Adds WeeklyScheduleSlot and UpdateWeeklyScheduleType interfaces |
server/src/db/schemes/types/appointment.types.ts |
Extends AppointmentTypeDB with new regular-student fields |
server/src/db/schemes/appointmentSchema.ts |
Adds Mongoose schema fields for isRegularStudent, weeklySchedule, addedToRegularAt |
server/src/repositories/commandRepositories/appointment.command.ts |
Adds setRegularStudent, removeRegularStudent, updateWeeklySchedule DB operations |
server/src/repositories/queryRepositories/appointment.query.ts |
Adds getRegularStudentsByTeacher and getRegularTeachersByStudent queries with pagination |
server/src/services/appointment/appointment.service.ts |
Adds service methods for all new regular-student operations and extends formatAppointmentResponse |
server/src/controllers/appointment.controller.ts |
Adds five new controller methods for the new endpoints |
server/src/routes/appointmentRoute.ts |
Registers the five new routes |
client/src/pages/privetTeachersPages/teacherProfile/TeacherProfile.tsx |
Removes unused booked-slots query and helper |
client/src/components/teacherProfileSection/LessonSchedule.tsx |
Removes booked-slot UI and related logic |
client/src/components/teacherSection/teacherSchedule/Calendar/Calendar.tsx |
Adds month navigation and fixes selected-date highlight for non-current months |
client/src/components/icons/ChevronLeft.tsx |
New chevron-left SVG icon component |
client/src/components/icons/ChevronRight.tsx |
New chevron-right SVG icon component |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Alaa2019-ml
approved these changes
Mar 1, 2026
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.