File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -40,12 +40,13 @@ export default function ProjectList({ auth }) {
40
40
async function fetchAllProjects ( ) {
41
41
let projectData ;
42
42
43
- if ( user ?. accessLevel === 'admin' || user ?. accessLevel === 'superadmin' ) {
43
+ if (
44
+ user ?. accessLevel === 'admin' ||
45
+ user ?. accessLevel === 'superadmin'
46
+ ) {
44
47
projectData = await projectApiService . fetchProjects ( ) ;
45
- }
46
-
47
- // if user is not admin, but is a project manager, only show projects they manage
48
- if ( ( user ?. accessLevel !== 'admin' || user ?. accessLevel !== 'superadmin' ) && user ?. managedProjects . length > 0 ) {
48
+ } else if ( user ?. managedProjects ?. length > 0 ) {
49
+ // if user is not admin, but is a project manager, only show projects they manage
49
50
projectData = await projectApiService . fetchPMProjects ( user . managedProjects ) ;
50
51
}
51
52
You can’t perform that action at this time.
0 commit comments