Skip to content

Commit 624316b

Browse files
committed
list tutorials
1 parent e8c5d6b commit 624316b

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -789,9 +789,11 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
789789
break;
790790
case "templates":
791791
requestParams.type = "template";
792+
requestParams.accessRights = "non-public";
792793
break;
793794
case "public":
794795
requestParams.type = "template";
796+
requestParams.accessRights = "public";
795797
break;
796798
case "search": {
797799
// Use the ``search`` functionality only if the user types some text

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ qx.Class.define("osparc.dashboard.TutorialBrowser", {
6666

6767
__tutorialStateReceived: function(templateId, state, errors) {
6868
osparc.store.Templates.getTutorials()
69-
// OM
69+
// OM follow here
7070
const idx = this._resourcesList.findIndex(study => study["uuid"] === templateId);
7171
if (idx > -1) {
7272
this._resourcesList[idx]["state"] = state;
@@ -85,7 +85,7 @@ qx.Class.define("osparc.dashboard.TutorialBrowser", {
8585

8686
if (useCache) {
8787
osparc.store.Templates.getTutorials()
88-
.then(templates => this.__setResourcesToList(templates));
88+
.then(tutorials => this.__setResourcesToList(tutorials));
8989
} else {
9090
osparc.store.Templates.getTutorials(useCache)
9191
.then(templates => this.__setResourcesToList(templates))
@@ -103,8 +103,9 @@ qx.Class.define("osparc.dashboard.TutorialBrowser", {
103103
}
104104
},
105105

106-
__setResourcesToList: function(templatesList) {
107-
templatesList.forEach(template => template["resourceType"] = "template");
106+
__setResourcesToList: function(tutorialsList) {
107+
tutorialsList.forEach(tutorial => tutorial["resourceType"] = "template");
108+
this._resourcesList = tutorialsList;
108109
this._reloadCards();
109110
},
110111

0 commit comments

Comments
 (0)