feat: Redirect when event type does not match booking type (#14460)
* feat: Redirect when event type does not match booking type * Favour early return * If multiple bookingUid/rescheduleUid given, use first * rescheduleUid/bookingUid behaviour is required
This commit is contained in:
1 parent
5d7b2a12a7
commit
c5bd45fdfb
5 files changed
+152
-55
No files matched your search
@@ -201,7 +201,7 @@ async function handler(req: CustomRequest) {
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
username:true,
|
||||
username: true,
|
||||
name: true,
|
||||
email: true,
|
||||
timeZone: true,
|
||||
@@ -276,8 +276,8 @@ async function handler(req: CustomRequest) {
|
||||
destinationCalendar: bookingToDelete?.destinationCalendar
|
||||
? [bookingToDelete?.destinationCalendar]
|
||||
: bookingToDelete?.user.destinationCalendar
|
||||
? [bookingToDelete?.user.destinationCalendar]
|
||||
: [],
|
||||
? [bookingToDelete?.user.destinationCalendar]
|
||||
: [],
|
||||
cancellationReason: cancellationReason,
|
||||
...(teamMembers && {
|
||||
team: { name: bookingToDelete?.eventType?.team?.name || "Nameless", members: teamMembers, id: teamId! },
|
||||
|
||||
@@ -41,7 +41,9 @@ const LicenseRequired = ({ children, as = "", ...rest }: LicenseRequiredProps) =
|
||||
title={
|
||||
<>
|
||||
{t("enterprise_license_locally")} {t("enterprise_license_sales")}{" "}
|
||||
<a className="underline" href="https://cal.com/sales">{t("contact_sales")}</a>
|
||||
<a className="underline" href="https://cal.com/sales">
|
||||
{t("contact_sales")}
|
||||
</a>
|
||||
</>
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -125,7 +125,7 @@ model EventType {
|
||||
metadata Json?
|
||||
/// @zod.custom(imports.successRedirectUrl)
|
||||
successRedirectUrl String?
|
||||
forwardParamsSuccessRedirect Boolean? @default(true)
|
||||
forwardParamsSuccessRedirect Boolean? @default(true)
|
||||
workflows WorkflowsOnEventTypes[]
|
||||
/// @zod.custom(imports.intervalLimitsType)
|
||||
bookingLimits Json?
|
||||
|
||||
Reference in new issue
Block a user