Skip to content

Commit 9ad6201

Browse files
committed
show icon
1 parent 5a8906d commit 9ad6201

File tree

1 file changed

+8
-0
lines changed
  • services/static-webserver/client/source/class/osparc/dashboard

1 file changed

+8
-0
lines changed

services/static-webserver/client/source/class/osparc/dashboard/CardBase.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,17 +188,25 @@ qx.Class.define("osparc.dashboard.CardBase", {
188188
// Icon
189189
const groupsStore = osparc.store.Groups.getInstance();
190190
const everyoneGroupIds = groupsStore.getEveryoneGroupIds();
191+
const supportGroup = groupsStore.getSupportGroup();
191192
const organizations = groupsStore.getOrganizations();
192193
const myGroupId = groupsStore.getMyGroupId();
193194

194195
const organizationIds = Object.keys(organizations).map(key => parseInt(key));
195196
if (gids.some(gid => everyoneGroupIds.includes(gid))) {
197+
// shared with "1" or product everyone
196198
shareIcon.setSource(osparc.dashboard.CardBase.SHARED_ALL);
199+
} else if (supportGroup && gids.includes(supportGroup.getGroupId())) {
200+
// shared with support group, show as if it was a group
201+
shareIcon.setSource(osparc.dashboard.CardBase.SHARED_ORGS);
197202
} else if (organizationIds.filter(value => gids.includes(value)).length) { // find intersection
203+
// shared with at least one organization
198204
shareIcon.setSource(osparc.dashboard.CardBase.SHARED_ORGS);
199205
} else if (gids.length === 1 && gids[0] === myGroupId) {
206+
// not shared
200207
shareIcon.setSource(osparc.dashboard.CardBase.SHARE_ICON);
201208
} else {
209+
// shared with some users
202210
shareIcon.setSource(osparc.dashboard.CardBase.SHARED_USER);
203211
}
204212

0 commit comments

Comments
 (0)