configurable slot duration: UI picker + genRanges stepMinutes

- Fix TimeOfDayExtension.add() to handle minute overflow via total-minutes math
- genRanges() now takes stepMinutes param (default 30, clamp 5-480)
- Profesional model: slotDurationMinutes field (parsed from slot_duration_minutes)
- ProfessionalFormProvider: saves slot duration alongside schedules on Guardar
- schedule_view: _SlotDurationPicker chip selector (15/20/30/45/60/90/120 min)
- ProfessionalCalendarView + CalendarView: pass slotDurationMinutes to genRanges

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-07-12 19:25:08 -05:00
co-authored by Claude Sonnet 4.6
parent 46acad0b55
commit 920ae7144d
7 changed files with 105 additions and 20 deletions
+2 -1
View File
@@ -2,7 +2,8 @@ import 'package:flutter/material.dart';
extension TimeOfDayExtension on TimeOfDay {
TimeOfDay add({int hour = 0, int minute = 0}) {
return replacing(hour: this.hour + hour, minute: this.minute + minute);
final total = this.hour * 60 + this.minute + hour * 60 + minute;
return TimeOfDay(hour: (total ~/ 60) % 24, minute: total % 60);
}
int compareTo(TimeOfDay other) {