Bulk Class Session Cancellation by Instructor #1050
Closed
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.
Implement bulk cancellation of class event sessions for specific instructors within a date range. This feature enables administrators to efficiently cancel multiple class sessions when an instructor is on PTO, sick leave, or otherwise unavailable, with full audit trail visibility in Class History.
Changes
Backend
POST /api/program-classes/bulk-cancel- Handles bulk session cancellationsBulkCancelSessions()- Processes recurring events and creates override recordsinstructor_idforeign key toprogram_classestable with proper indexing/api/facilities/{id}/instructorsendpoint returning facility admins onlyFrontend
BulkCancelSessionsModal.tsx- Full cancellation workflow with previewClassManagementForm.tsx- Replaced text input with instructor dropdownActivityHistoryCardwith full audit detailsKey Features
ProgramClassEventOverriderecords for each cancelled sessionChangeLogEntryrecordsFiles Changed
backend/src/database/program_classes.go- Bulk cancellation logicbackend/src/handlers/classes_handler.go- API endpointsbackend/src/handlers/facilities_handler.go- Instructor queriesbackend/src/models/program_classes.go- Data modelsbackend/migrations/00061_add_instructor_fk.sql- Database schemafrontend/src/Components/modals/BulkCancelSessionsModal.tsx- Modal UIfrontend/src/Components/forms/ClassManagementForm.tsx- Form updatesfrontend/src/Components/ClassLayout.tsx- Integration pointRelated Asana Task: