Commit 4794a02c authored by Mahmoud Aglan's avatar Mahmoud Aglan

Add comprehensive conflict detection + flexible time to schedule builder

ScheduleConflictService checks ALL sources of trainer/group conflicts:
- TrainingSchedule (recurring weekly assignments)
- TrainingSession (specific date overrides)
- TrainingGroup.head_trainer_id (implied trainer commitment)
- Assignment model (formal polymorphic assignments)

Schedule Builder improvements:
- Flexible time picker (any minute interval, not just hourly)
- Trainer availability indicators (green dot = free, orange = busy)
- Group availability indicators (red warning if scheduled elsewhere)
- Implied trainer warnings (group's head trainer conflict = soft warning)
- New vs existing assignments visually distinct (green = unsaved)
- Trainer name shown on existing reservations
- Row/column/all selection helpers
- Recurring booking checks group + trainer + space conflicts per date
- Cancel series now deactivates the underlying TrainingSchedule
- Final validation pass before commit (double-check for race conditions)
Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent e0119a1d
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment