X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=skyquake%2Fplugins%2Fproject_management%2Fsrc%2Fdashboard%2Fdashboard.jsx;h=c0adc7a4a5d5fc7d7649bc776fd03e2d04a687ba;hb=08e8a038f222c66ce6f55760a766e90b87b3c50b;hp=e9847e5f43780d39201e5e09ab0b0ff8027e46d1;hpb=a719495cecbdffc6c5bbd078f725e3a9b3045b3f;p=osm%2FUI.git diff --git a/skyquake/plugins/project_management/src/dashboard/dashboard.jsx b/skyquake/plugins/project_management/src/dashboard/dashboard.jsx index e9847e5f4..c0adc7a4a 100644 --- a/skyquake/plugins/project_management/src/dashboard/dashboard.jsx +++ b/skyquake/plugins/project_management/src/dashboard/dashboard.jsx @@ -132,6 +132,7 @@ class ProjectManagementDashboard extends React.Component { }); } cleanUsers(projectUsers, projectName) { + let self = this; let cleanUsers = []; //Remove null values from role projectUsers.map((u) => { @@ -140,7 +141,7 @@ class ProjectManagementDashboard extends React.Component { 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 ) { + if(r.role) { delete r.keys; // r.keys = projectName; switch(ROLES.PROJECT.TYPE[r.role]) { @@ -150,8 +151,11 @@ class ProjectManagementDashboard extends React.Component { } }); u.role = cleanRoles; - u["rw-project-mano:mano-role"] = cleanManoRoles - cleanUsers.push(u); + u["rw-project-mano:mano-role"] = u["rw-project-mano:mano-role"] || []; + u["rw-project-mano:mano-role"] = u["rw-project-mano:mano-role"].concat(cleanManoRoles); + if (u['user-name'] != self.context.userProfile.userId) { + cleanUsers.push(u); + } }); return cleanUsers; } @@ -307,7 +311,7 @@ class ProjectManagementDashboard extends React.Component { - +
{!state.isReadOnly ? : null} @@ -322,9 +326,13 @@ class ProjectManagementDashboard extends React.Component { { state.projectUsers.map((u,i)=> { - let userRoles = u.role && u.role.map((r) => { - return r.role; - }) || []; + let userRoles = [] + u.role && u.role.map((r) => { + userRoles.push(r.role); + }); + u["rw-project-mano:mano-role"] && u["rw-project-mano:mano-role"].map((r) => { + userRoles.push(r.role); + }); return ( {!state.isReadOnly ?