Skip to content

Commit 1fb5fce

Browse files
committed
refactor
1 parent 6632d21 commit 1fb5fce

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

services/static-webserver/client/source/class/osparc/store/ConversationsProject.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ qx.Class.define("osparc.store.ConversationsProject", {
2424
"conversationDeleted": "qx.event.type.Data",
2525
},
2626

27+
statics: {
28+
TYPES: {
29+
PROJECT_STATIC: "PROJECT_STATIC",
30+
PROJECT_ANNOTATION: "PROJECT_ANNOTATION",
31+
},
32+
},
33+
2734
members: {
2835
getConversations: function(studyId) {
2936
const params = {
@@ -54,7 +61,7 @@ qx.Class.define("osparc.store.ConversationsProject", {
5461
return osparc.data.Resources.fetch("conversationsStudies", "getConversation", params);
5562
},
5663

57-
addConversation: function(studyId, name = "new 1", type = osparc.study.Conversations.TYPES.PROJECT_STATIC) {
64+
addConversation: function(studyId, name = "new 1", type = osparc.store.ConversationsProject.TYPES.PROJECT_STATIC) {
5865
const params = {
5966
url: {
6067
studyId,

services/static-webserver/client/source/class/osparc/study/Conversations.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,6 @@ qx.Class.define("osparc.study.Conversations", {
4747
},
4848

4949
statics: {
50-
TYPES: {
51-
PROJECT_STATIC: "PROJECT_STATIC",
52-
PROJECT_ANNOTATION: "PROJECT_ANNOTATION",
53-
},
54-
5550
CHANNELS: {
5651
CONVERSATION_CREATED: "conversation:created",
5752
CONVERSATION_UPDATED: "conversation:updated",

services/static-webserver/client/source/class/osparc/workbench/WorkbenchUI.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2049,7 +2049,7 @@ qx.Class.define("osparc.workbench.WorkbenchUI", {
20492049
}
20502050
case annotationTypes.CONVERSATION: {
20512051
const conversationTitle = `${initPos.x}, ${initPos.y}`;
2052-
osparc.store.ConversationsProject.getInstance().addConversation(this.getStudy().getUuid(), conversationTitle, osparc.study.Conversations.TYPES.PROJECT_ANNOTATION)
2052+
osparc.store.ConversationsProject.getInstance().addConversation(this.getStudy().getUuid(), conversationTitle, osparc.store.ConversationsProject.TYPES.PROJECT_ANNOTATION)
20532053
.then(conversationData => {
20542054
serializeData.attributes.conversationId = conversationData["conversationId"];
20552055
serializeData.attributes.text = conversationData["name"];

0 commit comments

Comments
 (0)