diff --git a/CoVAR-app/package-lock.json b/CoVAR-app/package-lock.json index cbc45fb..43e1253 100644 --- a/CoVAR-app/package-lock.json +++ b/CoVAR-app/package-lock.json @@ -18,9 +18,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", @@ -10649,6 +10650,11 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, + "node_modules/mui": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/mui/-/mui-0.0.1.tgz", + "integrity": "sha512-iB9zfxsJBcMkZ/SY6X+HGSPr4fftCZIQ76ZMH8iSMfVkidVzRtZlLW2gbWXUe+IMcj8JLv1p+dGKvPVlgtiocA==" + }, "node_modules/nanoid": { "version": "3.3.7", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", diff --git a/CoVAR-app/package.json b/CoVAR-app/package.json index 1ebf7fe..ee08348 100644 --- a/CoVAR-app/package.json +++ b/CoVAR-app/package.json @@ -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", diff --git a/CoVAR-app/src/app/(pages)/adminTools/components/userList.tsx b/CoVAR-app/src/app/(pages)/adminTools/components/userList.tsx index 2d5a0c1..ffc1116 100644 --- a/CoVAR-app/src/app/(pages)/adminTools/components/userList.tsx +++ b/CoVAR-app/src/app/(pages)/adminTools/components/userList.tsx @@ -87,6 +87,7 @@ useEffect(() => { throw new Error('Access token not found'); } const users = await fetchUsers(accessToken); + setUsers(users); setLoading(false); } catch (error: any) { @@ -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())