X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FUI.git;a=blobdiff_plain;f=skyquake%2Fplugins%2Fproject_management%2Fsrc%2Fdashboard%2Fdashboard.jsx;h=843301d03410cfac2d4b5cbff09ae0f45a493d1f;hp=02b9384a34a830b469936e51dc151dabd7d79cae;hb=0d4ddf409b399a2caa75726be8d04ce6fe89b2c8;hpb=c939d026fe2116d17370970e9359e93a440a5a5f diff --git a/skyquake/plugins/project_management/src/dashboard/dashboard.jsx b/skyquake/plugins/project_management/src/dashboard/dashboard.jsx index 02b9384a3..843301d03 100644 --- a/skyquake/plugins/project_management/src/dashboard/dashboard.jsx +++ b/skyquake/plugins/project_management/src/dashboard/dashboard.jsx @@ -136,17 +136,21 @@ class ProjectManagementDashboard extends React.Component { //Remove null values from role projectUsers.map((u) => { let cleanRoles = []; + let cleanManoRoles = []; u.role && u.role.map((r,i) => { let role = {}; //you may add a user without a role or a keys, but if one is present then the other must be as well. - if(!r.role ) { - } else { + if(r.role ) { delete r.keys; - // r.keys = projectName; - cleanRoles.push(r) + // r.keys = projectName; + switch(ROLES.PROJECT.TYPE[r.role]) { + case 'rw-project-mano' : cleanManoRoles.push(r); break; + case 'rw-project' : cleanRoles.push(r); break; + } } }); u.role = cleanRoles; + u["rw-project-mano:mano-role"] = cleanManoRoles cleanUsers.push(u); }); return cleanUsers; @@ -175,13 +179,6 @@ class ProjectManagementDashboard extends React.Component { removeUserFromProject = (userIndex, e) => { this.actions.handleRemoveUserFromProject(userIndex); } - updateUserRoleInProject = (userIndex, roleIndex, e) => { - this.actions.handleUpdateUserRoleInProject({ - userIndex, - roleIndex, - value: JSON.parse(e.target.value) - }) - } toggleUserRoleInProject = (userIndex, roleIndex, e) => { this.actions.handleToggleUserRoleInProject({ userIndex,