feat: Link to rescheduled booking from the old one (#15211)
* feat: Link to rescheduled booking from the old one * add original comment * use fromReschedule * fix: type check * review updates * Update common.json * change booking page text * Delete packages/features/bookings/lib/getRescheduledToBooking.tsx --------- Co-authored-by: Somay Chauhan <[email protected]>
This commit is contained in:
1 parent
01dead9a1d
commit
010f5349f6
6 files changed
+53
-1
No files matched your search
@@ -22,6 +22,8 @@ const getUserBooking = async (uid: string) => {
|
||||
responses: true,
|
||||
rejectionReason: true,
|
||||
userPrimaryEmail: true,
|
||||
fromReschedule: true,
|
||||
rescheduled: true,
|
||||
user: {
|
||||
select: {
|
||||
id: true,
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
import prisma from "@calcom/prisma";
|
||||
|
||||
export class BookingRepository {
|
||||
static async findFirstBookingByReschedule({ originalBookingUid }: { originalBookingUid: string }) {
|
||||
return await prisma.booking.findFirst({
|
||||
where: {
|
||||
fromReschedule: originalBookingUid,
|
||||
},
|
||||
select: {
|
||||
uid: true,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user