Trying to allocate a timeslot to a specific booking

I am making an app where a barber signs up, adds the information about their shop (e.g shop location, services offered, timeslots offered, opening days etc), then customers log in and select a shop from a list sorted by nearest to furthest, then book a day, timeslot and service that is being offered. Once booked, the barber can see the information of what has been booked, on what day and what timeslot. Some screenshots below to provide context:

First page:

Barber signup:






Barber home page:

Customer signup:


Customer home page:


Customer booking:


(They fill out the data of the booking, you get the idea)

I have selected a capacity for each booking, so when someone books a slot, the timeslot capacity reduces from 1 to 0 and it shows as unavailable until it has been marked as completed and the capacity returns to 1, like so:

However, there are multiple barbershops using the same timeslots so when one is marked as unavailable for one barbershop, ALL barbershops are showing that timeslot as unavailable as well. Is there a way to have timeslot data that is specific to each booking, allowing the individual barber shop’s booking to show a timeslot being unavailable, but the other barbershops can still offer this slot? Been stuck trying to find workarounds for days at this point, so if anyone can help I will be so grateful. Thanks in advance!

It’s also worth noting that I have already tried changing the slot’s click action from updating the booking with the current timeslot, to creating a new timeslot for each booking, but this clashes with the option for barbers to select which timeslots they offer, as it shows a list of all slots so they can select which ones they offer, meaning the newly created slots are all showing as selectable options for when the barber is selecting which slots they offer. I hope someone understands this as this is the simplest way to explain it and it sounds complex reading it back.

Can you please your database structure for Shops please.

Did you create a relationships Shops > Time Slots (Many to many) So when an user book a timeslot you need to update Current Shop > Timeslot > Available FALSE

1 Like

Hey, thanks for the response!

Here is the barbershop records:

And here is the records for the timeslots

The relationships are set as Many to Many as well.

I’m sure I tried the ‘Available TRUE/FALSE’ that you advised of, but I can give it another go. It just seems that any change made to a timeslot effects that slot for every barber shop, I can’t seem to make it an individual change per barber shop.

Just so I know I’m doing it correctly, are you able to provide some basic instructions on the TRUE/FALSE setting for this to work please?

Thanks again for your help!

Hi @egg ,

I made example app here, (cloneable)
Timeslot (adalo.com)

Barbershops and Timeslots are not connected each other, but they are both connected to Bookings, so to avoid generating timeslots for every barbershops.

Consider this as foundation to apply the logic to your app.

Hey @Yonki,

Thanks for your response!

I apologise, I might not have explained my issue correctly. I am fine with showing the visibility of timeslots according to whether they are booked or not. My issue is this:

As soon as a timeslot is booked, the count becomes 0, but this means that no other shop can show this timeslot.

For example:

  • A customer books Timeslot A (09:00-10:00) for Barbershop A.
  • The 09:00-10:00 Timeslot count changes to 0, making it unavailable.
  • A customer tries to book 09:00-10:00 for Barbershop B, but the timeslot is unavailable, as it’s count is already on 0 due to someone booking that slot for Barbershop A.

I need customers to be able to book 09:00-10:00 for Barbershop A, and still be able to book the same timeslot for Barbershop B, C, D etc.

I hope this makes sense! Thanks again for your response :smile:

hi, sorry if I intrude, in the past I tried to create a system for reservations, I had even succeeded, but the problem for me was in the creation of appointments: each shop had its own appointments, and people could book, making available or not the appointments, but these dates always had to be recreated. how did you structure this system?

Hi @Marino , that’s the same problem I’m having right now. A customer can book a timeslot, but when booked, the timeslot becomes unavailable for all users unless the timeslot is recreated. I’m trying to find an option for customers to book a timeslot, making it unavailable for the specific shop that it’s booked for, while still allowing other users to book the slot for different shops. It might be a feature that Adalo data is not complex enough to allow, if so, I’m going to have to take my app elsewhere :frowning:

@Yongki Here’s a video example of my issue to sum it up. Hope this helps :slight_smile:

can you send us a copy of how you structured the database? I think there is potential and a solution can be found, the problem I had found was exactly the opposite. maybe combining the two systems can work

@Marino I put screenshots of the shops and timeslots databases in a reply above, I’ll link it below:

I reread the chosen one you wrote more, I think the relationships between collections are right, maybe the problem lies in the “capacity”. how did you manage it? have you used filters? what I would do is use a filter on the list that says that if that shopkeeper has that particular time booked, then it will be marked as unavailable.
in this way the unavailability becomes an aesthetic factor and differs from list to list, thus allowing you to be able to overcome the obstacle

That is a great idea! I really hope it works. Will try it now, thanks!

let us know if it works

I made an update to include capacity and link the timeslots collection to barbershops collection, so they don’t share the same timeslots.

The issue has now been resolved, I found a workaround. Not ideal, but it works nonetheless. I created individual screens asking “Are you open on a Monday?”. When the barber selects “Yes”, the button creates a new day, titled ‘Monday’ for example, with a load of optional timeslots for that day. This means that every shop has it’s own set of days and timeslots within those days, so they are able to be booked individually without colliding with any other shops or their timeslots. This means a lot of data records will be created with every shop, but it’s something I will have to accept as there is not another workaround as far as I’m currently aware. It means that each shop has it’s own days, and each day has it’s own timeslots. Seems to work pretty well so far!

If you do find any other answers or options I would love to give them a try but, until then, thanks for your help :slight_smile:

1 Like

It is separated.

If you want a walkthrough on how it works, we can schedule a meeting so you can apply the logic into your own app.

1 Like

That would be great. Although the current workaround I’m using works, it still means long loading times when adding all the data (multiple days, multiple timeslots) to each barbershop on file. If there is way to receive the same results without having to use this workaround, it would be excellent. Please let me know when you are free to discuss this and we will arrange accordingly! Thanks very much for your continued assistance :slight_smile:

1 Like

Hey there did you find a solution to this? Looking to make a similar app and have run into the same issue

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