Skip to content

Commit 161e901

Browse files
committed
skipStudyOptions flag
1 parent fb71b64 commit 161e901

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

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

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ qx.Class.define("osparc.dashboard.ResourceBrowserBase", {
9595
return isLogged;
9696
},
9797

98-
startStudyById: function(studyId, openCB, cancelCB, isStudyCreation = false) {
98+
startStudyById: function(studyId, openCB, cancelCB, isStudyCreation = false, skipStudyOptions = false) {
9999
if (!osparc.dashboard.ResourceBrowserBase.checkLoggedIn()) {
100100
return;
101101
}
@@ -116,7 +116,14 @@ qx.Class.define("osparc.dashboard.ResourceBrowserBase", {
116116
};
117117
osparc.data.Resources.fetch("studies", "getWallet", params)
118118
.then(wallet => {
119-
if (isStudyCreation || wallet === null || osparc.desktop.credits.Utils.getWallet(wallet["walletId"]) === null) {
119+
if (
120+
!skipStudyOptions &&
121+
(
122+
isStudyCreation ||
123+
wallet === null ||
124+
osparc.desktop.credits.Utils.getWallet(wallet["walletId"]) === null
125+
)
126+
) {
120127
// pop up study options if the study was just created or if it has no wallet assigned or user has no access to it
121128
const resourceSelector = new osparc.study.StudyOptions(studyId);
122129
const win = osparc.study.StudyOptions.popUpInWindow(resourceSelector);
@@ -456,11 +463,11 @@ qx.Class.define("osparc.dashboard.ResourceBrowserBase", {
456463
throw new Error("Abstract method called!");
457464
},
458465

459-
_startStudyById: function(studyId, openCB, cancelCB, isStudyCreation = false) {
466+
_startStudyById: function(studyId, openCB, cancelCB, isStudyCreation = false, skipStudyOptions = false) {
460467
if (isStudyCreation) {
461468
this.fireDataEvent("changeTab", "studiesTab");
462469
}
463-
this.self().startStudyById(studyId, openCB, cancelCB, isStudyCreation);
470+
this.self().startStudyById(studyId, openCB, cancelCB, isStudyCreation, skipStudyOptions);
464471
},
465472

466473
_createStudyFromTemplate: function() {

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,8 @@ qx.Class.define("osparc.dashboard.TemplateBrowser", {
151151
osparc.data.Resources.fetch("studies", "delete", params);
152152
};
153153
const isStudyCreation = true;
154-
this._startStudyById(studyId, openCB, cancelCB, isStudyCreation);
154+
const skipStudyOptions = true;
155+
this._startStudyById(studyId, openCB, cancelCB, isStudyCreation, skipStudyOptions);
155156
})
156157
.catch(err => {
157158
this._hideLoadingPage();

0 commit comments

Comments
 (0)