diff --git a/Projects/Governance/Schemas/App-Schema/asset-vote.json b/Projects/Governance/Schemas/App-Schema/asset-vote.json new file mode 100644 index 000000000..b6c4275ca --- /dev/null +++ b/Projects/Governance/Schemas/App-Schema/asset-vote.json @@ -0,0 +1,43 @@ +{ + "type": "Asset Vote", + "menuItems": [ + { + "action": "Configure", + "actionFunction": "uiObject.configEditor.activate", + "label": "Configure", + "iconPathOn": "configuration", + "iconPathOff": "configuration" + }, + { + "action": "Delete UI Object", + "askConfirmation": true, + "confirmationLabel": "Confirm to Delete", + "label": "Delete", + "iconPathOn": "delete-entity", + "iconPathOff": "delete-entity", + "actionFunction": "payload.executeAction" + } + ], + "title": [ + "Use Reference Parent Parent Parent Parent", + "Use Reference Parent Parent Parent", + "Use Reference Parent Parent", + "Use Reference Parent" + ], + "editors": { + "config": true + }, + "initialValues": { + "config": "{\n \"description\": \"\"\n}" + }, + "addLeftIcons": true, + "level": 2, + "attachingRules": { + "compatibleTypes": "->Civic Contributions->" + }, + "referencingRules": { + "compatibleTypes": "->Asset Class->Asset->" + }, + "propertyNameAtParent": "assetVotes", + "icon": "EN" +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/project-asset.json b/Projects/Governance/Schemas/App-Schema/asset.json similarity index 100% rename from Projects/Governance/Schemas/App-Schema/project-asset.json rename to Projects/Governance/Schemas/App-Schema/asset.json diff --git a/Projects/Governance/Schemas/App-Schema/assets-structure.json b/Projects/Governance/Schemas/App-Schema/assets.json similarity index 100% rename from Projects/Governance/Schemas/App-Schema/assets-structure.json rename to Projects/Governance/Schemas/App-Schema/assets.json diff --git a/Projects/Governance/Schemas/App-Schema/civic-contributions.json b/Projects/Governance/Schemas/App-Schema/civic-contributions.json index e20684084..08a52826c 100644 --- a/Projects/Governance/Schemas/App-Schema/civic-contributions.json +++ b/Projects/Governance/Schemas/App-Schema/civic-contributions.json @@ -17,8 +17,26 @@ { "action": "Add UI Object", "actionFunction": "payload.executeAction", - "label": "Add Contributed Vote", - "relatedUiObject": "Contributed Vote" + "label": "Add Ranking Vote", + "relatedUiObject": "Ranking Vote" + }, + { + "action": "Add UI Object", + "actionFunction": "payload.executeAction", + "label": "Add Asset Vote", + "relatedUiObject": "Asset Vote" + }, + { + "action": "Add UI Object", + "actionFunction": "payload.executeAction", + "label": "Add Feature Vote", + "relatedUiObject": "Feature Vote" + }, + { + "action": "Add UI Object", + "actionFunction": "payload.executeAction", + "label": "Add User Vote", + "relatedUiObject": "User Vote" }, { "action": "Delete UI Object", @@ -50,9 +68,27 @@ "autoAdd": false }, { - "name": "contributedVotes", + "name": "assetVotes", "type": "array", - "childType": "Contributed Vote", + "childType": "Asset Vote", + "autoAdd": false + }, + { + "name": "featureVotes", + "type": "array", + "childType": "Feature Vote", + "autoAdd": false + }, + { + "name": "rankingVotes", + "type": "array", + "childType": "Ranking Vote", + "autoAdd": false + }, + { + "name": "userVotes", + "type": "array", + "childType": "User Vote", "autoAdd": false } ], diff --git a/Projects/Governance/Schemas/App-Schema/feature-vote.json b/Projects/Governance/Schemas/App-Schema/feature-vote.json new file mode 100644 index 000000000..229e1a393 --- /dev/null +++ b/Projects/Governance/Schemas/App-Schema/feature-vote.json @@ -0,0 +1,41 @@ +{ + "type": "Feature Vote", + "menuItems": [ + { + "action": "Configure", + "actionFunction": "uiObject.configEditor.activate", + "label": "Configure", + "iconPathOn": "configuration", + "iconPathOff": "configuration" + }, + { + "action": "Delete UI Object", + "askConfirmation": true, + "confirmationLabel": "Confirm to Delete", + "label": "Delete", + "iconPathOn": "delete-entity", + "iconPathOff": "delete-entity", + "actionFunction": "payload.executeAction" + } + ], + "title": [ + "Use Reference Parent Parent", + "Use Reference Parent" + ], + "editors": { + "config": true + }, + "initialValues": { + "config": "{\n \"description\": \"\"\n}" + }, + "addLeftIcons": true, + "level": 2, + "attachingRules": { + "compatibleTypes": "->Civic Contributions->" + }, + "referencingRules": { + "compatibleTypes": "->Contributed Time->Governance Contributions->" + }, + "propertyNameAtParent": "featureVotes", + "icon": "ethereum" +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/features-structure.json b/Projects/Governance/Schemas/App-Schema/features.json similarity index 91% rename from Projects/Governance/Schemas/App-Schema/features-structure.json rename to Projects/Governance/Schemas/App-Schema/features.json index 072cbca25..cb950f3c9 100644 --- a/Projects/Governance/Schemas/App-Schema/features-structure.json +++ b/Projects/Governance/Schemas/App-Schema/features.json @@ -1,5 +1,5 @@ { - "type": "Features Structure", + "type": "Features", "menuItems": [ { "action": "Add UI Object", @@ -22,7 +22,6 @@ "attachingRules": { "compatibleTypes": "->Superalgos Release->" }, - "propertyNameAtParent": "featuresStructure", "childrenNodesProperties": [ { "name": "projectFeatures", diff --git a/Projects/Governance/Schemas/App-Schema/governance-project.json b/Projects/Governance/Schemas/App-Schema/governance-project.json index 8e259b680..ce70075a6 100644 --- a/Projects/Governance/Schemas/App-Schema/governance-project.json +++ b/Projects/Governance/Schemas/App-Schema/governance-project.json @@ -7,6 +7,12 @@ "relatedUiObject": "Assets", "actionFunction": "payload.executeAction" }, + { + "action": "Add UI Object", + "label": "Add Features", + "relatedUiObject": "Features", + "actionFunction": "payload.executeAction" + }, { "action": "Add UI Object", "label": "Add Ranking", diff --git a/Projects/Governance/Schemas/App-Schema/project-feature.json b/Projects/Governance/Schemas/App-Schema/project-feature.json index ac7427c64..366ac34be 100644 --- a/Projects/Governance/Schemas/App-Schema/project-feature.json +++ b/Projects/Governance/Schemas/App-Schema/project-feature.json @@ -33,7 +33,7 @@ "addLeftIcons": true, "level": 2, "attachingRules": { - "compatibleTypes": "->Features Structure->Project Feature->" + "compatibleTypes": "->Features->Project Feature->" }, "propertyNameAtParent": "projectFeatures", "childrenNodesProperties": [ diff --git a/Projects/Governance/Schemas/App-Schema/project-rank.json b/Projects/Governance/Schemas/App-Schema/ranking-position.json similarity index 100% rename from Projects/Governance/Schemas/App-Schema/project-rank.json rename to Projects/Governance/Schemas/App-Schema/ranking-position.json diff --git a/Projects/Governance/Schemas/App-Schema/ranking-vote.json b/Projects/Governance/Schemas/App-Schema/ranking-vote.json new file mode 100644 index 000000000..079065718 --- /dev/null +++ b/Projects/Governance/Schemas/App-Schema/ranking-vote.json @@ -0,0 +1,41 @@ +{ + "type": "Ranking Vote", + "menuItems": [ + { + "action": "Configure", + "actionFunction": "uiObject.configEditor.activate", + "label": "Configure", + "iconPathOn": "configuration", + "iconPathOff": "configuration" + }, + { + "action": "Delete UI Object", + "askConfirmation": true, + "confirmationLabel": "Confirm to Delete", + "label": "Delete", + "iconPathOn": "delete-entity", + "iconPathOff": "delete-entity", + "actionFunction": "payload.executeAction" + } + ], + "title": [ + "Use Reference Parent Parent", + "Use Reference Parent" + ], + "editors": { + "config": true + }, + "initialValues": { + "config": "{\n \"description\": \"\"\n}" + }, + "addLeftIcons": true, + "level": 2, + "attachingRules": { + "compatibleTypes": "->Civic Contributions->" + }, + "referencingRules": { + "compatibleTypes": "->Team->Ranking Position->" + }, + "propertyNameAtParent": "rankingVotes", + "icon": "bitfinex" +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/contributed-vote.json b/Projects/Governance/Schemas/App-Schema/user-vote.json similarity index 91% rename from Projects/Governance/Schemas/App-Schema/contributed-vote.json rename to Projects/Governance/Schemas/App-Schema/user-vote.json index 7493466a7..9c86fb0e0 100644 --- a/Projects/Governance/Schemas/App-Schema/contributed-vote.json +++ b/Projects/Governance/Schemas/App-Schema/user-vote.json @@ -1,5 +1,5 @@ { - "type": "Contributed Vote", + "type": "User Vote", "menuItems": [ { "action": "Configure", @@ -36,6 +36,6 @@ "referencingRules": { "compatibleTypes": "->Contributed Time->Governance Contributions->" }, - "propertyNameAtParent": "contributedVotes", - "icon": "ethereum" + "propertyNameAtParent": "userVotes", + "icon": "dogecoin" } \ No newline at end of file diff --git a/Projects/Superalgos/UI/Spaces/Floating-Space/UiObjectTitle.js b/Projects/Superalgos/UI/Spaces/Floating-Space/UiObjectTitle.js index de9dff365..5c3b91cda 100644 --- a/Projects/Superalgos/UI/Spaces/Floating-Space/UiObjectTitle.js +++ b/Projects/Superalgos/UI/Spaces/Floating-Space/UiObjectTitle.js @@ -164,6 +164,23 @@ function newUiObjectTitle() { } break } + case 'Use Reference Parent Parent Parent Parent': { + let nodeToUse = thisObject.payload.node.payload.referenceParent + if (nodeToUse !== undefined && nodeToUse.payload !== undefined && nodeToUse.payload.node.name !== "New " + nodeToUse.payload.node.type && nodeToUse.payload.node.name !== "My " + nodeToUse.payload.node.type) { + nodeToUse = thisObject.payload.node.payload.referenceParent.payload.parentNode + if (nodeToUse !== undefined && nodeToUse.payload !== undefined && nodeToUse.payload.node.name !== "New " + nodeToUse.payload.node.type && nodeToUse.payload.node.name !== "My " + nodeToUse.payload.node.type) { + nodeToUse = thisObject.payload.node.payload.referenceParent.payload.parentNode.payload.parentNode + if (nodeToUse !== undefined && nodeToUse.payload !== undefined && nodeToUse.payload.node.name !== "New " + nodeToUse.payload.node.type && nodeToUse.payload.node.name !== "My " + nodeToUse.payload.node.type) { + nodeToUse = thisObject.payload.node.payload.referenceParent.payload.parentNode.payload.parentNode.payload.parentNode + if (nodeToUse !== undefined && nodeToUse.payload !== undefined && nodeToUse.payload.node.name !== "New " + nodeToUse.payload.node.type && nodeToUse.payload.node.name !== "My " + nodeToUse.payload.node.type) { + thisObject.payload.title = thisObject.payload.title + separator + nodeToUse.payload.title + thisObject.payload.node.name = thisObject.payload.node.name + separator + nodeToUse.payload.node.name + } + } + } + } + break + } default: { if (titleReference.indexOf('Use Child @') === 0) { let propertyName = titleReference.substring(titleReference.indexOf('@') + 1, titleReference.length)