Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request refactors the modal system to improve user experience by centralizing modal dialogs and changing the booking flow. Users can now view teacher details without being immediately prompted to sign in, and the booking modal is triggered when selecting a time slot. The PR also replaces native window.confirm dialogs with a custom styled confirmation modal for deletion operations.
Changes:
- Added a reusable
ConfirmDialogcomponent and integrated it into the modal management system - Modified
TeacherCardto conditionally show the Book button and navigate to teacher detail page instead of opening modals directly - Refactored booking flow in
TeacherScheduleto open the booking modal immediately when a time slot is selected (after authentication check) - Replaced
window.confirmcalls with customConfirmDialogmodal in appointment deletion flows
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| client/src/store/modals.store.ts | Added confirmDelete modal type and its payload structure to the centralized modal store |
| client/src/components/confirmDialog/ConfirmDialog.tsx | New reusable confirmation dialog component with customizable title, message, and button text |
| client/src/components/modalHost/modalHost.tsx | Integrated the new ConfirmDialog into the modal host to render confirmDelete modals |
| client/src/components/teacherCard/teacherCard.tsx | Added optional showBookButton prop and simplified Book button to navigate to detail page instead of opening modals |
| client/src/components/teacherSection/teacherSchedule/TeacherSchedule.tsx | Modified to open booking modal directly when time slot is selected, after authentication check |
| client/src/pages/teacherDetail/teacherDetail.tsx | Passed showBookButton={false} to hide the Book button on the detail page |
| client/src/pages/privetTeachersPages/teacherAppointments/TeacherAppointments.tsx | Replaced window.confirm with ConfirmDialog modal for appointment deletions |
| client/src/pages/privateStudentsPages/clientsAppointments/ClientsAppointments.tsx | Replaced window.confirm with ConfirmDialog modal for appointment deletions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
client/src/pages/privetTeachersPages/teacherAppointments/TeacherAppointments.tsx
Outdated
Show resolved
Hide resolved
client/src/pages/privateStudentsPages/clientsAppointments/ClientsAppointments.tsx
Outdated
Show resolved
Hide resolved
client/src/components/teacherSection/teacherSchedule/TeacherSchedule.tsx
Outdated
Show resolved
Hide resolved
Dmytro-Doronin
approved these changes
Feb 19, 2026
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.
Now will be visible on teacherDetail page, user can see all information about teacher, and after need sign in when will be want do appointment