Add group-class enrolment (year commitment, capacity, registration gate) #21
Reference in New Issue
Block a user
Delete Branch "feature/group-classes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements #4 (Group classes) — year-commitment enrolment reusing the registration gate built in #3.
Backend
us_group_enrollmentstable.Enrollmentvalue object (active/cancelled/completed) +EnrollmentRepository—countActiveForOffering+hasActiveEnrollment(capacity + duplicate guards), per-student/per-instructor/all-active queries,updateStatus.EnrollmentEndpoint:GET /enrollments(student / instructor / studio-admin scoped) andPOST /enrollments— validates the offering is agroup_class, enforces capacity and no-duplicate, runs the reusedRegistrationGate(intake questions + booking-scoped policies), creates the enrolment (status = active), records answers/acceptances (typeenrollment).Admin & front end
view_all_lessons) listing active enrolments.[us_group_classes]shortcode (GroupClassPage) +group-classes.js: lists open group classes → questions + policies enrol form →POST /enrollments.Payment seam
Deferred to #7: an enrolment lands
status = active,payment_id = null. The pay→confirm + receipt step plugs in later.Notes
RegistrationGate/endpoints). Adding Jest is a good fit alongside #7 (Stripe JS).GET /enrollments.Tests
tests/Unit/GroupClass/—Enrollment,EnrollmentRepository.composer test(121 tests),composer cs, PHPStan level 6, and no-debug all pass.Refs #4
🤖 Generated with Claude Code