Overview
Classes move through different states during their lifecycle, from initial scheduling to completion or cancellation. Each state has specific colors, labels, and business rules.State Enum
~/workspace/source/src/types/enums.ts:8-14
State Definitions
1. PROGRAMADA (Scheduled)
Programada
Class is scheduled and awaiting the start time
Default: All new classes start in this state
Editable: Yes
Characteristics
- Initial state for all created classes
- Class is scheduled but hasn’t started yet
- Can be edited or deleted
- Counts toward student’s monthly quota
ClaseForm.tsx
~/workspace/source/src/components/forms/ClaseForm.tsx:86
2. INICIADA (Started)
Iniciada
Class is currently in progress
Editable: No
Characteristics
- Class has started but not yet completed
- Cannot be edited or deleted
- Indicates active session
- Typically short-lived state
3. COMPLETADA (Completed)
Completada
Class was successfully completed
Editable: No
Characteristics
- Class finished successfully
- Student attended and completed the lesson
- Cannot be edited or deleted (historical record)
- Counts toward student’s attendance statistics
- Counts toward instructor’s completed classes
4. CANCELADA (Cancelled)
Cancelada
Class was cancelled
Editable: No
Characteristics
- Class was cancelled for various reasons
- Cannot be edited or deleted
- Does not count toward student’s quota
- Preserved for historical records
Cancellation Reasons
From the README, when cancelling a full day:Permite seleccionar motivo:See:
- Lluvia
- Feriado
- Mantenimiento
- Evento Especial
- Emergencia
- Otro (con observaciones personalizadas)
~/workspace/source/README.md:311-317
5. ACA (Absence with Notice)
ACA - Ausencia Con Aviso
Student notified they would not attend
Editable: No
Characteristics
- Student provided advance notice of absence
- More favorable than ASA (unexcused absence)
- May or may not count toward quota depending on school policy
- Shows student courtesy and communication
6. ASA (Absence without Notice)
ASA - Ausencia Sin Aviso
Student did not attend without notice
Editable: No
Characteristics
- Student did not show up and didn’t notify
- Unexcused absence
- May have policy implications
- Typically counts against student quota
- May affect student standing
State Colors and Labels
The system uses consistent color coding throughout:constants
See:
- Borde izquierdo: Color según estado de la clase:
- 🟠 Naranja: PROGRAMADA
- 🔵 Azul: INICIADA
- 🟢 Verde: COMPLETADA
- 🔴 Rojo: CANCELADA
- 🟣 Púrpura: ACA (Ausencia con Aviso)
- 🌸 Rosa: ASA (Ausencia sin Aviso)
~/workspace/source/README.md:280-285
Edit Restrictions
Cannot Edit States
Classes in the following states cannot be edited:No se pueden editar clases con estado:See:Razón: Las clases finalizadas son registro histórico
- COMPLETADA
- INICIADA
- CANCELADA
~/workspace/source/README.md:222-227
UI Indicators
The system shows disabled edit controls for finalized classes:Clases.tsx
~/workspace/source/src/pages/Clases.tsx:416-432
State Transitions
Typical Flow
Alternative Flows
Cancellation
Cancellation
PROGRAMADA → CANCELADA (for weather, emergencies, etc.)
Absence with Notice
Absence with Notice
PROGRAMADA → ACA (student notified in advance)
No-Show
No-Show
PROGRAMADA → ASA (student didn’t show and didn’t notify)
Bulk State Changes
The system supports cancelling multiple classes at once:Cancel Full Day
From the README:3. Cancelar Día CompletoSee:
- Disponible en Vista Día
- Cancela todas las clases del día actual
- Permite seleccionar motivo
- Solo cancela clases PROGRAMADAS (respeta completadas y ya canceladas)
~/workspace/source/README.md:309-319
Display in System
State badges are shown throughout the interface:Clases.tsx
~/workspace/source/src/pages/Clases.tsx:395-402
Summary Table
| State | Color | Can Edit | Can Delete | Counts to Quota | Notes |
|---|---|---|---|---|---|
| PROGRAMADA | 🟠 Orange | ✅ Yes | ✅ Yes | ✅ Yes | Initial state |
| INICIADA | 🔵 Blue | ❌ No | ❌ No | ✅ Yes | In progress |
| COMPLETADA | 🟢 Green | ❌ No | ❌ No | ✅ Yes | Successfully finished |
| CANCELADA | 🔴 Red | ❌ No | ❌ No | ❌ No | Cancelled |
| ACA | 🟣 Purple | ❌ No | ❌ No | ⚠️ Policy | Excused absence |
| ASA | 🌸 Pink | ❌ No | ❌ No | ✅ Yes | Unexcused absence |
Next Steps
Creating Classes
Learn how to create classes
Validations
Understand validation rules