I would love to get some suggestions on how to best format my booking app.
Context: I am building an advanced management & booking app for a football center.
Problem: I am having a hard time trying to set validations on available times, depending on the reservation type. (e.g., Full field or half field).
If the user selects “half field” at 10AM, I would like the system to show one more slot if any other user wants to reserve the other half. If a user selects “full field”, then I would like to fully reserve that hour!
Ask: Do you have any recommendations on how to set this up on the backend?
I would have a numerical value to represent “how much” that slot has been booked.
Say for any bookings, “half field” would return 0.5, and “full field” returns 1 in an If-Then-Else column.
For new bookings, use a custom form. Validate the choice against the list of your existing bookings. Use a query to look for the same time slot that the user is choosing, and a rollup to sum the value above.
If the sum is 0, allow them to book both types. If the sum is 0.5, allow them to book a half field, if the sum is 1, don’t allow them to book.