Skip to content

Commit 7b8b3dd

Browse files
committed
fix(#392):
- Implement add team such that on ttlEmail it only shows ttls who don't have teams
1 parent fe125aa commit 7b8b3dd

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

src/containers/admin-dashBoard/CreateTeamModal.tsx

+4
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;
@@ -75,6 +76,9 @@ export default function CreateTeamModal({
7576
},
7677
});
7778
}
79+
// console.log(data?.getAllUsers
80+
// ?.filter((user: any) => user.role === 'ttl' && !user.team))
81+
console.log(data?.getAllTTLUsers)
7882
/* istanbul ignore next */
7983
return (
8084
<div

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)