ENCOA-133: Teachers within a Group should be able to view the Group assignments
This commit is contained in:
@@ -13,7 +13,7 @@ export default function useAssignments({assigner, assignees, corporate}: {assign
|
||||
.get<Assignment[]>(!corporate ? "/api/assignments" : `/api/assignments/corporate/${corporate}`)
|
||||
.then(async (response) => {
|
||||
if (assigner) {
|
||||
setAssignments(response.data.filter((a) => a.assigner === assigner));
|
||||
setAssignments(response.data.filter((a) => a.assigner === assigner || (!a.teachers ? false : a.teachers.includes(assigner))));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user