feat(classes): server actions + page guard
classes.ts: class/session CRUD (classes.manage; delete refused once sessions/signups exist, archive instead), member signUpForClass / cancelMySignup as validated service-client writes enforcing eligibility, capacity vs waitlist, de-dupe and earliest-waitlist promotion on cancel, listUpcomingSessions (service-client counts so members see spots-left without seeing who signed up), instructor markAttendance and completeSession. completeSession awards a class's certification via the normal grantCertification path, so it only issues when the acting instructor also holds certifications.grant; otherwise completion still succeeds and reports certificatesSkipped. classes-guard mirrors the forms/certifications guards. Barrel + API_REFERENCE updated.
This commit is contained in:
@@ -50,3 +50,6 @@ export * from './forms'
|
||||
|
||||
// Certifications + Instructor capability
|
||||
export * from './certifications'
|
||||
|
||||
// Classes (offerings, sessions, signups)
|
||||
export * from './classes'
|
||||
|
||||
Reference in New Issue
Block a user