File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { Team , Task as Prisma_Task , WBS_Element } from '@prisma/client' ;
22import { UserWithSettings } from './auth.utils' ;
33import { HttpException } from './errors.utils' ;
4- import { getTeamsFromUsers } from './teams.utils' ;
5-
6- export type UserWithTeams = UserWithSettings & {
7- teamAsHead : Team | null ;
8- teamsAsLead : Team [ ] | null ;
9- teamsAsMember : Team [ ] | null ;
10- } ;
4+ import { UserWithTeams , getTeamsFromUsers } from './teams.utils' ;
115
126export type TaskWithAssignees = Prisma_Task & {
137 assignees : UserWithSettings [ ] | null ;
Original file line number Diff line number Diff line change 11import { Prisma , User , Team } from '@prisma/client' ;
2- import { UserWithTeams } from './notifications .utils' ;
2+ import { UserWithSettings } from './auth .utils' ;
33
44const teamQueryArgsMembersOnly = Prisma . validator < Prisma . TeamArgs > ( ) ( {
55 include : {
@@ -52,6 +52,12 @@ export const isUserPartOfTeams = (teams: Prisma.TeamGetPayload<typeof teamQueryA
5252 return teams . some ( ( team ) => isUserOnTeam ( team , user ) ) ;
5353} ;
5454
55+ export type UserWithTeams = UserWithSettings & {
56+ teamAsHead : Team | null ;
57+ teamsAsLead : Team [ ] | null ;
58+ teamsAsMember : Team [ ] | null ;
59+ } ;
60+
5561/**
5662 * Gets the teams from a list of users
5763 * @param users the users to get the teams from
You can’t perform that action at this time.
0 commit comments