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:
Moheeb Zara
2026-05-16 19:32:17 -07:00
parent dc23e9261f
commit 2732269d5f
4 changed files with 674 additions and 0 deletions
+3
View File
@@ -50,3 +50,6 @@ export * from './forms'
// Certifications + Instructor capability
export * from './certifications'
// Classes (offerings, sessions, signups)
export * from './classes'