diff --git a/packages/features/insights/server/trpc-router.ts b/packages/features/insights/server/trpc-router.ts index 11a95a6cdb..e2953eae0d 100644 --- a/packages/features/insights/server/trpc-router.ts +++ b/packages/features/insights/server/trpc-router.ts @@ -209,18 +209,18 @@ export const insightsRouter = router({ whereConditional = { ...whereConditional, OR: [ - { - userId: { - in: userIdsFromOrg, - }, - isTeamBooking: false, - }, { teamId: { in: [ctx.user.organizationId, ...teamsFromOrg.map((t) => t.id)], }, isTeamBooking: true, }, + { + userId: { + in: userIdsFromOrg, + }, + isTeamBooking: false, + }, ], }; } @@ -436,18 +436,18 @@ export const insightsRouter = router({ whereConditional = { OR: [ - { - userId: { - in: userIdsFromOrg, - }, - isTeamBooking: false, - }, { teamId: { in: [ctx.user.organizationId, ...teamsFromOrg.map((t) => t.id)], }, isTeamBooking: true, }, + { + userId: { + in: userIdsFromOrg, + }, + isTeamBooking: false, + }, ], }; } @@ -614,18 +614,18 @@ export const insightsRouter = router({ bookingWhere = { ...bookingWhere, OR: [ - { - userId: { - in: userIdsFromOrg, - }, - isTeamBooking: false, - }, { teamId: { in: [ctx.user.organizationId, ...teamsFromOrg.map((t) => t.id)], }, isTeamBooking: true, }, + { + userId: { + in: userIdsFromOrg, + }, + isTeamBooking: false, + }, ], }; }