Skip to content

Commit e07cf70

Browse files
committed
more label and description
1 parent e8b9a77 commit e07cf70

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

services/static-webserver/client/source/class/osparc/desktop/organizations/MembersList.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@ qx.Class.define("osparc.desktop.organizations.MembersList", {
154154
ctrl.bindProperty("userId", "model", null, item, id);
155155
ctrl.bindProperty("userId", "key", null, item, id);
156156
ctrl.bindProperty("thumbnail", "thumbnail", null, item, id);
157-
ctrl.bindProperty("name", "title", null, item, id);
157+
ctrl.bindProperty("label", "title", null, item, id);
158+
ctrl.bindProperty("description", "subtitleMD", null, item, id);
158159
ctrl.bindProperty("accessRights", "accessRights", null, item, id);
159-
ctrl.bindProperty("email", "subtitleMD", null, item, id);
160160
ctrl.bindProperty("options", "options", null, item, id);
161161
ctrl.bindProperty("showOptions", "showOptions", null, item, id);
162162
},
@@ -225,15 +225,17 @@ qx.Class.define("osparc.desktop.organizations.MembersList", {
225225
enabled: canIWrite
226226
});
227227

228+
const myGroupId = osparc.auth.Data.getInstance().getGroupId();
228229
const membersList = [];
229230
const groupMembers = organization.getGroupMembers();
230231
Object.values(groupMembers).forEach(groupMember => {
232+
const gid = parseInt(groupMember.getGroupId());
231233
const member = {};
232-
member["userId"] = groupMember.getUserId();
233-
member["groupId"] = groupMember.getGroupId();
234+
member["userId"] = gid === myGroupId ? osparc.auth.Data.getInstance().getUserId() : groupMember.getUserId();
235+
member["groupId"] = gid;
234236
member["thumbnail"] = groupMember.getThumbnail();
235-
member["name"] = groupMember.getLabel();
236-
member["email"] = groupMember.getEmail();
237+
member["label"] = groupMember.getLabel();
238+
member["description"] = gid === myGroupId ? osparc.auth.Data.getInstance().getEmail() : groupMember.getDescription();
237239
member["accessRights"] = groupMember.getAccessRights();
238240
let options = [];
239241
if (canIDelete) {
@@ -287,7 +289,6 @@ qx.Class.define("osparc.desktop.organizations.MembersList", {
287289
}
288290
// Let me go?
289291
const openStudy = osparc.store.Store.getInstance().getCurrentStudy();
290-
const myGroupId = osparc.store.Groups.getInstance().getMyGroupId();
291292
if (
292293
openStudy === null &&
293294
canIWrite &&

services/static-webserver/client/source/class/osparc/desktop/wallets/MembersList.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,9 @@ qx.Class.define("osparc.desktop.wallets.MembersList", {
170170
ctrl.bindProperty("userId", "key", null, item, id);
171171
ctrl.bindProperty("groupId", "gid", null, item, id);
172172
ctrl.bindProperty("thumbnail", "thumbnail", null, item, id);
173-
ctrl.bindProperty("name", "title", null, item, id);
173+
ctrl.bindProperty("label", "title", null, item, id);
174+
ctrl.bindProperty("description", "subtitleMD", null, item, id);
174175
ctrl.bindProperty("accessRights", "accessRights", null, item, id);
175-
ctrl.bindProperty("email", "subtitleMD", null, item, id);
176176
ctrl.bindProperty("options", "options", null, item, id);
177177
ctrl.bindProperty("showOptions", "showOptions", null, item, id);
178178
},
@@ -222,8 +222,8 @@ qx.Class.define("osparc.desktop.wallets.MembersList", {
222222
collaborator["userId"] = gid === myGroupId ? osparc.auth.Data.getInstance().getUserId() : collab.getUserId();
223223
collaborator["groupId"] = collab.getGroupId();
224224
collaborator["thumbnail"] = collab.getThumbnail();
225-
collaborator["name"] = collab.getLabel();
226-
collaborator["email"] = gid === myGroupId ? osparc.auth.Data.getInstance().getEmail() : collab.getEmail();
225+
collaborator["label"] = collab.getLabel();
226+
collaborator["description"] = gid === myGroupId ? osparc.auth.Data.getInstance().getEmail() : collab.getDescription();
227227
collaborator["accessRights"] = {
228228
read: accessRights["read"],
229229
write: accessRights["write"],

0 commit comments

Comments
 (0)