fix: add rescheduled to trpc procedure

pull/7970/head
nafees nazik 2023-03-28 13:25:22 +05:30
parent b1dafab774
commit 82b26582d2
1 changed files with 13 additions and 3 deletions

View File

@ -117,11 +117,18 @@ export const bookingsRouter = router({
OR: [
{
recurringEventId: { not: null },
status: { notIn: [BookingStatus.PENDING, BookingStatus.CANCELLED, BookingStatus.REJECTED] },
status: {
notIn: [
BookingStatus.PENDING,
BookingStatus.CANCELLED,
BookingStatus.REJECTED,
BookingStatus.RESCHEDULED,
],
},
},
{
recurringEventId: { equals: null },
status: { notIn: [BookingStatus.CANCELLED, BookingStatus.REJECTED] },
status: { notIn: [BookingStatus.CANCELLED, BookingStatus.REJECTED, BookingStatus.RESCHEDULED] },
},
],
},
@ -129,7 +136,9 @@ export const bookingsRouter = router({
endTime: { gte: new Date() },
AND: [
{ NOT: { recurringEventId: { equals: null } } },
{ status: { notIn: [BookingStatus.CANCELLED, BookingStatus.REJECTED] } },
{
status: { notIn: [BookingStatus.CANCELLED, BookingStatus.REJECTED, BookingStatus.RESCHEDULED] },
},
],
},
past: {
@ -137,6 +146,7 @@ export const bookingsRouter = router({
AND: [
{ NOT: { status: { equals: BookingStatus.CANCELLED } } },
{ NOT: { status: { equals: BookingStatus.REJECTED } } },
{ NOT: { status: { equals: BookingStatus.RESCHEDULED } } },
],
},
cancelled: {