Check if a desk is booked

Hi all,

For my work place, I’m working on a desk booking project that, users can log in to to book as desk.

Here is a picture below;

The picture shows a calendar, and two boxes at the bottom. The left box is a per user info so when you click each user in the calendar it’ll show their specifics. The one on the right is all the users in on the day.

My question is, I’m looking to restrict who can book on what days if it has already been booked. Firstly, is it possible to do this? Secondly, I’d like to add a map to on the right side that’s blank of our office with red squares in desks that have already been booked, can this be achieved by checking if a desk with “number” has been booked on the current day/selected day?

Many thanks for your help! :slight_smile:

@jamesmeeds

Install Bubble’s full calendar plugin

Create a data type in your dB called “booking” with fields of type date called start date and end date

Familiarize yourself with how the calendar plugin works to create “event” for which we will use our “booking”

Create bookings as needed (familiarize yourself with how the plugin works)

To create the map you could approach with group elements and pretty much draw your office map with them. There after you can give them conditions and even the ability to click on one to select and create a booking (ala OpenTable if you ever heard of this restaurants SAAS).

The above are broad strokes to spark some ideas on how to approach your project :grinning:

1 Like

Do you only have one resource you’re booking? Meaning one desk or do you have multiple desks?

1 Like

In total there is 18 desks. The first thing I want to work out is, if you book on a date, if the desk has already been booked, it isn’t on the list;

For example, on the 13/05/2021, desk 1 and 2 is booked

This list should then only show, 3, 4, 5, 6, 7 and so on, does that make sense?

Create a Booking data type with fields User, Desk, Start Date and End Date.

Create a Booking record any time a user reserves a desk.

When an user wants to book a desk, check that there isn’t already a Booking for that Desk that has conflicted dates with the new ones.

Although I’ll start by following @cmarchan’s guidelines: Check if a desk is booked - #2 by cmarchan


Follow me on twitter

2 Likes