Conversation
There was a problem hiding this comment.
Pull request overview
This PR ("Feature/regular students part1") introduces the data layer and UI components needed to support a "Regular Students" feature in what appears to be a tutoring/appointment platform. It adds API functions, React Query hooks (queries and mutations), and two modal components for managing and viewing per-student weekly lesson schedules. These new artifacts provide the foundational plumbing (server-side storage, API calls, and cache invalidation) that replaces the existing localStorage-based regular-students management that currently lives in TeacherAppointments.tsx.
Changes:
- New
regularStudents.api.tsAPI module with functions to set/remove a student as "regular," update their weekly schedule, and fetch regular student/teacher lists. - New React Query hooks:
useRegularStudentsQuery,useRegularTeachersQuery,useSetRegularStudentMutation,useRemoveRegularStudentMutation, anduseUpdateWeeklyScheduleMutation, plus corresponding entries inqueryKeys.ts. - Two new modal components:
RegularStudentScheduleModal(teacher-facing, for editing a student's weekly slots) andViewScheduleModal(student-facing, read-only view), plus newisRegularStudent/weeklySchedulefields on theAppointmenttype.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
client/src/types/appointments.types.ts |
Adds isRegularStudent, addedToRegularAt, weeklySchedule to Appointment; adds new WeeklyScheduleSlot interface |
client/src/features/queryKeys.ts |
Adds regularStudents and regularTeachers query key factories |
client/src/api/appointments/regularStudents.api.ts |
New API module: set/remove regular, update weekly schedule, get regular students/teachers |
client/src/features/appointments/query/useRegularStudentsQuery.ts |
New query hook for fetching regular students |
client/src/features/appointments/query/useRegularTeachersQuery.ts |
New query hook for fetching regular teachers |
client/src/features/appointments/mutations/useSetRegularStudentMutation.ts |
New mutation hook to mark a student as regular |
client/src/features/appointments/mutations/useRemoveRegularStudentMutation.ts |
New mutation hook to unmark a regular student |
client/src/features/appointments/mutations/useUpdateWeeklyScheduleMutation.ts |
New mutation hook to update a regular student's weekly schedule |
client/src/components/regularStudentScheduleModal/RegularStudentScheduleModal.tsx |
Teacher-facing modal for managing a student's weekly lesson slots |
client/src/components/regularStudentScheduleModal/ViewScheduleModal.tsx |
Student-facing read-only modal showing their weekly schedule |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.