How Work Hours Configuration Works
Source: work_hours_controller.rb
- Work hours use an upsert pattern (find_or_initialize_by): if a record for that day/mechanic exists it is updated, otherwise a new one is created
- Default available hours are pulled from company.default_work_hours_per_day when no specific configuration exists
- This applies to both shop-level and mechanic-level work hour configuration
Support scenarios
- "A mechanic's hours aren't showing correctly" → Check if specific work hours have been configured for that mechanic. If not, the system falls back to company.default_work_hours_per_day. Update either the mechanic-specific hours or the company default.
- "I changed the work hours but the old value is still there" → Work hours use upsert, so changes should update in place. Verify the correct day/mechanic combination was edited.