fix: filtering events bug in bookings page (#13447)

* fix: filtering events bug in bookings page

* fix: handle edge case if we change hosts in event-settings/assignment

* update: handled edge case

---------

Co-authored-by: Keith Williams <keithwillcode@gmail.com>
This commit is contained in:
Somay Chauhan
2024-02-07 10:01:48 +00:00
committed by GitHub
co-authored by Keith Williams
parent a0451e34c1
commit e377997d49
@@ -147,15 +147,35 @@ async function getBookings({
userIds: {
AND: [
{
eventType: {
users: {
some: {
id: {
in: filters?.userIds,
OR: [
{
eventType: {
hosts: {
some: {
userId: {
in: filters?.userIds,
},
},
},
},
},
},
{
userId: {
in: filters?.userIds,
},
},
{
eventType: {
users: {
some: {
id: {
in: filters?.userIds,
},
},
},
},
},
],
},
],
},