Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/EmirPolito/CRUD-HOTEL-GUEVARINI-Publico/llms.txt

Use this file to discover all available pages before exploring further.

The Rooms module lets you manage the physical rooms available at Hotel Guevarini. Administrators have full create, edit, and delete access. Clients can only view rooms with an Available status.

Viewing Rooms

Navigate from the dashboard to Habitaciones. The page displays a table with the following columns:
ColumnDescription
NúmeroUnique room identifier (e.g., 101A)
TipoRoom type (e.g., Sencilla, Doble, Suite)
Precio x NocheNightly price in decimal format
EstadoCurrent room status
AcciónEdit and Delete buttons (Administrators only)
Administrators see all rooms regardless of status. Clients see only rooms with status Disponible.

Room Types and Example Prices

The following rooms are included in the seed data:
Room NumberTypePrice / NightInitial Status
101ASencilla$50.00Disponible
105BDoble$85.00Ocupada
201CSuite$150.00Mantenimiento
302ADoble$85.00Disponible
Room types are free-text — they are not restricted to an ENUM, so you can define any category that fits your property.

Adding a Room

1

Click '+ Añadir Habitación'

On the room list page, click + Añadir Habitación. This button is only visible to Administrators. It opens /views/habitaciones/nueva_habitacion.php.
2

Fill in the room details

Complete all required fields:
  • Número — A unique room identifier such as 101A or 302B. The system rejects duplicates.
  • Tipo — Room category (e.g., Sencilla, Doble, Suite).
  • Precio por noche ($) — Nightly rate as a decimal number greater than zero.
  • Estado Inicial — Choose Disponible, Ocupada, or Mantenimiento.
3

Save the room

Click Guardar Habitación. The record is inserted and you are returned to the room list with a confirmation message.
Room numbers must be unique across the entire system. Attempting to save a room with a number that already exists will display an error and no record will be created.

Editing a Room

1

Click 'Editar' on the room row

In the room list, click Editar next to the room you want to update. This opens /views/habitaciones/editar_habitacion.php?id={id}.
2

Update the fields

Modify the Número, Tipo, Precio, and/or Estado as needed. All fields are pre-populated with the current values.
3

Save changes

Click Actualizar Habitación. Changes are saved and you are redirected to the room list.

Deleting a Room

Click the Eliminar button on the room’s row. A confirmation modal appears before deletion is performed.
Deleting a room also deletes all reservations associated with it due to the ON DELETE CASCADE constraint on the reservaciones table.

Room Statuses

StatusDescription
DisponibleRoom is available and can be selected when creating a reservation
OcupadaRoom is currently assigned to a reservation; hidden from the new-reservation room selector
MantenimientoRoom is under maintenance; hidden from the new-reservation room selector and from Client view
When a new reservation is saved, the assigned room’s status is automatically updated to Ocupada.

Build docs developers (and LLMs) love