Skip to content

Commit 5f719fb

Browse files
committed
removed the team type query args and put it in team query args
1 parent 837f351 commit 5f719fb

2 files changed

Lines changed: 8 additions & 20 deletions

File tree

src/backend/src/prisma-query-args/team-type.query-args.ts

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/backend/src/prisma-query-args/teams.query-args.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { Prisma } from '@prisma/client';
22
import { getUserQueryArgs } from './user.query-args.js';
33
import { getProjectGanttQueryArgs } from './projects.query-args.js';
4-
import { getTeamTypeQueryArgs } from './team-type.query-args.js';
54

65
export type TeamQueryArgs = ReturnType<typeof getTeamQueryArgs>;
76

@@ -14,7 +13,7 @@ export const getTeamQueryArgs = (organizationId: string) =>
1413
head: getUserQueryArgs(organizationId),
1514
leads: getUserQueryArgs(organizationId),
1615
userArchived: getUserQueryArgs(organizationId),
17-
teamType: true,
16+
teamType: getTeamTypeQueryArgs(),
1817
projects: {
1918
where: {
2019
wbsElement: {
@@ -35,3 +34,10 @@ export const getTeamPreviewQueryArgs = (organizationId: string) =>
3534
teamType: getTeamTypeQueryArgs()
3635
}
3736
});
37+
38+
export const getTeamTypeQueryArgs = () =>
39+
Prisma.validator<Prisma.Team_TypeDefaultArgs>()({
40+
select: {
41+
name: true
42+
}
43+
});

0 commit comments

Comments
 (0)