Skip to content

Commit

Permalink
more label and description
Browse files Browse the repository at this point in the history
  • Loading branch information
odeimaiz committed Dec 10, 2024
1 parent e8b9a77 commit e07cf70
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
},
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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 &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
},
Expand Down Expand Up @@ -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"],
Expand Down

0 comments on commit e07cf70

Please sign in to comment.