Skip to content

Commit e4df503

Browse files
committed
studyId
1 parent 78b3cfb commit e4df503

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

services/static-webserver/client/source/class/osparc/data/model/Conversation.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ qx.Class.define("osparc.data.model.Conversation", {
2424

2525
/**
2626
* @param conversationData {Object} Object containing the serialized Conversation Data
27-
* @param studyData {Object} Object containing the Study Data
27+
* @param studyId {String} ID of the Study
2828
* */
29-
construct: function(conversationData, studyData) {
29+
construct: function(conversationData, studyId) {
3030
this.base(arguments);
3131

3232
this.set({
@@ -38,7 +38,7 @@ qx.Class.define("osparc.data.model.Conversation", {
3838
modified: new Date(conversationData.modified),
3939
projectId: conversationData.projectUuid || null,
4040
extraContext: conversationData.extraContext || null,
41-
studyData: studyData || null,
41+
studyId: studyId || null,
4242
});
4343

4444
this.__messages = [];
@@ -137,8 +137,8 @@ qx.Class.define("osparc.data.model.Conversation", {
137137
apply: "__applyLastMessage",
138138
},
139139

140-
studyData: {
141-
check: "Object",
140+
studyId: {
141+
check: "String",
142142
nullable: true,
143143
init: null,
144144
},
@@ -229,8 +229,8 @@ qx.Class.define("osparc.data.model.Conversation", {
229229
limit: 42
230230
}
231231
};
232-
if (this.getStudyData()) {
233-
params.url.studyId = this.getStudyData().uuid;
232+
if (this.getStudyId()) {
233+
params.url.studyId = this.getStudyId();
234234
}
235235

236236
const nextRequestParams = this.__nextRequestParams;
@@ -241,7 +241,7 @@ qx.Class.define("osparc.data.model.Conversation", {
241241
const options = {
242242
resolveWResponse: true
243243
};
244-
const promise = this.getStudyData() ?
244+
const promise = this.getStudyId() ?
245245
osparc.data.Resources.fetch("conversationsStudies", "getMessagesPage", params, options) :
246246
osparc.data.Resources.fetch("conversationsSupport", "getMessagesPage", params, options);
247247
return promise

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ qx.Class.define("osparc.study.Conversation", {
4747
// create new conversation first
4848
osparc.store.ConversationsProject.getInstance().postConversation(this.__studyData["uuid"])
4949
.then(data => {
50-
const newConversation = new osparc.data.model.Conversation(data, this.__studyData);
50+
const newConversation = new osparc.data.model.Conversation(data, this.__studyData["uuid"]);
5151
this.setConversation(newConversation);
5252
this.__postMessage(content);
5353
});
@@ -62,7 +62,7 @@ qx.Class.define("osparc.study.Conversation", {
6262
// create new conversation first
6363
osparc.store.ConversationsProject.getInstance().postConversation(this.__studyData["uuid"])
6464
.then(data => {
65-
const newConversation = new osparc.data.model.Conversation(data, this.__studyData);
65+
const newConversation = new osparc.data.model.Conversation(data, this.__studyData["uuid"]);
6666
this.setConversation(newConversation);
6767
this.__postNotify(userGid);
6868
});

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ qx.Class.define("osparc.study.ConversationPage", {
4848
this.__buildLayout();
4949

5050
if (conversationData) {
51-
const conversation = new osparc.data.model.Conversation(conversationData, this.__studyData);
51+
const conversation = new osparc.data.model.Conversation(conversationData, this.__studyData["uuid"]);
5252
this.setConversation(conversation);
5353
}
5454

@@ -122,7 +122,7 @@ qx.Class.define("osparc.study.ConversationPage", {
122122
// create new conversation first
123123
osparc.store.ConversationsProject.getInstance().postConversation(this.__studyData["uuid"], newLabel)
124124
.then(data => {
125-
const conversation = new osparc.data.model.Conversation(data, this.__studyData);
125+
const conversation = new osparc.data.model.Conversation(data, this.__studyData["uuid"]);
126126
this.setConversation(conversation);
127127
this.getChildControl("button").setLabel(newLabel);
128128
});

0 commit comments

Comments
 (0)