feat: automatic no show (#16727)

Co-authored-by: Carina Wollendorfer <[email protected]>
Co-authored-by: Alex van Andel <[email protected]>
Co-authored-by: Peer Richelsen <[email protected]>
Co-authored-by: CarinaWolli <[email protected]>
Co-authored-by: zomars <[email protected]>
This commit is contained in:
authored and GitHub committed 2024-10-10 10:57:04 -07:00
1 parent ef88effd9f
commit 395381ddcc
43 files changed
+1103 -69

No files matched your search

@@ -193,6 +193,7 @@ type WhiteListedBookingProps = {
// TODO: Make sure that all references start providing credentialId and then remove this intersection of optional credentialId
credentialId?: number | null;
})[];
user?: { id: number };
bookingSeat?: Prisma.BookingSeatCreateInput[];
createdAt?: string;
};
@@ -400,6 +401,7 @@ async function addBookingsToDb(
bookings: (Prisma.BookingCreateInput & {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
references: any[];
user?: { id: number };
})[]
) {
log.silly("TestData: Creating Bookings", JSON.stringify(bookings));
@@ -490,6 +492,16 @@ export async function addBookings(bookings: InputBooking[]) {
};
}
if (booking?.user?.id) {
bookingCreate.user = {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
//@ts-ignore
connect: {
id: booking.user.id,
},
};
}
return bookingCreate;
})
);