Overview
This document outlines the core business logic, operational rules, and workflows that govern the equestrian school management system.Student Lifecycle
Registration
Process:- Student provides personal information (DNI, name, birth date, phone, email)
- System validates DNI uniqueness
- Student selects monthly class plan (4, 8, 12, or 16 classes)
- Student configures horse arrangement (board type)
- System sets
activo: trueand recordsfechaInscripcion
fechaInscripcion: Current dateactivo:truepropietario:trueiftipoPension: "CABALLO_PROPIO", elsefalsecodigoArea+telefono: Formatted as+549{codigoArea}{telefono}
SIN_CABALLO):
- Student doesn’t reserve any horse
- School assigns available horse per class
cuotaPension: null- Most flexible option
RESERVA_ESCUELA):
- Student reserves a specific school horse
- Must select horse with
tipo: "ESCUELA" - Must select board quota (ENTERA, MEDIA, TERCIO)
- Horse is prioritized for this student
CABALLO_PROPIO):
- Student has private horse boarded at school
- Must select horse with
tipo: "PRIVADO" - Must select board quota (ENTERA, MEDIA, TERCIO)
- Sets
propietario: true - Horse can only be used by owner
Monthly Class Quota
Available Plans:- 4 classes/month
- 8 classes/month
- 12 classes/month
- 16 classes/month
- Normal: > 2 classes remaining
- Warning: ≤ 2 classes remaining (show alert)
- Exhausted: 0 classes remaining (allow with confirmation)
- Over-quota: Negative remaining (allow with confirmation)
- Trial classes (
esPrueba: true) do NOT count toward quota - Cancelled classes (
CANCELADA) do NOT count toward quota - Absences with notice (
ACA) policy-dependent (currently count) - Absences without notice (
ASA) count toward quota - Quota resets monthly (tracked per calendar month)
Student Status Management
Active Students (activo: true):
- Can be assigned to regular classes
- Cannot take trial classes
- Appear in student selection dropdowns
- Count toward active student metrics
activo: false):
- Cannot be assigned to regular classes
- Can take trial classes (if eligible)
- May appear in special dropdowns (trial class selection)
- Don’t count toward active metrics
- Manual process (edit student, set
activo: false) - Use when student pauses or leaves
- Preserves historical data
- Can be reactivated later
Trial Classes System
Purpose
Allow prospective students to try a class before enrolling.Types
Type 1: New Person
Who: Someone who has never been a student Process:- Create class with
esPrueba: true - Select “Persona nueva” option
- Enter first name and last name
- System creates
PersonaPruebarecord - Class has
alumnoId: null,personaPruebaId: {id}
Type 2: Existing Inactive Student
Who: Former student wanting to try a new specialty Requirements:- Student must be inactive (
activo: false) - Student must NOT have classes in that specialty
- Student must NOT have had trial class in that specialty
- Create class with
esPrueba: true - Select “Alumno existente” option
- Choose inactive student from dropdown
- System validates eligibility
- Class has
alumnoId: {id},personaPruebaId: null
Visual Identification
Calendar:- 🎓 Emoji indicator
- Orange border on class cell
- “Prueba” badge in details popover
- “Prueba” badge
- Shows person name instead of student name (for Type 1)
- Orange highlight
- Orange border in Excel export
- Special notation in printed materials
Business Rules
Rule 1: Trial classes do NOT count toward monthly quota Rule 2: Cannot repeat trial class in same specialty Rule 3: Cannot have trial class if already has classes in that specialty Rule 4: After trial class, person must enroll as regular student to continue Rule 5: Trial class data is preserved for conversion to regular studentClass Scheduling
Creation Methods
Method 1: From Classes Section
- Click “Nueva Clase” button
- Manually select all fields:
- Day (defaults to today)
- Time
- Duration (30 or 60 min)
- Student (or trial person)
- Instructor
- Horse
- Specialty
- Trial class flag (optional)
- System validates:
- End time ≤ 18:30
- No horse conflicts
- No instructor conflicts (warning only)
- Horse ownership (for private horses)
- Create with
estado: "PROGRAMADA"
Method 2: From Calendar (Day View)
- Click on empty cell (horse column × time row)
- System pre-fills:
- Day (from current date)
- Time (from row clicked)
- Horse (from column clicked)
- User completes:
- Student
- Instructor
- Specialty
- Duration
- System validates (same as Method 1)
- Create with
estado: "PROGRAMADA"
- Visual availability check
- Faster scheduling
- Immediate conflict visibility
Class States Flow
- Class starts
- Instructor marks as started
- Becomes non-editable
- Class finished successfully (can skip INICIADA)
- Counts as attended
- Becomes non-editable
- Class cancelled before starting
- Reason recorded in observations
- Does not count toward quota
- Becomes non-editable
- Student notified they won’t attend
- Better than ASA for student record
- May or may not count toward quota (policy)
- Becomes non-editable
- Student didn’t show up
- No advance notice
- Counts toward quota
- Negatively impacts student metrics
- Becomes non-editable
- Class in progress → finished
- Only valid transition from INICIADA
Horse Management
Horse Types
School Horses (ESCUELA):
- Owned by school
- Available to all students
- Can be reserved by students
- Used for trial classes
- Managed by school staff
PRIVADO):
- Owned by individual students
- Only owner can use
- Requires board payment
- Owner has
tipoPension: "CABALLO_PROPIO"
Assignment Logic
For Students Without Horse (SIN_CABALLO):
RESERVA_ESCUELA):
CABALLO_PROPIO):
Specialty-Specific Logic
EQUITACION (Regular Riding)
- Most common class type
- No special logic
- Available for all students
- Available for trial classes
ADIESTRAMIENTO (Horse Training)
- Focus on horse development
- May require experienced students
- Available for trial classes (conditional)
- Special horse requirements may apply
EQUINOTERAPIA (Equine Therapy)
- Therapeutic purpose
- May require special instructor certification
- Specific calm horse selection
- Available for trial classes
- May have different session structure
MONTA (Free Riding)
Special Behavior:- Automatically assigns placeholder student (ID 1)
- User cannot select student
- Used for open riding sessions
- Owner practicing with their horse
- Experienced riders practicing independently
Calendar Features
Copy Week
Use Case: Repeat weekly schedule to future weeks Process:- Select source week (any day in week)
- Select target week (any day in week)
- Select number of weeks to copy
- System copies all classes from source week
- Adjusts dates while preserving day-of-week
- All copied classes set to
estado: "PROGRAMADA"
- Source: March 10-16 (Week 1)
- Target: March 17 (start of Week 2)
- Weeks: 2
- Result: Copies Week 1 → Week 2 and Week 3
Cancel Full Day
Use Case: Cancel all classes on a day (rain, holiday, etc.) Process:- Select day in calendar (day view)
- Click “Cancelar Día” button
- Select cancellation reason
- System finds all
PROGRAMADAclasses - Sets estado →
CANCELADA - Records reason in observations
- Lluvia
- Feriado
- Mantenimiento
- Evento Especial
- Emergencia
- Otro (custom)
- Only affects
PROGRAMADAclasses - Leaves completed/cancelled classes untouched
- Batch operation (all at once)