Users with the ADMIN role gain access to a dedicated management area at /admin. From here, admins can monitor all platform activity, confirm or cancel pending reservations, complete confirmed sessions, and maintain the catalogue of sports courts — without needing superadmin privileges.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Nyverie/reservafacil/llms.txt
Use this file to discover all available pages before exploring further.
Admin Dashboard Overview
The dashboard at/admin provides an at-a-glance summary of platform health through four stat cards:
Total Reservas
The total count of all reservations ever made on the platform, across all statuses and users.
Pendientes
Reservations currently awaiting admin review. A high number here signals a backlog that needs attention.
Canchas Activas
The number of courts currently marked as active and bookable by regular users.
Ingresos (S/)
The sum of
total across all CONFIRMADA reservations — a real-time revenue figure in Peruvian soles.Managing Reservations
Navigate to /admin/reservas to see every reservation on the platform ordered by creation date. The table columns are:| Column | Description |
|---|---|
| Usuario | Booking user’s full name and email address |
| Cancha | Name of the reserved court |
| Fecha / Hora | Date and time window of the session |
| Total | Booking amount in soles |
| Estado | Coloured status badge |
| Acciones | Action buttons rendered by GestionReservaBtn |
Action Buttons
TheGestionReservaBtn component renders different controls depending on the reservation’s current status:
PENDIENTE
Two buttons appear: ✅ Confirmar promotes the reservation to
CONFIRMADA, and ❌ Cancelar moves it directly to CANCELADA. Both send a PATCH /api/reservas/{id} request with the target status.CONFIRMADA
A single 🏁 Completar button is shown. Clicking it marks the reservation as
COMPLETADA once the session has taken place.CANCELADA / COMPLETADA
No action buttons are rendered. The column shows Sin acciones to indicate the reservation is in a terminal state.
Court Management
Navigate to /admin/canchas to access the fullGestionCanchasPanel. This panel lists every court (active and inactive) in a grid and provides controls to create, edit, and toggle their availability.
Creating a New Court
Click the + Nueva Cancha button to open the creation modal. Fill in the following fields:Nombre (required)
A human-readable name for the court, e.g.
"Cancha Fútbol 1" or "Pista de Tenis Norte". This name appears on CanchaCard tiles and in all reservation records.Tipo (required)
Select the sport type from the dropdown. The four available options map directly to the Prisma enum values:
| Value | Sport | Emoji |
|---|---|---|
FUTBOL | Football | ⚽ |
TENIS | Tennis | 🎾 |
BASQUET | Basketball | 🏀 |
VOLLEYBALL | Volleyball | 🏐 |
Precio/hora (required)
Set the hourly rate in soles (S/). This value is used by
ReservaForm to calculate the booking total automatically.Capacidad (required)
Maximum number of persons the court can accommodate. Displayed on the
CanchaCard to help users decide whether their group fits.Descripción (optional)
Free-text description covering surface type, lighting, amenities, etc. Shown in smaller text on the court card.
Editing an Existing Court
Click the ✏️ Editar button on any court card to open the same modal pre-populated with the court’s current values. Make your changes and click Guardar cambios — the panel sends aPUT /api/canchas/{id} request with the updated fields.
Toggling a Court Active / Inactive
Each court card shows a lock button (🔒 when active, 🔓 when inactive). Clicking it flips theactiva flag via PUT /api/canchas/{id}. Inactive courts are hidden from the user-facing /dashboard/canchas grid and cannot be booked until reactivated.
Only SUPERADMIN users can permanently delete a court. Admins can deactivate courts using the toggle, which hides them from users while preserving all historical reservation data linked to that court.