diff --git a/services/static-webserver/client/source/class/osparc/desktop/organizations/MembersList.js b/services/static-webserver/client/source/class/osparc/desktop/organizations/MembersList.js index 58cadd52612..fce81bd439a 100644 --- a/services/static-webserver/client/source/class/osparc/desktop/organizations/MembersList.js +++ b/services/static-webserver/client/source/class/osparc/desktop/organizations/MembersList.js @@ -154,9 +154,9 @@ qx.Class.define("osparc.desktop.organizations.MembersList", { ctrl.bindProperty("userId", "model", null, item, id); ctrl.bindProperty("userId", "key", null, item, id); ctrl.bindProperty("thumbnail", "thumbnail", null, item, id); - ctrl.bindProperty("name", "title", null, item, id); + ctrl.bindProperty("label", "title", null, item, id); + ctrl.bindProperty("description", "subtitleMD", null, item, id); ctrl.bindProperty("accessRights", "accessRights", null, item, id); - ctrl.bindProperty("email", "subtitleMD", null, item, id); ctrl.bindProperty("options", "options", null, item, id); ctrl.bindProperty("showOptions", "showOptions", null, item, id); }, @@ -225,15 +225,17 @@ qx.Class.define("osparc.desktop.organizations.MembersList", { enabled: canIWrite }); + const myGroupId = osparc.auth.Data.getInstance().getGroupId(); const membersList = []; const groupMembers = organization.getGroupMembers(); Object.values(groupMembers).forEach(groupMember => { + const gid = parseInt(groupMember.getGroupId()); const member = {}; - member["userId"] = groupMember.getUserId(); - member["groupId"] = groupMember.getGroupId(); + member["userId"] = gid === myGroupId ? osparc.auth.Data.getInstance().getUserId() : groupMember.getUserId(); + member["groupId"] = gid; member["thumbnail"] = groupMember.getThumbnail(); - member["name"] = groupMember.getLabel(); - member["email"] = groupMember.getEmail(); + member["label"] = groupMember.getLabel(); + member["description"] = gid === myGroupId ? osparc.auth.Data.getInstance().getEmail() : groupMember.getDescription(); member["accessRights"] = groupMember.getAccessRights(); let options = []; if (canIDelete) { @@ -287,7 +289,6 @@ qx.Class.define("osparc.desktop.organizations.MembersList", { } // Let me go? const openStudy = osparc.store.Store.getInstance().getCurrentStudy(); - const myGroupId = osparc.store.Groups.getInstance().getMyGroupId(); if ( openStudy === null && canIWrite && diff --git a/services/static-webserver/client/source/class/osparc/desktop/wallets/MembersList.js b/services/static-webserver/client/source/class/osparc/desktop/wallets/MembersList.js index 4f5b1dd796a..b3b4226e37d 100644 --- a/services/static-webserver/client/source/class/osparc/desktop/wallets/MembersList.js +++ b/services/static-webserver/client/source/class/osparc/desktop/wallets/MembersList.js @@ -170,9 +170,9 @@ qx.Class.define("osparc.desktop.wallets.MembersList", { ctrl.bindProperty("userId", "key", null, item, id); ctrl.bindProperty("groupId", "gid", null, item, id); ctrl.bindProperty("thumbnail", "thumbnail", null, item, id); - ctrl.bindProperty("name", "title", null, item, id); + ctrl.bindProperty("label", "title", null, item, id); + ctrl.bindProperty("description", "subtitleMD", null, item, id); ctrl.bindProperty("accessRights", "accessRights", null, item, id); - ctrl.bindProperty("email", "subtitleMD", null, item, id); ctrl.bindProperty("options", "options", null, item, id); ctrl.bindProperty("showOptions", "showOptions", null, item, id); }, @@ -222,8 +222,8 @@ qx.Class.define("osparc.desktop.wallets.MembersList", { collaborator["userId"] = gid === myGroupId ? osparc.auth.Data.getInstance().getUserId() : collab.getUserId(); collaborator["groupId"] = collab.getGroupId(); collaborator["thumbnail"] = collab.getThumbnail(); - collaborator["name"] = collab.getLabel(); - collaborator["email"] = gid === myGroupId ? osparc.auth.Data.getInstance().getEmail() : collab.getEmail(); + collaborator["label"] = collab.getLabel(); + collaborator["description"] = gid === myGroupId ? osparc.auth.Data.getInstance().getEmail() : collab.getDescription(); collaborator["accessRights"] = { read: accessRights["read"], write: accessRights["write"],