Merged
Conversation
Alaa2019-ml
approved these changes
Feb 19, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR implements two main features: a sign-in modal for unauthenticated users attempting to book appointments, and functionality for deleting past appointments. Additionally, it refactors several icon components to use a consistent forwardRef and memo pattern with currentColor for styling.
Changes:
- Added a sign-in modal that appears when unauthenticated users try to book appointments via teacher cards or teacher schedule pages
- Implemented appointment deletion functionality restricted to past appointments only, with both single and bulk delete operations
- Refactored icon components (Cross, Appointments, HomeSection1Icon) to use forwardRef/memo pattern and updated SignInIcon for the new modal
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
| server/src/services/appointment/appointment.service.ts | Adds deleteAppointment method with authorization and past-appointment validation |
| server/src/routes/appointmentRoute.ts | Adds DELETE /:id route with authentication and validation middleware |
| server/src/repositories/commandRepositories/appointment.command.ts | Implements deleteAppointment command in repository layer |
| server/src/controllers/appointment.controller.ts | Adds deleteAppointmentController with user authorization |
| client/src/store/modals.store.ts | Extends modal types to include "signIn" modal |
| client/src/components/auth/signInConfirmation/SignInConfirmation.tsx | New modal component prompting unauthenticated users to sign in |
| client/src/components/modalHost/modalHost.tsx | Integrates SignInConfirmation modal into modal host |
| client/src/components/teacherSection/teacherSchedule/TeacherSchedule.tsx | Adds authentication check before booking, shows sign-in modal for guests |
| client/src/components/teacherCard/teacherCard.tsx | Replaces NavLink with authentication-gated navigation, shows sign-in modal |
| client/src/features/appointments/query/useTeacherAppointmentsQuery.ts | Adds user authentication check to query enablement |
| client/src/features/appointments/mutations/useDeleteAppointmentMutation.ts | New mutation hook for appointment deletion with cache invalidation |
| client/src/pages/privetTeachersPages/teacherAppointments/TeacherAppointments.tsx | Adds delete functionality with past appointment validation and bulk operations |
| client/src/pages/privateStudentsPages/clientsAppointments/ClientsAppointments.tsx | Adds delete functionality with past appointment validation and bulk operations |
| client/src/components/table/LessonsTable.tsx | Adds selection management for bulk operations with past appointment filtering |
| client/src/components/table/LessonRow.tsx | Adds delete button and selection controls with canSelect/canDelete props |
| client/src/components/table/LessonsTableHeader.tsx | Adds select-all functionality and bulk delete button |
| client/src/components/icons/SignInIcon.tsx | New icon component for sign-in modal |
| client/src/components/icons/HomeSection1Icon.tsx | Refactored to use forwardRef/memo pattern |
| client/src/components/icons/Cross.tsx | Refactored to use forwardRef/memo pattern |
| client/src/components/icons/Appointments.tsx | Refactored to use forwardRef/memo pattern |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
client/src/pages/privetTeachersPages/teacherAppointments/TeacherAppointments.tsx
Show resolved
Hide resolved
client/src/pages/privetTeachersPages/teacherAppointments/TeacherAppointments.tsx
Show resolved
Hide resolved
client/src/pages/privateStudentsPages/clientsAppointments/ClientsAppointments.tsx
Show resolved
Hide resolved
client/src/pages/privetTeachersPages/teacherAppointments/TeacherAppointments.tsx
Show resolved
Hide resolved
client/src/features/appointments/mutations/useDeleteAppointmentMutation.ts
Show resolved
Hide resolved
client/src/pages/privetTeachersPages/teacherAppointments/TeacherAppointments.tsx
Show resolved
Hide resolved
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.
I created a modal that appears when a user opens the Teachers page. After selecting a teacher and clicking “Book,” this modal is displayed. It requires the user to sign in before proceeding. Only after signing in can the user book an appointment.