Problems with hotel booking

Hello I’m in need of help! I’m developing a hotel scheduling system. The problem is when a person schedules the same room at the same time as someone else. I created two collections, 1 = Scheduling and 2 = rooms, but I don’t know what to do to block the room that has already been scheduled.

I would add a ‘quantity’ field to the rooms in the database/collection and when a room is booked just set up an action to subtract from the quantity. When the quantity reaches zero you can hide the room so it cannot be booked.

Hope this helps :slight_smile:

1 Like

how do I do that? :man_shrugging:

When you setup a ‘book room’ button or ‘finalise booking’ button, add an action to it to update the quantity field to subtract 1. See example image (I used users just for a quick example but this would be your room)

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.