Scheduling infrastructure for absolutely everyone.
fix: move cancelled upcoming booking to cancelled tab (#883)
Mihai C35dd3f088c04
diff --git a/server/routers/viewer.tsx b/server/routers/viewer.tsxindex 95154f1a77b..bf9eb49db5f 100644--- a/server/routers/viewer.tsx+++ b/server/routers/viewer.tsx@@ -28,8 +28,8 @@ export const viewerRouter = createProtectedRouter()const { prisma, user } = ctx;const bookingListingByStatus = input.status;const bookingListingFilters: Record<typeof bookingListingByStatus, Prisma.BookingWhereInput[]> = {- upcoming: [{ endTime: { gte: new Date() } }],- past: [{ endTime: { lte: new Date() } }],+ upcoming: [{ endTime: { gte: new Date() }, NOT: { status: { equals: BookingStatus.CANCELLED } } }],+ past: [{ endTime: { lte: new Date() }, NOT: { status: { equals: BookingStatus.CANCELLED } } }],cancelled: [{ status: { equals: BookingStatus.CANCELLED } }],};const bookingListingOrderby: Record<typeof bookingListingByStatus, Prisma.BookingOrderByInput> = {