Skip to content

Commit 5fd39ab

Browse files
committed
template_type
1 parent aac0abd commit 5fd39ab

File tree

2 files changed

+12
-3
lines changed
  • packages/models-library/src/models_library/api_schemas_webserver
  • services/static-webserver/client/source/class/osparc/data/model

2 files changed

+12
-3
lines changed

packages/models-library/src/models_library/api_schemas_webserver/projects_ui.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Models Front-end UI
2+
Models Front-end UI
33
"""
44

55
from typing import Annotated, Literal, NotRequired
@@ -87,6 +87,7 @@ class StudyUI(BaseModel):
8787
slideshow: dict[NodeIDStr, SlideshowUI] | None = None
8888
current_node_id: Annotated[NodeID | None, Field(alias="currentNodeId")] = None
8989
annotations: dict[NodeIDStr, AnnotationUI] | None = None
90+
template_type: Annotated[str | None, Field(alias="templateType")] = None
9091

9192
_empty_is_none = field_validator("*", mode="before")(
9293
empty_str_to_none_pre_validator

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ qx.Class.define("osparc.data.model.StudyUI", {
3333
slideshow: new osparc.data.model.Slideshow(studyDataUI && studyDataUI.slideshow ? studyDataUI.slideshow : this.getSlideshow()),
3434
currentNodeId: studyDataUI && studyDataUI.currentNodeId ? studyDataUI.currentNodeId : this.initCurrentNodeId(),
3535
mode: studyDataUI && studyDataUI.mode ? studyDataUI.mode : this.initMode(),
36-
annotations: {}
36+
annotations: {},
37+
templateType: studyDataUI && studyDataUI.templateType ? studyDataUI.templateType : null,
3738
});
3839

3940
if ("annotations" in studyDataUI) {
@@ -74,7 +75,14 @@ qx.Class.define("osparc.data.model.StudyUI", {
7475
check: "Object",
7576
init: {},
7677
nullable: true
77-
}
78+
},
79+
80+
templateType: {
81+
check: "String",
82+
init: null,
83+
nullable: true,
84+
event: "changeTemplateType",
85+
},
7886
},
7987

8088
members: {

0 commit comments

Comments
 (0)