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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user