Skip to content

Commit

Permalink
Merge pull request #149 from COS301-SE-2024/fix/clientAssignmentInOrg
Browse files Browse the repository at this point in the history
Fixed assigning clients in orgs to a VA
  • Loading branch information
JBlixems authored Sep 29, 2024
2 parents 7d0c74c + ee0549e commit 3b463b3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
8 changes: 7 additions & 1 deletion CoVAR-app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion CoVAR-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@
"axios-mock-adapter": "^1.22.0",
"echarts": "^5.5.1",
"firebase": "^10.12.2",
"marked": "^14.1.2",
"i": "^0.3.7",
"marked": "^14.1.2",
"moment": "^2.30.1",
"mui": "^0.0.1",
"next": "14.2.13",
"react": "^18",
"react-dom": "^18",
Expand Down
7 changes: 6 additions & 1 deletion CoVAR-app/src/app/(pages)/adminTools/components/userList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ useEffect(() => {
throw new Error('Access token not found');
}
const users = await fetchUsers(accessToken);

setUsers(users);
setLoading(false);
} catch (error: any) {
Expand Down Expand Up @@ -311,8 +312,12 @@ const handleConfirmUnassignVA = async () => {
};

const filteredUsers = users.filter(user =>
user.username.toLowerCase().includes(searchTerm.toLowerCase()) && user.role !== 'va'
user.username.toLowerCase().includes(searchTerm.toLowerCase()) &&
user.role !== 'va' &&
user.organization == null ||
user.organization == ""
);


const filteredOrganizations = organizations.filter(org =>
org.name.toLowerCase().includes(searchTerm.toLowerCase())
Expand Down

0 comments on commit 3b463b3

Please sign in to comment.