Skip to main content

Try the Live Demo

The easiest way to explore Apartado de Salas is through the live demo:

Live Demo

Access the demo at arakatadevs.com.mx/Portafolio/Apartado-Salas

Demo Credentials

Two accounts are available to test different roles:

Administrator

Username: admin
Password: 1234
Full access to review, approve, and reject reservations

Department Head

Username: jefe_departamento
Password: 1234
Create and track reservation requests
These credentials are for demonstration purposes only. The system contains no sensitive information.

User Workflow: Create a Reservation

Follow these steps to create your first room reservation as a department head.
1

Log In

Navigate to the login page and enter the department head credentials:
Username: jefe_departamento
Password: 1234
After successful login, you’ll be redirected to the user dashboard at /dashboard.
2

Access Reservation Form

From the dashboard, click “Nueva Reservación” (New Reservation) or navigate to:
/reservations/create
The reservation form includes:
  • Room selection dropdown
  • Event name input
  • Date and time slot manager
  • Material selection (dynamically loaded per room)
  • Notes/observations textarea
3

Fill Out Reservation Details

Complete the form with your reservation information:Basic Information
  • Select a room from the dropdown
  • Enter an event name (e.g., “Reunión de Departamento”)
  • Add optional notes
Add Time SlotsClick “Agregar horario” (Add slot) for each date/time needed:
Date: 2026-03-15
Start: 09:00
End: 11:00
You can add multiple slots for recurring events or multi-day reservations.
The system validates for scheduling conflicts automatically. If another reservation overlaps with your selected time, you’ll receive an error.
4

Select Materials

After selecting a room, the material checklist loads automatically via AJAX:
// Internal API call to /api/materials?room_id=1
Check the materials you need:
  • Proyector
  • Bocinas
  • Micrófono
  • Pizarrón
Only materials available for the selected room will appear. Material availability is validated server-side before creating the reservation.
5

Submit Request

Click “Crear Solicitud” (Create Request) to submit.The system performs these validations:
// From ReservationController.php:46-57
if (!$userId || !$roomId || empty($event)) {
    Session::setFlash('error', 'Datos incompletos.');
    // Redirect back
}

if (count($dates) === 0) {
    Session::setFlash('error', 'Debe agregar al menos un horario.');
    // Redirect back
}
On success, you’ll see:
✓ La reservación fue creada correctamente.
6

Track Your Request

View your submitted requests from the dashboard or navigate to:
/reservations/mine
Each request shows:
  • Event name
  • Room assigned
  • Current status: pendiente (pending)
  • Creation date
  • Action buttons to view details

Administrator Workflow: Review Requests

Log out and log back in with administrator credentials to review the request.
1

Log In as Admin

Use the administrator account:
Username: admin
Password: 1234
The admin dashboard shows:
  • Total pending requests
  • Recent reservation activity
  • Quick access to approval queue
2

View All Requests

Navigate to “Solicitudes” (Requests) or:
/reservations
Filter by status using query parameters:
/reservations?status=pendiente
/reservations?status=aprobado
/reservations?status=rechazado
3

Review Request Details

Click “Ver detalle” (View details) on any request:
/reservations/show?id=1
The detail view displays:
  • Event information
  • Requesting user
  • Room assignment
  • All scheduled time slots
  • Selected materials with quantities
  • Notes from requester
  • Current status
4

Approve or Reject

Make your decision using the action buttons:Approve Request
POST /reservations/approve
{ "id": 1 }
Reject Request
POST /reservations/reject
{ "id": 1 }
The status updates immediately:
// From ReservationController.php:196
$reservationModel->updateStatus((int)$id, 'aprobado');
Session::setFlash('success', 'Solicitud aprobada correctamente.');

Understanding the Reservation Lifecycle

Every reservation goes through this workflow:

Status Values

  • pendiente: Awaiting administrator review
  • aprobado: Approved and confirmed
  • rechazado: Rejected by administrator

Multi-Slot Reservations

The system supports multiple time slots per reservation, perfect for:
  • Recurring meetings: Same room, multiple dates
  • Multi-day events: Conference spanning several days
  • Split sessions: Morning and afternoon slots

Example: Weekly Meeting

// Single reservation with 4 weekly slots
Event: "Reunión Semanal de Coordinación"
Room: Sala de Juntas

Slots:
- 2026-03-08  14:00-16:00
- 2026-03-15  14:00-16:00
- 2026-03-22  14:00-16:00
- 2026-03-29  14:00-16:00

Materials: Proyector, Bocinas
All slots are validated for conflicts:
// From ReservationController.php:86-88
if ($slotModel->hasConflict((int)$roomId, $date, $start, $end)) {
    throw new Exception("Conflicto de horario el $date de $start a $end.");
}

Transaction Safety

Reservations use database transactions to ensure data integrity:
// From ReservationController.php:64-117
try {
    $db->beginTransaction();
    
    // 1. Create reservation record
    $reservationId = $reservationModel->create(...);
    
    // 2. Create all time slots
    foreach ($dates as $index => $date) {
        $slotModel->create($reservationId, $date, $start, $end);
    }
    
    // 3. Attach materials
    $reservationModel->attachMaterials($reservationId, $materials);
    
    $db->commit();
} catch (Exception $e) {
    $db->rollBack();
    // Handle error
}
If any step fails, the entire reservation is rolled back.

Next Steps

Creating Reservations

Detailed guide for users creating and managing reservations

Managing Requests

Administrator guide for reviewing and processing requests

Authentication System

Learn how roles and permissions control access

Reservation Features

Deep dive into conflict detection and multi-slot support

Build docs developers (and LLMs) love