Using merge with Full Calendar to show bookings with two contraints (same data sourse)

Hi,

I am currently building a booking system to test if Bubble.io is a suitable system. I seem to have most of hte basic features sorted, but having trouble now I am making it a little more complicated.

I want to allow the Admin to select a day as unavailable and then it means its either full or you cannot book to it (same outcome - you cannot book to a day once its marked unavailable).

To do this, I’ve made it so as the admin you can create an event and it stores a field bookingtype as “unavailable”. The rule then is when you click book - if the days events contains “unavailable” then you get an error warning pop up. Otherwise you can book ok.

I have set it up so that the calendar data source is set to ‘bookings’ where customer ID = current user customer ID - so that unless you are the admin you can only see your bookings. I then used the mergewith so that I could add bookings where bookingtype contains keyword “unavailable”

It seems to behave very strange. If the user is not logged in, the unavailable days show up. If you are logged in as admin everything behaves as you expect (and even cannot book to a day that is unavailable, only make it available again). But the problem is that users logged in that are not admin cannot see the unavailable days and can still book to them.

Any help on what I am doing wrong would be appreciated.

If the search show the right data when you are logged as admin then it is definitely a Privacy rules set up problem.

Data -> Privacy

Thanking you greatly! I must have had something odd in there. I just removed it (i’ve already got a filter on the search so you can only see you logged in ID bookings) - all working now :slight_smile:

1 Like