-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🎨 [Frontend] Enh: Tag management (#6720)
- Loading branch information
Showing
24 changed files
with
427 additions
and
166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
86 changes: 86 additions & 0 deletions
86
services/static-webserver/client/source/class/osparc/data/model/Tag.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
/* ************************************************************************ | ||
osparc - the simcore frontend | ||
https://osparc.io | ||
Copyright: | ||
2024 IT'IS Foundation, https://itis.swiss | ||
License: | ||
MIT: https://opensource.org/licenses/MIT | ||
Authors: | ||
* Odei Maiz (odeimaiz) | ||
************************************************************************ */ | ||
|
||
/** | ||
* Class that stores Tag data. | ||
*/ | ||
|
||
qx.Class.define("osparc.data.model.Tag", { | ||
extend: qx.core.Object, | ||
|
||
/** | ||
* @param tagData {Object} Object containing the serialized Tag Data | ||
*/ | ||
construct: function(tagData) { | ||
this.base(arguments); | ||
|
||
this.set({ | ||
tagId: tagData.id, | ||
name: tagData.name, | ||
description: tagData.description, | ||
color: tagData.color, | ||
accessRights: tagData.accessRights, | ||
}); | ||
}, | ||
|
||
properties: { | ||
tagId: { | ||
check: "Number", | ||
nullable: true, | ||
init: null, | ||
event: "changeTagId" | ||
}, | ||
|
||
name: { | ||
check: "String", | ||
nullable: false, | ||
init: null, | ||
event: "changeName" | ||
}, | ||
|
||
description: { | ||
check: "String", | ||
nullable: true, | ||
init: null, | ||
event: "changeDescription" | ||
}, | ||
|
||
color: { | ||
check: "Color", | ||
event: "changeColor", | ||
init: "#303030" | ||
}, | ||
|
||
accessRights: { | ||
check: "Object", | ||
nullable: false, | ||
init: null, | ||
event: "changeAccessRights" | ||
}, | ||
}, | ||
|
||
members: { | ||
serialize: function() { | ||
const jsonObject = {}; | ||
const propertyKeys = this.self().getProperties(); | ||
propertyKeys.forEach(key => { | ||
jsonObject[key] = this.get(key); | ||
}); | ||
return jsonObject; | ||
} | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.