How the Booking Diary Time Slots Work
Source: event_times_controller.rb, event_time.rb
- Start times are timezone-corrected based on the company's configured timezone
- Mechanic schedule is validated on both create and update to ensure the time falls within working hours
- Double-booking is intentionally DISABLED — mechanics CAN be booked on overlapping time slots; the system does not prevent this
- Changing a booking's date shifts all associated event_times by the day difference (e.g., moving from Monday to Wednesday shifts all times forward by 2 days)
- The "next available time" search checks from today+1 through today+31, looking for a gap for either a specific mechanic or any mechanic
- Month view calculates capacity as a percentage using quarter-rounding: 0%, 25%, 50%, 75%, or 100% — there are no intermediate values
- Split event times maintain ordering; moving a non-split time entry updates the parent event's date to match
- Unscheduled event times (those without a start time) are sorted using the shop's configured open time as a fallback
- End time is automatically calculated as start time plus estimated hours
Support scenarios
- "A mechanic has two bookings at the same time" → This is expected behavior. The system intentionally allows double-booking of mechanics. The diary will show overlapping slots.
- "I changed the booking date but the diary times didn't move" → All event_times should shift automatically when the date changes. If they did not, check if the times are split entries, as those have separate handling.
- "The next available slot search isn't finding anything" → The search only looks 31 days ahead. If no availability exists within that window (e.g., mechanic fully booked or on leave), it returns nothing.
- "The month view shows 50% but the mechanic is more like 60% booked" → Month view uses quarter-rounding (0/25/50/75/100%), so 60% rounds down to 50%.