Skip to content

Commit

Permalink
πŸŽ¨πŸ› Enh/fix: frontend knows about trashedAt (#6717)
Browse files Browse the repository at this point in the history
  • Loading branch information
odeimaiz authored and matusdrobuliak66 committed Nov 13, 2024
1 parent 2af7f21 commit e554ff4
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ qx.Class.define("osparc.data.model.Folder", {
owner: folderData.owner,
createdAt: new Date(folderData.createdAt),
lastModified: new Date(folderData.modifiedAt),
trashedAt: folderData.trashedAt ? new Date(folderData.trashedAt) : this.getTrashedAt(),
});
},

Expand Down Expand Up @@ -95,7 +96,13 @@ qx.Class.define("osparc.data.model.Folder", {
nullable: true,
init: null,
event: "changeLastModified"
}
},

trashedAt: {
check: "Date",
nullable: true,
init: null,
},
},

statics: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ qx.Class.define("osparc.data.model.Study", {
state: studyData.state || this.getState(),
quality: studyData.quality || this.getQuality(),
permalink: studyData.permalink || this.getPermalink(),
dev: studyData.dev || this.getDev()
dev: studyData.dev || this.getDev(),
trashedAt: studyData.trashedAt ? new Date(studyData.trashedAt) : this.getTrashedAt(),
});

const wbData = studyData.workbench || this.getWorkbench();
Expand Down Expand Up @@ -209,7 +210,13 @@ qx.Class.define("osparc.data.model.Study", {
nullable: true,
event: "changeReadOnly",
init: true
}
},

trashedAt: {
check: "Date",
nullable: true,
init: null,
},
// ------ ignore for serializing ------
},

Expand All @@ -218,7 +225,8 @@ qx.Class.define("osparc.data.model.Study", {
"permalink",
"state",
"pipelineRunning",
"readOnly"
"readOnly",
"trashedAt",
],

IgnoreModelizationProps: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ qx.Class.define("osparc.store.Folders", {
folder.set("createdAt", new Date(folderData["createdAt"]));
} else if (key === "modifiedAt") {
folder.set("lastModified", new Date(folderData["modifiedAt"]));
} else if (key === "trashedAt") {
folder.set("trashedAt", new Date(folderData["trashedAt"]));
} else {
folder.set(key, folderData[key]);
}
Expand Down

0 comments on commit e554ff4

Please sign in to comment.