Skip to content

Commit b45bb57

Browse files
authored
fix(#392): (#619)
- Implement add team such that on ttlEmail it only shows ttls who don't have teams
1 parent 31852e3 commit b45bb57

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

src/containers/admin-dashBoard/CreateTeamModal.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export default function CreateTeamModal({
2020
getAllTeams: Team[];
2121
getAllCohorts: Cohort[];
2222
getAllUsers: any;
23+
getAllTTLUsers:any,
2324
};
2425
createTeamModel: boolean;
2526
removeModel: Function;
@@ -141,8 +142,8 @@ export default function CreateTeamModal({
141142
},
142143
}}
143144
options={
144-
data?.getAllUsers
145-
?.filter((user: any) => user.role === 'ttl')
145+
data?.getAllTTLUsers
146+
?.filter((user: any) => !user.team)
146147
?.map((user: any) => ({
147148
value: user.email,
148149
label: user.email,

src/containers/admin-dashBoard/Teams.tsx

+15
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,20 @@ export const getAllTeam = gql`
118118
name
119119
description
120120
}
121+
getAllTTLUsers(orgToken: $orgToken) {
122+
profile {
123+
name
124+
id
125+
}
126+
email
127+
role
128+
team {
129+
name
130+
cohort {
131+
name
132+
}
133+
}
134+
}
121135
}
122136
`;
123137

@@ -196,6 +210,7 @@ function AdminTeams() {
196210
getAllTeams: Team[];
197211
getAllCohorts: Cohort[];
198212
getAllUsers: any;
213+
getAllTTLUsers:any,
199214
};
200215
loading: boolean;
201216
error?: any;

0 commit comments

Comments
 (0)