feat: add staged default hours change handlers with conflict detection

Add ScheduleDefaultHoursChange, GetScheduledDefaultHoursChange, CancelScheduledDefaultHoursChange, and GetDefaultHoursConflictingBookings handlers. Updates GetDefaultHours to return { current, scheduled_change }. Updates GetWorkingHours and computeAvailableHours to apply staged hours for dates on/after the effective_date.
This commit is contained in:
2026-08-22 00:34:48 +01:00
parent 8f99b8b5c3
commit 2a840bb7e6
2 changed files with 343 additions and 2 deletions
+4
View File
@@ -323,6 +323,10 @@ func main() {
r.Get("/preview-available-hours", scheduling.GetPreviewAvailableHours)
r.Put("/default-hours", scheduling.UpdateDefaultHours)
r.Post("/default-hours/conflicting", scheduling.GetDefaultHoursConflictingBookings)
r.Post("/default-hours/schedule", scheduling.ScheduleDefaultHoursChange)
r.Get("/default-hours/scheduled", scheduling.GetScheduledDefaultHoursChange)
r.Delete("/default-hours/scheduled", scheduling.CancelScheduledDefaultHoursChange)
r.Post("/exceptional-groups", scheduling.CreateExceptionalGroup)
r.Delete("/exceptional-groups", scheduling.DeleteExceptionalGroup)
r.Put("/exceptional-applications", scheduling.UpdateExceptionalApplications)