As a Site Owner I can delete rooms so that I can maintain an accurate room listing by removing rooms that are no longer part of the hotel's inventory.
Acceptance Criteria:
Given that I am logged into the admin panel, I can access the list of rooms.
When I select a room to delete and confirm the action, the room is removed from the system.
Upon successful deletion, I receive a confirmation message, and the deleted room is no longer listed.
If I attempt to delete a room that has associated bookings, I receive a warning message indicating that the room cannot be deleted until reservations are cancelled or transferred.
Tasks:
[x] Implement logic to delete rooms from the database.
[ ] Handle cases where a room cannot be deleted due to associated bookings.
[x] Add functionality to the admin panel to delete rooms.
[x] Implement confirmation dialogs to ensure the user intends to delete the selected room.
[x] Test the functionality in dev environment and deployed version
It's possible to delete rooms via admin panel eventhough the room has a booking. However, a warning sign is asking if "you're sure you want to delete this room with x bookings"
As a Site Owner I can delete rooms so that I can maintain an accurate room listing by removing rooms that are no longer part of the hotel's inventory.
Acceptance Criteria:
Tasks: