Created a groups page for students and teachers

This commit is contained in:
Tiago Ribeiro
2024-08-17 20:18:28 +01:00
parent f0ff6ac691
commit 229275aaee
16 changed files with 2016 additions and 2222 deletions

View File

@@ -54,7 +54,7 @@ export default function MasterCorporateDashboard({user}: Props) {
const {stats} = useStats();
const {users, reload} = useUsers();
const {codes} = useCodes(user.id);
const {groups} = useGroups(user.id, user.type);
const {groups} = useGroups({admin: user.id, userType: user.type});
const masterCorporateUserGroups = [...new Set(groups.filter((u) => u.admin === user.id).flatMap((g) => g.participants))];
const corporateUserGroups = [...new Set(groups.flatMap((g) => g.participants))];