I'm trying to build an appointment system but at one point I stuck
Problem:
I define available slots for the next 7 days with help of a cron. I have multiple users serve service more than one location.
Now for example if - P1 location have two User U1 and U2 - P2 location has the only U1 user
now for P1 location, I can take 2 order for the same slot because two users are active on P1 location but if P2 request to post order then I can take that too.
but in an ideal case, I can take only two orders for the same slot for all location because i have only two uses
can anyone give some idea how i can solve this problem so that i cant take more order then i serve