Skip to main content

Overview

Trial classes (clases de prueba) allow prospective students to experience the equestrian school before enrolling formally. The system supports two types of trial classes:
  1. New Person: Someone who has never been a student
  2. Existing Inactive Student: A registered but inactive student trying a new specialty

What is a Trial Class?

From the README:
Una clase de prueba permite que una persona sin cuenta de alumno activo pueda tomar una clase para evaluar la escuela antes de inscribirse formalmente.
See: ~/workspace/source/README.md:153-154
Trial classes are identified with the 🎓 emoji in the calendar and have special visual indicators.

Trial Class Types

Type 1: New Person

Persona Nueva

For someone who has never been enrolled at the school

Process

  1. Mark the “Es clase de prueba” checkbox
  2. Select “Persona nueva” option
  3. Enter first name and last name
  4. Complete other class details (instructor, horse, time)
  5. Submit

System Behavior

ClaseForm.tsx
if (esPruebaChecked && tipoPrueba === "persona_nueva") {
  // Clase de prueba - persona nueva
  if (!nombrePrueba.trim() || !apellidoPrueba.trim()) {
    toast.error("Ingresá nombre y apellido de la persona de prueba");
    return;
  }

  try {
    const personaPrueba = await personasPruebaApi.crear({
      nombre: nombrePrueba.trim(),
      apellido: apellidoPrueba.trim(),
    });
    personaPruebaId = personaPrueba.id;
    alumnoIdFinal = null;
  } catch {
    toast.error("Error al registrar la persona de prueba");
    return;
  }
}
See: ~/workspace/source/src/components/forms/ClaseForm.tsx:168-186
The person is registered as “Persona de Prueba” in the system, not as a full student account.

Type 2: Existing Inactive Student

Alumno Existente Inactivo

For a registered student who wants to try a new specialty

Requirements

Prerequisites:
  • Student must be INACTIVE
  • Student must NOT have any classes (programadas or completadas) in that specialty

Process

  1. Mark the “Es clase de prueba” checkbox
  2. Select “Alumno existente” option
  3. Choose the inactive student from the dropdown
  4. System validates eligibility automatically
  5. Complete other class details
  6. Submit

Trial Class Form

The trial class section appears in the form only during creation:
ClaseForm.tsx
{/* Clase de prueba (solo en creación y si NO es MONTA) */}
{!clase && especialidad !== "MONTA" && (
  <div className="space-y-3 rounded-md border p-3">
    <div className="flex items-center gap-2">
      <Checkbox
        id="esPrueba"
        checked={esPruebaChecked}
        onCheckedChange={(checked) =>
          setEsPruebaChecked(checked as boolean)
        }
      />
      <Label htmlFor="esPrueba" className="font-normal cursor-pointer">
        Es clase de prueba
      </Label>
    </div>

    {esPruebaChecked && (
      <RadioGroup
        value={tipoPrueba}
        onValueChange={(value) =>
          setTipoPrueba(value as "alumno_existente" | "persona_nueva")
        }
      >
        <div className="flex items-center space-x-2">
          <RadioGroupItem
            value="alumno_existente"
            id="alumno_existente"
          />
          <Label htmlFor="alumno_existente" className="font-normal">
            Alumno existente
          </Label>
        </div>
        <div className="flex items-center space-x-2">
          <RadioGroupItem value="persona_nueva" id="persona_nueva" />
          <Label htmlFor="persona_nueva" className="font-normal">
            Persona nueva (registrar temporalmente)
          </Label>
        </div>
      </RadioGroup>
    )}

    {esPruebaChecked && tipoPrueba === "persona_nueva" && (
      <div className="grid grid-cols-2 gap-2">
        <Input
          placeholder="Nombre"
          value={nombrePrueba}
          onChange={(e) => setNombrePrueba(e.target.value)}
        />
        <Input
          placeholder="Apellido"
          value={apellidoPrueba}
          onChange={(e) => setApellidoPrueba(e.target.value)}
        />
      </div>
    )}
  </div>
)}
See: ~/workspace/source/src/components/forms/ClaseForm.tsx:314-370

Validation Rules

The system enforces strict validation rules for trial classes:

Rule 1: No Existing Classes

A student cannot have a trial class if they already have classes (scheduled or completed) in that specialty.
From the README:
Regla 1: Un alumno NO puede tener clase de prueba si ya tiene clases (programadas o completadas) de esa especialidad
See: ~/workspace/source/README.md:175

Rule 2: No Duplicate Trials

A student cannot repeat a trial class for the same specialty.
From the README:
Regla 2: Un alumno NO puede repetir clase de prueba de la misma especialidad
See: ~/workspace/source/README.md:177

Rule 3: Doesn’t Count Toward Quota

Trial classes do not count toward the student’s monthly class quota.
From the README:
Regla 3: Las clases de prueba NO cuentan para la cuota mensual del alumno
See: ~/workspace/source/README.md:179

Validation Implementation

ClaseForm.tsx
if (
  !clase &&
  esPruebaChecked &&
  tipoPrueba === "alumno_existente" &&
  alumno
) {
  const { esValido, mensaje } = validarClasePrueba(
    clases,
    alumno,
    especialidad as Clase["especialidad"],
    clase?.id,
  );
  if (!esValido) {
    toast.error(mensaje);
    return;
  }
}
See: ~/workspace/source/src/components/forms/ClaseForm.tsx:200-216

Visual Indicators

Trial classes have special visual identification throughout the system:

Calendar

🎓 Emoji displayed in calendar cells

Border

Orange border highlighting the trial class

Badge

“Prueba” badge in class details

Alert

Informative alert when editing
From the README:
Las clases de prueba se identifican con:
  • 🎓 Emoji en el calendario
  • Borde naranja en la celda
  • Badge “Prueba” en los detalles
  • Alerta informativa al editar
See: ~/workspace/source/README.md:182-186

Trial Class Workflow

For New Person

1

Contact

Prospective student contacts the school expressing interest
2

Schedule

Administrator creates a trial class, marking it as “persona nueva”
3

Input Details

Enter first and last name of the prospective student
4

Complete Class

After the trial class, if interested, proceed with full enrollment
5

Convert

Create full student account with all required information

For Existing Inactive Student

1

Request

Inactive student requests to try a new specialty (e.g., EQUINOTERAPIA)
2

Verify

Administrator verifies student has no classes in that specialty
3

Schedule

Create trial class selecting the inactive student
4

Validate

System automatically validates eligibility
5

Re-activate

If student likes it, reactivate their account with new specialty

Restrictions

Trial classes are not available for MONTA specialty since MONTA is for instructors only.
{!clase && especialidad !== "MONTA" && (
  // Trial class form
)}
Trial class checkbox only appears during creation, not when editing existing classes.
{!clase && especialidad !== "MONTA" && (
  // Only shows when clase is undefined (creation mode)
)}
Active students cannot use the trial class feature - they should use regular class scheduling.

Data Structure

Interface
export interface ClaseFormData {
  // ... other fields
  alumnoId: number | null;          // Null for trial classes with new person
  personaPruebaId: number | null;   // Set for new person trials
  esPrueba: boolean;                // Flag indicating trial class
}
See: ~/workspace/source/src/components/forms/ClaseForm.tsx:34-47

Common Use Cases

Scenario 1: New Student Trial

Situation: Maria contacts the school wanting to try an EQUITACION class. Solution:
  1. Create new class for EQUITACION
  2. Check “Es clase de prueba”
  3. Select “Persona nueva”
  4. Enter: Nombre: “Maria”, Apellido: “Garcia”
  5. Assign instructor and horse
  6. Schedule appropriate time
  7. Save
Result: Maria appears as “Maria Garcia” with 🎓 emoji in calendar.

Scenario 2: Inactive Student Trying New Specialty

Situation: Juan was an EQUITACION student but is now inactive. He wants to try EQUINOTERAPIA. Solution:
  1. Verify Juan has no EQUINOTERAPIA classes
  2. Create new class for EQUINOTERAPIA
  3. Check “Es clase de prueba”
  4. Select “Alumno existente”
  5. Choose Juan from dropdown
  6. System validates automatically
  7. Complete and save
Result: If Juan likes it, reactivate his account.

Scenario 3: Invalid Trial Attempt

Situation: Administrator tries to create trial EQUITACION class for Sofia who has 5 completed EQUITACION classes. Solution:
  1. System detects Sofia has existing EQUITACION classes
  2. Validation fails
  3. Error message displayed: Student already has classes in this specialty
  4. Administrator creates regular class instead

Best Practices

Collect Information

Get full contact details during trial to facilitate follow-up enrollment

Follow Up

Contact trial students within 24-48 hours to encourage enrollment

Track Conversions

Monitor how many trial classes convert to enrolled students

Assign Best Horses

Use calm, well-trained school horses for positive first impressions

Next Steps

Creating Classes

Learn the basics of class creation

Validations

Understand all validation rules

Class Types

Explore different class specialties

Build docs developers (and LLMs) love