Add InstructorAvailabilityService with vacation, units limits, break rules
- InstructorAvailabilityService checks: 1. Vacation (instructor_vacations table) 2. Regular availability (instructor_availability weekday/time windows) 3. Daily units limit (max_daily_units + max_daily_override) 4. Weekly units limit (max_weekly_units + max_weekly_override) 5. Break rules (between appointments, continuous minutes) - AppointmentsController now uses availabilityService - Fixed getQueryParam() -> getQueryParams() compatibility - Instructor model updated with max_*_units fields
This commit is contained in:
@@ -13,8 +13,17 @@ final class Instructor extends Model
|
||||
protected $fillable = [
|
||||
'tenant_id', 'user_id', 'first_name', 'last_name',
|
||||
'color', 'notes', 'is_active', 'pre_start_buffer_minutes',
|
||||
'max_daily_units', 'max_daily_override',
|
||||
'max_weekly_units', 'max_weekly_override',
|
||||
];
|
||||
protected $casts = [
|
||||
'is_active' => 'integer',
|
||||
'tenant_id' => 'integer',
|
||||
'max_daily_units' => 'integer',
|
||||
'max_daily_override' => 'integer',
|
||||
'max_weekly_units' => 'integer',
|
||||
'max_weekly_override' => 'integer',
|
||||
];
|
||||
protected $casts = ['is_active' => 'integer', 'tenant_id' => 'integer'];
|
||||
|
||||
public function tenant(): BelongsTo
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user