Skip to content

Commit f9fa585

Browse files
committed
more progress
1 parent 70ff84e commit f9fa585

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,10 @@ qx.Class.define("osparc.dashboard.TemplateBrowser", {
150150
win.addListener("cancel", () => cancelStudyOptions());
151151
studyOptions.addListener("cancel", () => cancelStudyOptions());
152152
studyOptions.addListener("startStudy", () => {
153+
const titleSelection = studyOptions.getChildControl("title-field").getValue();
154+
const walletSelection = studyOptions.getChildControl("wallet-selector").getSelection();
155+
const nodesPricingUnits = studyOptions.getNodePricingUnits();
156+
win.close();
153157
osparc.study.Utils.createStudyFromTemplate(templateData, this._loadingPage)
154158
.then(studyData => {
155159
const studyId = studyData["uuid"];
@@ -167,15 +171,17 @@ qx.Class.define("osparc.dashboard.TemplateBrowser", {
167171
};
168172

169173
const promises = [];
170-
const titleSelection = studyOptions.getChildControl("title-field").getValue();
171174
if (studyData["name"] !== titleSelection) {
172175
promises.push(osparc.study.StudyOptions.updateName(studyData, titleSelection));
173176
}
174-
const walletSelection = studyOptions.getChildControl("wallet-selector").getSelection();
175177
if (walletSelection.length && walletSelection[0]["walletId"]) {
176178
const walletId = walletSelection[0]["walletId"];
177179
promises.push(osparc.study.StudyOptions.updateWallet(studyData["uuid"], walletId));
178180
}
181+
nodesPricingUnits.forEach(nodePricingUnits => {
182+
console.log("nodePricingUnits", nodePricingUnits);
183+
// osparc.study.NodePricingUnits.patchPricingUnitSelection(studyId, )
184+
})
179185

180186
Promise.all(promises)
181187
.then(() => {

0 commit comments

Comments
 (0)