Skip to main content

Overview

As a regular user in Apartado de Salas, you can create room reservation requests, view available rooms and materials, and track the status of your submissions. This guide covers all the capabilities and workflows available to you.

User Capabilities

Regular users have access to the following features:
  • Create Reservations: Submit requests to reserve rooms for events
  • View Personal Requests: Monitor the status of your reservation submissions
  • Browse Rooms: See available rooms and their associated materials
  • Track Status: Check if your requests are pending, approved, or rejected
Users cannot approve or reject reservations. Only administrators have these permissions.

Accessing the System

1

Login

Navigate to the system login page and enter your credentials. The system uses session-based authentication managed by app/Helpers/Auth.php:24.
2

Dashboard Access

After successful login, you’ll be redirected to your dashboard where you can access all user features.

Creating Your First Reservation

To create a room reservation, navigate to the reservation creation form:
1

Access Create Form

Click on “Apartar sala” (Reserve Room) from your dashboard. This loads the form at /reservations/create.
2

Select Room

Choose a room from the dropdown menu. Available rooms are loaded from the database and displayed dynamically.
3

View Available Materials

Once you select a room, the system automatically fetches and displays materials available for that specific room via AJAX call to /api/materials?room_id={roomId}.
4

Enter Event Details

Fill in the required fields:
  • Event Name: A descriptive name for your event (required)
  • Notes: Any additional observations or requirements (optional)
Provide clear event names and detailed notes to help administrators understand and approve your request faster.

Adding Time Slots

Reservations require at least one time slot. You can add multiple slots if your event spans multiple days or time periods:
1

Fill First Time Slot

The form includes one time slot by default with these fields:
  • Date: Select the reservation date
  • Start Time: Event start time
  • End Time: Event end time
2

Add Additional Slots

Click “Agregar otro horario” (Add another time slot) to add more slots. Each slot is validated for conflicts in app/controllers/ReservationController.php:86.
The system checks for scheduling conflicts. If your requested time overlaps with an existing approved reservation, your submission will be rejected with an error message indicating the conflicting date and time.

Selecting Materials

Materials are room-specific and displayed only after selecting a room:
  1. Automatic Loading: Materials load dynamically when you select a room
  2. Multiple Selection: Check all materials you need for your event
  3. Validation: The system validates that selected materials belong to the chosen room (app/controllers/ReservationController.php:94)
If a room has no associated materials, you’ll see a message: “No hay materiales disponibles para esta sala.”

Submitting Your Request

Once all fields are completed:
1

Review Information

Double-check your room selection, event details, time slots, and materials.
2

Submit

Click “Enviar solicitud” (Submit Request). The form submits via POST to /reservations/store.
3

Confirmation

If successful, you’ll see a success message and be redirected to your dashboard. The reservation is created with status pendiente (pending).

Viewing Your Reservations

Access your personal reservation history:
1

Navigate to My Requests

Click “Mis solicitudes” (My Requests) from the dashboard. This route is handled by app/controllers/ReservationController.php:243.
2

Review Status

View all your reservations in a table format showing:
  • Event name
  • Room name
  • Current status (Pendiente, Aprobado, Rechazado)
  • Submission date

Understanding Request Status

Your reservations can have three statuses:

Pendiente

Your request is waiting for administrator review. No action required from you.

Aprobado

Your reservation has been approved. The room is reserved for your specified time slots.

Rechazado

Your request was rejected. Contact an administrator to understand why and submit a new request if needed.

Validation and Error Handling

The system performs several validations when you submit a reservation:

Required Field Validation

if (!$userId || !$roomId || empty($event)) {
    Session::setFlash('error', 'Datos incompletos.');
    header('Location: '. BASE_URL . '/reservations/create');
    exit;
}
Ensure all required fields are filled to avoid submission errors.

Time Slot Validation

if (count($dates) === 0) {
    Session::setFlash('error', 'Debe agregar al menos un horario.');
    header('Location: '. BASE_URL . '/reservations/create');
    exit;
}
At least one time slot is required for every reservation.

Conflict Detection

if ($slotModel->hasConflict((int)$roomId, $date, $start, $end)) {
    throw new Exception("Conflicto de horario el $date de $start a $end.");
}
The system prevents double-booking by checking for existing reservations during your requested time.
All validations happen server-side in app/controllers/ReservationController.php:25 for security and data integrity.

Best Practices

Submit reservation requests well in advance to ensure availability and give administrators time to review.
Use the notes field to explain special requirements, expected attendance, or setup needs.
Before submitting, consider checking existing reservations to avoid requesting conflicting time slots.
Only select materials you actually need. This helps administrators prepare the room efficiently.

Troubleshooting

Cannot See Materials

Issue: Material list doesn’t load after selecting a room Solution: Ensure JavaScript is enabled in your browser. The material loading uses AJAX requests.

Submission Errors

Issue: Form submission fails with validation errors Solution: Check that:
  • All required fields are filled
  • At least one time slot is added
  • End time is after start time
  • Selected materials are valid for the chosen room

Session Expired

Issue: Redirected to login page unexpectedly Solution: Your session has expired. Log in again to continue. The system requires active authentication via Auth::requireLogin() for all reservation operations.

Next Steps

Create Reservations

Step-by-step guide for creating room reservations

Admin Role

Learn about administrator capabilities

Build docs developers (and LLMs) love