Skip to content

feat: sessions and schedule tabs with bulk actions and session manage…#1094

Closed
CK-7vn wants to merge 25 commits intoCK-7vn/class-detail-rosterfrom
CK-7vn/class-detail-sessions
Closed

feat: sessions and schedule tabs with bulk actions and session manage…#1094
CK-7vn wants to merge 25 commits intoCK-7vn/class-detail-rosterfrom
CK-7vn/class-detail-sessions

Conversation

@CK-7vn
Copy link
Copy Markdown
Member

@CK-7vn CK-7vn commented Feb 26, 2026

Class Details PR - 3

Pre-Submission PR Checklist

  • No debug/console/fmt.Println statements
  • Unnecessary development comments removed
  • All acceptance criteria verified
  • Functions according to ticket specifications
  • Tested manually where applicable
  • Branch rebased with latest main
  • No business logic exists within the database layer

Description of the change

Adds the Sessions and Schedule tabs to the class detail page, along with new session management features.

Sessions Tab (SessionsTab.tsx)

  • Full session list with status/time filters, pagination, and stat counters (completed, missing, upcoming, cancelled)
  • Selection checkboxes on upcoming non-cancelled session rows with selectedDates state that clears on filter change
  • Floating action bar appears when sessions are selected — provides bulk Cancel Sessions, Change Instructor, and Change Room actions
  • Individual per-session action buttons: Reschedule, Cancel, Change Instructor, Change Room
  • Missing attendance warning banner with quick filter link

Schedule Tab (ScheduleTab.tsx)

  • Interactive calendar view showing class days, cancelled sessions, and today indicator
  • Month navigation with session detail sidebar (Sheet) showing class info, status badges, and modify actions
  • Schedule pattern summary cards (days/time/room, duration/credit hours)

New Modals

  • ChangeInstructorModal.tsx — single or bulk mode, fetches users by role, PATCH with instructor_id
  • ChangeRoomModal.tsx — single or bulk mode, fetches rooms, PATCH with room_id

Enhanced Existing Modals

  • BulkSessionsModal.tsx — cancel action now uses CancelEventReason enum dropdown instead of free-text; conditional "Other" textarea; amber warning box showing impact
  • CancelSessionModal.tsx — clears note field when switching away from "Other (add note)" reason

Supporting

  • RescheduleSessionModal.tsx — date + optional time reschedule via PATCH
  • index.tsx — imports and renders Sessions + Schedule tabs (now 4 total tabs: Roster, Enrollment History, Sessions, Schedule)

@calisio calisio self-requested a review March 2, 2026 17:16
@CK-7vn CK-7vn force-pushed the CK-7vn/class-detail-roster branch from 10e9271 to c84b162 Compare March 5, 2026 21:56
@CK-7vn CK-7vn requested a review from a team as a code owner March 5, 2026 21:56
@CK-7vn CK-7vn force-pushed the CK-7vn/class-detail-roster branch from c84b162 to f39d26e Compare March 5, 2026 21:57
@CK-7vn CK-7vn force-pushed the CK-7vn/class-detail-sessions branch from cc8d6d3 to 2775eed Compare March 5, 2026 22:00
@CK-7vn CK-7vn force-pushed the CK-7vn/class-detail-roster branch from f39d26e to 94dd108 Compare March 7, 2026 06:35
@CK-7vn CK-7vn force-pushed the CK-7vn/class-detail-sessions branch from 2775eed to 202e7a8 Compare March 7, 2026 06:36
@CK-7vn CK-7vn force-pushed the CK-7vn/class-detail-roster branch from 94dd108 to abe8f5e Compare March 7, 2026 08:53
@CK-7vn CK-7vn force-pushed the CK-7vn/class-detail-sessions branch from 202e7a8 to 41e3174 Compare March 7, 2026 09:18
Copy link
Copy Markdown
Contributor

@calisio calisio left a comment

Choose a reason for hiding this comment

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

  1. i dont think you have any logic in here for rescheduled sessions, which should look like the figma below- please make the undo actually grey border:
Image
  1. should be able to undo a cancelled class. note- can you make the undos look the same (make them both with grey border)? Sorry that is not consistent in the figma
Image
  1. when you click on a class session, you should get a popout on the right side with the actions. there are 5 relevant popouts:
Image Image Image Image Image
  1. can you remove "- All Time" in "Recent sessions requiring action or review - All Time" right below "Past & Today"

@CK-7vn
Copy link
Copy Markdown
Member Author

CK-7vn commented Mar 10, 2026

@calisio I explicitly kept the reasons in the modals the same, they're not consistent in the prototype just as a note. For instance some say "Maintenance" and then some say "Maintenance required" the ones in this branch are unified.

@CK-7vn CK-7vn force-pushed the CK-7vn/class-detail-roster branch from e526c81 to b1968ca Compare March 12, 2026 17:46
@CK-7vn CK-7vn force-pushed the CK-7vn/class-detail-sessions branch from cf6606a to 53ca3c1 Compare March 12, 2026 17:59
@calisio
Copy link
Copy Markdown
Contributor

calisio commented Mar 13, 2026

design looks perfect! few notes on functionality:

  1. click on an upcoming session, opens side panel, click on change instructor, clicking "other" option in the side panel , the add a note option does not appear
  2. same as above but for change room
  3. also happens on bulk change instructor and bulk change room

open to your opinion on the above though - right now we dont require a reason in the backend for change room or instructor, so we could also take that out. My argument to include the reason is so that we can get clearer statistics for reporting reasons for the future. Curious what your opinion is on it.

I checked the rest of the functionality and looks good!

@CK-7vn CK-7vn force-pushed the CK-7vn/class-detail-sessions branch from 0be7f83 to e7818d5 Compare March 16, 2026 18:31
@CK-7vn CK-7vn force-pushed the CK-7vn/class-detail-roster branch 2 times, most recently from 883f658 to 990d61a Compare March 16, 2026 18:50
@CK-7vn CK-7vn force-pushed the CK-7vn/class-detail-sessions branch 2 times, most recently from dc0584a to 5dd576b Compare March 17, 2026 20:44
@CK-7vn CK-7vn force-pushed the CK-7vn/class-detail-roster branch from 990d61a to 206634b Compare March 17, 2026 20:47
@CK-7vn CK-7vn force-pushed the CK-7vn/class-detail-sessions branch from 5dd576b to 6a3c809 Compare March 17, 2026 20:49
carddev81 and others added 6 commits March 23, 2026 08:50
Backend: migration for instructor overrides, database layer updates
(class events, program classes, programs, users), handler updates
(enrollments, class events, classes), and class event model changes.

Frontend: type definitions (attendance, events, program), shared UI
components (Pagination, dialog, drawer, sheet, alert-dialog),
Breadcrumbs, attendance utilities, layout and route loader updates,
BulkCancelClassesModal, and page updates (Programs, EventAttendance,
AddClassEnrollments, ClassManagementForm, ProgramOverviewDashboard).
Adds the refactored class detail page with the new shell layout:
breadcrumbs, ClassHeader with stat cards, header actions (edit,
take attendance, delete), and the first two tabs.

Roster tab: resident list with search/filter, enroll/unenroll modals,
change enrollment status, and bulk graduate functionality.

Enrollment History tab: historical enrollment records with filtering.

Also updates ClassesPage (adds TakeAttendanceModal integration) and
program-routes (adds class detail route).
CK-7vn added 18 commits March 23, 2026 11:43
…ment

Add Sessions and Schedule tabs to class detail page. Implement selection
management with floating action bar for bulk operations. Add individual
Change Instructor and Change Room modals. Enhance BulkSessionsModal
cancel action with CancelEventReason enum dropdown. Fix CancelSessionModal
note clearing when switching away from Other reason.
Update ChangeInstructorModal and ChangeRoomModal button wrapper gap
from gap-2 to gap-3 with justify-end first, and update "Sessions to
Update" label to use font-medium with brand color.
@CK-7vn CK-7vn force-pushed the CK-7vn/class-detail-sessions branch from 6a3c809 to 33a115c Compare March 23, 2026 17:33
@carddev81
Copy link
Copy Markdown
Contributor

@CK-7vn These are issues found in the schedule tab

  1. Schedule of class is Oct. 01, 2025 to Jan. 10, 2318--Duration card is displaying incorrect start date, Sept 30.
  2. The Schedule color key is off, basically the order needs to be corrected
  3. Toast message incorrect when cancelling class
  4. When class is cancelled the status doesn't display

Target

target-schedule

Current

current-schedule
  1. Toast message incorrect when changing instructor
  2. Toast message incorrect when changing room
  3. Change Room has description box
  4. Change Instructor has description box
  5. When cancelling/Room change/Instructor change and selecting the 'Apply this change to all future sessions' I believe this should do the action on that date plus all days in the future from that day versus all the days before my selection. For example when canceling next months classes it also cancels this months classes too.
  6. Rescheduling may not be functioning correctly--it isn't matching figma and it doesn't add the new scheduled date to calendar? Or maybe it isnt suppposed too? We will need @Carolina's eye for sure, just to confirm that the day isn't supposed to be marked on the calendar.
  7. Scrollbar issue
2026-03-23.12-18-07.mp4

@CK-7vn CK-7vn closed this Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants