feat: edit request time blockers, today closing time, UI polish, and test fixes

- Add time blocker management for booking edit requests
- Add closing_time field to admin today/current-next endpoint
- Update UserBookingModal and CurrentAppointment UI components
- Fix fmt import in bookings_test.go (was missing)
- Fix created_by FK in TestAdminApproveEditRequest_TimeBlockerOverlap
- Update test coverage for edit request time blocker overlap
- Update gap backlog documentation
This commit is contained in:
2026-05-10 16:53:17 +01:00
parent f3fb44f401
commit 83c62ffb97
10 changed files with 950 additions and 37 deletions
+3 -1
View File
@@ -343,6 +343,7 @@ func CleanupOldReservations(ctx context.Context) error {
oneHourAgo := time.Now().Add(-1 * time.Hour)
tenMinutesAgo := time.Now().Add(-10 * time.Minute)
fifteenMinutesAgo := time.Now().Add(-15 * time.Minute)
twentyFourHoursAgo := time.Now().Add(-24 * time.Hour)
_, err := db.DB.Exec(ctx, `
DELETE FROM time_blockers
@@ -350,7 +351,8 @@ func CleanupOldReservations(ctx context.Context) error {
OR (description LIKE 'RESERVATION:anon:%' AND created_at < $2)
OR (description LIKE 'RESERVATION:admin:walkin:%' AND created_at < $3)
OR (description LIKE 'RESERVATION:admin:callin:%' AND created_at < $3)
`, oneHourAgo, tenMinutesAgo, fifteenMinutesAgo)
OR (description LIKE 'RESERVATION:edit_request:%' AND created_at < $4)
`, oneHourAgo, tenMinutesAgo, fifteenMinutesAgo, twentyFourHoursAgo)
return err
}