Skip to content

Commit 1049023

Browse files
committed
better
1 parent 9d3e9f2 commit 1049023

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

services/static-webserver/client/source/class/osparc/share/Collaborators.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -508,14 +508,17 @@ qx.Class.define("osparc.share.Collaborators", {
508508
collaboratorsList.sort(this.self().sortStudyOrServiceCollabs);
509509

510510
// add a separator right after the product groups
511-
const collabTypeOrder = osparc.store.Groups.COLLAB_TYPE_ORDER;
512-
const hasProductGroup = collaboratorsList.some(c => collabTypeOrder.includes(c.collabType));
513-
const hasNonProductGroup = collaboratorsList.some(c => !collabTypeOrder.includes(c.collabType));
511+
const productGroup = [
512+
osparc.store.Groups.COLLAB_TYPE.EVERYONE,
513+
osparc.store.Groups.COLLAB_TYPE.SUPPORT,
514+
];
515+
const hasProductGroup = collaboratorsList.some(c => productGroup.includes(c.collabType));
516+
const hasNonProductGroup = collaboratorsList.some(c => !productGroup.includes(c.collabType));
514517
let separatorInserted = false;
515518
collaboratorsList.forEach(c => {
516-
const hasCollabType = collabTypeOrder.includes(c.collabType);
519+
const isProductGroup = productGroup.includes(c.collabType);
517520
// Only insert separator if both sides exist
518-
if (!hasCollabType && hasProductGroup && hasNonProductGroup && !separatorInserted) {
521+
if (!isProductGroup && hasProductGroup && hasNonProductGroup && !separatorInserted) {
519522
const separator = {
520523
isSeparator: true
521524
};

0 commit comments

Comments
 (0)