Skip to content

Feature/regular students part1#137

Merged
dashaaaa21 merged 5 commits intodevelopfrom
feature/regular-students-part1
Mar 1, 2026
Merged

Feature/regular students part1#137
dashaaaa21 merged 5 commits intodevelopfrom
feature/regular-students-part1

Conversation

@dashaaaa21
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings March 1, 2026 17:35
@HackYourFutures HackYourFutures temporarily deployed to study-bridge-feature-re-hrqmfa March 1, 2026 17:36 Inactive
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.ts API 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, and useUpdateWeeklyScheduleMutation, plus corresponding entries in queryKeys.ts.
  • Two new modal components: RegularStudentScheduleModal (teacher-facing, for editing a student's weekly slots) and ViewScheduleModal (student-facing, read-only view), plus new isRegularStudent/weeklySchedule fields on the Appointment type.

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.

@dashaaaa21 dashaaaa21 merged commit 06c2b51 into develop Mar 1, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants