feat: Add rescheduledBy & canceledBy fields in the DB (#15337)
* feat: Add rescheduledBy & canceledBy fields in the DB * fix: type check * fix: type check * fix: use session user email for reschedule * fix: unit test * feat: db field email validation * feat: rescheduledBy and cancelledBy in webhooks * revert unrelated changes. * make session user secondary, default to Anonymous * if condition not required * Make cancelledBy optional Co-authored-by: Syed Ali Shahbaz <[email protected]> * update cancel booking type * fix: update cancelledBy in db when requesting reschedule * remove default value for fields * fix: type check * feat: manage fields via api v1 * fix: add fields in booking read api v1 * test: expand to cover new fields * fix: use cancelledBy param on booking page --------- Co-authored-by: Anik Dhabal Babu <[email protected]> Co-authored-by: Syed Ali Shahbaz <[email protected]> Co-authored-by: Peer Richelsen <[email protected]>
This commit is contained in:
28 files changed
+139
-20
No files matched your search
@@ -461,13 +461,19 @@ export function expectSuccessfulBookingCreationEmails({
|
||||
links: recurrence
|
||||
? [
|
||||
{
|
||||
href: `${bookingUrlOrigin}/booking/${booking.uid}?cancel=true&allRemainingBookings=true`,
|
||||
href: `${bookingUrlOrigin}/booking/${
|
||||
booking.uid
|
||||
}?cancel=true&allRemainingBookings=true&cancelledBy=${encodeURIComponent(
|
||||
destinationEmail ?? organizer.email
|
||||
)}`,
|
||||
text: "cancel",
|
||||
},
|
||||
]
|
||||
: [
|
||||
{
|
||||
href: `${bookingUrlOrigin}/reschedule/${booking.uid}`,
|
||||
href: `${bookingUrlOrigin}/reschedule/${booking.uid}?rescheduledBy=${encodeURIComponent(
|
||||
destinationEmail ?? organizer.email
|
||||
)}`,
|
||||
text: "reschedule",
|
||||
},
|
||||
],
|
||||
@@ -514,13 +520,17 @@ export function expectSuccessfulBookingCreationEmails({
|
||||
links: recurrence
|
||||
? [
|
||||
{
|
||||
href: `${bookingUrlOrigin}/booking/${booking.uid}?cancel=true&allRemainingBookings=true`,
|
||||
href: `${bookingUrlOrigin}/booking/${
|
||||
booking.uid
|
||||
}?cancel=true&allRemainingBookings=true&cancelledBy=${encodeURIComponent(booker.email)}`,
|
||||
text: "cancel",
|
||||
},
|
||||
]
|
||||
: [
|
||||
{
|
||||
href: `${bookingUrlOrigin}/reschedule/${booking.uid}`,
|
||||
href: `${bookingUrlOrigin}/reschedule/${booking.uid}?rescheduledBy=${encodeURIComponent(
|
||||
booker.email
|
||||
)}`,
|
||||
text: "reschedule",
|
||||
},
|
||||
],
|
||||
@@ -552,11 +562,17 @@ export function expectSuccessfulBookingCreationEmails({
|
||||
},
|
||||
links: [
|
||||
{
|
||||
href: `${bookingUrlOrigin}/reschedule/${booking.uid}`,
|
||||
href: `${bookingUrlOrigin}/reschedule/${booking.uid}?rescheduledBy=${encodeURIComponent(
|
||||
otherTeamMember.email
|
||||
)}`,
|
||||
text: "reschedule",
|
||||
},
|
||||
{
|
||||
href: `${bookingUrlOrigin}/booking/${booking.uid}?cancel=true&allRemainingBookings=false`,
|
||||
href: `${bookingUrlOrigin}/booking/${
|
||||
booking.uid
|
||||
}?cancel=true&allRemainingBookings=false&cancelledBy=${encodeURIComponent(
|
||||
otherTeamMember.email
|
||||
)}`,
|
||||
text: "cancel",
|
||||
},
|
||||
],
|
||||
|
||||
@@ -26,6 +26,8 @@ export function getMockRequestDataForBooking({
|
||||
bookingUid?: string;
|
||||
recurringEventId?: string;
|
||||
recurringCount?: number;
|
||||
rescheduledBy?: string;
|
||||
cancelledBy?: string;
|
||||
schedulingType?: SchedulingType;
|
||||
responses: {
|
||||
email: string;
|
||||
|
||||
Reference in new issue
Block a user