Add lessons module, rate cycles, EC2 deploy scripts, and help content

- Lessons module: lesson types, instructors, schedule slots, enrollments,
  sessions (list + week grid view), lesson plans, grading scales, templates
- Rate cycles: replace monthly_rate with billing_interval + billing_unit on
  enrollments; add weekly/monthly/quarterly rate presets to lesson types and
  schedule slots with auto-fill on enrollment form
- Member detail page: tabbed layout for details, identity documents, enrollments
- Sessions week view: custom 7-column grid replacing react-big-calendar
- Music store seed: instructors, lesson types, slots, enrollments, sessions,
  grading scale, lesson plan template
- Scrollbar styling: themed to match sidebar/app palette
- deploy/: EC2 setup and redeploy scripts, nginx config, systemd service
- Help: add Lessons category (overview, types, instructors, slots, enrollments,
  sessions, plans/grading); collapsible sidebar with independent scroll;
  remove POS/accounting references from docs
This commit is contained in:
Ryan Moon
2026-03-30 18:52:57 -05:00
parent 7680a73d88
commit 5ad27bc196
47 changed files with 6303 additions and 139 deletions

View File

@@ -30,7 +30,9 @@ export const LessonTypeCreateSchema = z.object({
instrument: opt(z.string().max(100)),
durationMinutes: z.coerce.number().int().min(5).max(480),
lessonFormat: LessonFormat.default('private'),
baseRateMonthly: z.coerce.number().min(0).optional(),
rateWeekly: opt(z.coerce.number().min(0)),
rateMonthly: opt(z.coerce.number().min(0)),
rateQuarterly: opt(z.coerce.number().min(0)),
})
export type LessonTypeCreateInput = z.infer<typeof LessonTypeCreateSchema>
@@ -46,6 +48,9 @@ export const ScheduleSlotCreateSchema = z.object({
startTime: z.string().regex(/^\d{2}:\d{2}$/, 'Must be HH:MM format'),
room: opt(z.string().max(100)),
maxStudents: z.coerce.number().int().min(1).default(1),
rateWeekly: opt(z.coerce.number().min(0)),
rateMonthly: opt(z.coerce.number().min(0)),
rateQuarterly: opt(z.coerce.number().min(0)),
})
export type ScheduleSlotCreateInput = z.infer<typeof ScheduleSlotCreateSchema>
@@ -64,7 +69,9 @@ export const EnrollmentCreateSchema = z.object({
instructorId: z.string().uuid(),
startDate: z.string().min(1),
endDate: opt(z.string()),
monthlyRate: z.coerce.number().min(0).optional(),
rate: opt(z.coerce.number().min(0)),
billingInterval: opt(z.coerce.number().int().min(1)),
billingUnit: opt(z.enum(['day', 'week', 'month', 'quarter', 'year'])),
notes: opt(z.string()),
})
export type EnrollmentCreateInput = z.infer<typeof EnrollmentCreateSchema>