feat: Restrict same email to create more than 'n' active bookings at… (#21745)

* feat - Restrict same email to create more than 'n' active bookings at a time

* updated checkbookerbookinglimit function

* type fix

* minor change

* import fix

* minor fixes

* back to null on disable

* back

* type check

* managed edge cases

* chore: name changes

* name changes

* fix

* minor change

* changed name

* use default value for maxactivebookingsperbooker, and some minor changes

* disabling bookerbooking limit for recurring event

* disabling bookerbooking limit for recurring event

* type fix

* ui fix and backend eventtype update check

* removed unused code

* minor changes

* update validation

* chore

* Do not check booking limits if rescheduling

* minor fix

* Refactor eventType update errors

* Typo fix

---------

Co-authored-by: Joe Au-Yeung <[email protected]>
This commit is contained in:
Romit.andJoe Au-Yeung authored and GitHub committed 2025-06-13 20:52:22 +00:00
1 parent ddf5717992
commit 630065ca89
16 files changed
+143 -2

No files matched your search

@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "EventType" ADD COLUMN "maxActiveBookingsPerBooker" INTEGER;
+1
View File
@@ -188,6 +188,7 @@ model EventType {
selectedCalendars SelectedCalendar[]
allowReschedulingPastBookings Boolean @default(false)
hideOrganizerEmail Boolean @default(false)
maxActiveBookingsPerBooker Int?
/// @zod.custom(imports.emailSchema)
customReplyToEmail String?
calVideoSettings CalVideoSettings?
+1
View File
@@ -662,6 +662,7 @@ export const allManagedEventTypeProps: { [k in keyof Omit<Prisma.EventTypeSelect
workflows: true,
bookingFields: true,
durationLimits: true,
maxActiveBookingsPerBooker: true,
lockTimeZoneToggleOnBookingPage: true,
requiresBookerEmailVerification: true,
assignAllTeamMembers: true,