Skip to content

Commit d5dca96

Browse files
authored
πŸŽ¨πŸ› Enh/fix: frontend knows about trashedAt (#6717)
1 parent 0718e14 commit d5dca96

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
lines changed

β€Žservices/static-webserver/client/source/class/osparc/data/model/Folder.jsβ€Ž

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ qx.Class.define("osparc.data.model.Folder", {
3737
owner: folderData.owner,
3838
createdAt: new Date(folderData.createdAt),
3939
lastModified: new Date(folderData.modifiedAt),
40+
trashedAt: folderData.trashedAt ? new Date(folderData.trashedAt) : this.getTrashedAt(),
4041
});
4142
},
4243

@@ -95,7 +96,13 @@ qx.Class.define("osparc.data.model.Folder", {
9596
nullable: true,
9697
init: null,
9798
event: "changeLastModified"
98-
}
99+
},
100+
101+
trashedAt: {
102+
check: "Date",
103+
nullable: true,
104+
init: null,
105+
},
99106
},
100107

101108
statics: {

β€Žservices/static-webserver/client/source/class/osparc/data/model/Study.jsβ€Ž

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ qx.Class.define("osparc.data.model.Study", {
5858
state: studyData.state || this.getState(),
5959
quality: studyData.quality || this.getQuality(),
6060
permalink: studyData.permalink || this.getPermalink(),
61-
dev: studyData.dev || this.getDev()
61+
dev: studyData.dev || this.getDev(),
62+
trashedAt: studyData.trashedAt ? new Date(studyData.trashedAt) : this.getTrashedAt(),
6263
});
6364

6465
const wbData = studyData.workbench || this.getWorkbench();
@@ -209,7 +210,13 @@ qx.Class.define("osparc.data.model.Study", {
209210
nullable: true,
210211
event: "changeReadOnly",
211212
init: true
212-
}
213+
},
214+
215+
trashedAt: {
216+
check: "Date",
217+
nullable: true,
218+
init: null,
219+
},
213220
// ------ ignore for serializing ------
214221
},
215222

@@ -218,7 +225,8 @@ qx.Class.define("osparc.data.model.Study", {
218225
"permalink",
219226
"state",
220227
"pipelineRunning",
221-
"readOnly"
228+
"readOnly",
229+
"trashedAt",
222230
],
223231

224232
IgnoreModelizationProps: [

β€Žservices/static-webserver/client/source/class/osparc/store/Folders.jsβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,8 @@ qx.Class.define("osparc.store.Folders", {
178178
folder.set("createdAt", new Date(folderData["createdAt"]));
179179
} else if (key === "modifiedAt") {
180180
folder.set("lastModified", new Date(folderData["modifiedAt"]));
181+
} else if (key === "trashedAt") {
182+
folder.set("trashedAt", new Date(folderData["trashedAt"]));
181183
} else {
182184
folder.set(key, folderData[key]);
183185
}

0 commit comments

Comments
Β (0)