Skip to content

Commit f18035e

Browse files
committed
minor
1 parent d728084 commit f18035e

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

services/static-webserver/client/source/class/osparc/editor/AnnotationNoteCreator.js

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,22 @@ qx.Class.define("osparc.editor.AnnotationNoteCreator", {
112112
selectedGids,
113113
newAccessRights,
114114
} = ev.getData();
115-
console.log("addCollaborators", selectedGids, newAccessRights);
116-
// this._addEditors(selectedGids, newAccessRights);
117-
collaboratorsManager.close();
115+
const newCollaborators = {};
116+
selectedGids.forEach(gid => {
117+
newCollaborators[gid] = newAccessRights;
118+
});
119+
const studyData = this.__study.serialize();
120+
osparc.store.Study.addCollaborators(studyData, newCollaborators)
121+
.then(() => {
122+
const potentialCollaborators = osparc.store.Groups.getInstance().getPotentialCollaborators()
123+
selectedGids.forEach(gid => {
124+
if (gid in potentialCollaborators && "getUserId" in potentialCollaborators[gid]) {
125+
const uid = potentialCollaborators[gid].getUserId();
126+
osparc.notification.Notifications.postNewStudy(uid, studyData["uuid"]);
127+
}
128+
});
129+
})
130+
.finally(() => collaboratorsManager.close());
118131
});
119132
}
120133
}

0 commit comments

Comments
 (0)