Hi everyone!
I’ve been working on implementing a booking system for an auto repair shop and ran into some challenges with the following functionality: There are two branches, and each branch has different time slot intervals (30 and 15 minutes). When creating a booking, the user selects a type of service for the car — and this is where I got stuck. Each service type can have a different duration that should be selectable by the employee (for example, an oil change may take 60 or 90 minutes depending on the car). All time slots that fall within the selected service duration need to be hidden (blocked), and it should also be possible to change the start time and duration of the booking.
In my implementation, the table for bookings was separate from the table containing the slot data (used for selecting time slots depending on the branch and filtering by date and time). The main issue I ran into was the inability to properly pass data between the tables — I was trying to set the start and end time of the booking so that all slots within that range would be blocked. I’d appreciate any tips or suggestions on how to implement this system.