Skip to content

Availability#76

Merged
Alaa2019-ml merged 3 commits intodevelopfrom
availability
Feb 17, 2026
Merged

Availability#76
Alaa2019-ml merged 3 commits intodevelopfrom
availability

Conversation

@Alaa2019-ml
Copy link
Contributor

Implemented weekly availability end-to-end for teacher profile schedule.

Backend

Added week-based schedule endpoints: PUT /api/teachers/me/schedule/week GET /api/teachers/me/schedule/week Removed day-based schedule flow (routes/controller/query/validators/types) to match current UX.

Frontend

Connected the schedule UI to the backend so teachers can save and view their weekly availability. When the schedule is opened, existing availability is loaded and shown. When changes are saved, the updated availability is sent to the backend and reflected correctly in the UI.

Copilot AI review requested due to automatic review settings February 17, 2026 14:55
@HackYourFutures HackYourFutures temporarily deployed to study-bridge-availabili-poafsr February 17, 2026 14:55 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

Implements week-based teacher availability scheduling end-to-end, aligning backend API and frontend UI to save/load a full week of time ranges.

Changes:

  • Replaced day-based availability endpoints/validation/types with week-based /api/teachers/me/schedule/week GET/PUT.
  • Added backend payload validation for per-day slot arrays with overlap/duplicate/range rules applied across the week.
  • Wired the Teacher Profile schedule UI to load weekly availability on open and persist updates on save (with mapping between UI hour-cells and API time ranges).

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
server/src/validation/availabilitySchedule/teacher/teacherScheduleValidationMiddleware.ts Adds week-based payload + slot-rule validation; removes day-based validators.
server/src/types/teacher/teacher.types.ts Replaces day/slots request body types with a week replacement payload type.
server/src/routes/teacherRoute.ts Switches teacher schedule routes to GET/PUT /me/schedule/week.
server/src/repositories/queryRepositories/teacher.query.ts Replaces day upsert/query with full-week replace/fetch queries.
server/src/controllers/teacher.controller.ts Adds controllers for weekly fetch + replace.
client/src/pages/teacherProfile/scheduleMappers.ts New UI↔API mapping utilities (grid hour cells ↔ merged weekly ranges).
client/src/pages/teacherProfile/TeacherProfile.tsx Loads weekly availability on schedule open; saves weekly availability on schedule save.
client/src/components/teacherProfileSection/LessonSchedule.tsx Allows onSave to be async; awaits before closing modal.
client/src/api/teacher/teacher.api.ts Adds protected API calls for weekly schedule GET/PUT.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Alaa2019-ml Alaa2019-ml merged commit 0dbd3e3 into develop Feb 17, 2026
8 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.

3 participants