From 6a17f4e8696b3a6a3dc565744844c3ebcb459ee0 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Wed, 25 Nov 2020 08:09:23 +0100 Subject: [PATCH] Bifurcation of project at network level --- Projects/Ethereum/Schemas/AppSchema.json | 180 ++++++++++++++++++ .../DataStorageFunctions.js | 2 +- .../Function-Libraries/TaskFunctions.js | 2 +- 3 files changed, 182 insertions(+), 2 deletions(-) diff --git a/Projects/Ethereum/Schemas/AppSchema.json b/Projects/Ethereum/Schemas/AppSchema.json index bab02a56b..0d22c23d7 100644 --- a/Projects/Ethereum/Schemas/AppSchema.json +++ b/Projects/Ethereum/Schemas/AppSchema.json @@ -695,5 +695,185 @@ "addLeftIcons": true, "level": 2, "icon": "ethereum" + }, + { + "type": "Project Data Tasks", + "menuItems": [ + { + "action": "Delete UI Object", + "askConfirmation": true, + "confirmationLabel": "Confirm to Delete", + "label": "Delete", + "iconPathOn": "delete", + "iconPathOff": "delete", + "actionFunction": "payload.executeAction" + } + ], + "title": [ + "Use Reference Parent" + ], + "alternativeIcons": "Use Reference Parent Parent", + "addLeftIcons": true, + "level": 2, + "referenceAttachesTo": { + "compatibleTypes": "->Project Definition->" + }, + "chainAttachesTo": { + "compatibleTypes": "->Data Tasks->" + }, + "propertyNameAtParent": "projectDataTasks", + "properties": [ + ], + "icon": "bitcoin" + }, + { + "type": "Project Learning Tasks", + "menuItems": [ + { + "action": "Delete UI Object", + "askConfirmation": true, + "confirmationLabel": "Confirm to Delete", + "label": "Delete", + "iconPathOn": "delete", + "iconPathOff": "delete", + "actionFunction": "payload.executeAction" + } + ], + "title": [ + "Use Reference Parent" + ], + "alternativeIcons": "Use Reference Parent Parent", + "addLeftIcons": true, + "level": 2, + "referenceAttachesTo": { + "compatibleTypes": "->Project Definition->" + }, + "chainAttachesTo": { + "compatibleTypes": "->Learning Tasks->" + }, + "propertyNameAtParent": "projectLearningTasks", + "properties": [ + ], + "icon": "bitcoin" + }, + { + "type": "Project Trading Tasks", + "menuItems": [ + { + "action": "Delete UI Object", + "askConfirmation": true, + "confirmationLabel": "Confirm to Delete", + "label": "Delete", + "iconPathOn": "delete", + "iconPathOff": "delete", + "actionFunction": "payload.executeAction" + } + ], + "title": [ + "Use Reference Parent" + ], + "alternativeIcons": "Use Reference Parent Parent", + "addLeftIcons": true, + "level": 2, + "referenceAttachesTo": { + "compatibleTypes": "->Project Definition->" + }, + "chainAttachesTo": { + "compatibleTypes": "->Trading Tasks->" + }, + "propertyNameAtParent": "projectTradingTasks", + "properties": [ + ], + "icon": "bitcoin" + }, + { + "type": "Project Data Products", + "menuItems": [ + { + "action": "Delete UI Object", + "askConfirmation": true, + "confirmationLabel": "Confirm to Delete", + "label": "Delete", + "iconPathOn": "delete", + "iconPathOff": "delete", + "actionFunction": "payload.executeAction" + } + ], + "title": [ + "Use Reference Parent" + ], + "alternativeIcons": "Use Reference Parent Parent", + "addLeftIcons": true, + "level": 2, + "referenceAttachesTo": { + "compatibleTypes": "->Project Definition->" + }, + "chainAttachesTo": { + "compatibleTypes": "->Data Mines Data->" + }, + "propertyNameAtParent": "projectDataProducts", + "properties": [ + ], + "icon": "bitcoin" + }, + { + "type": "Project Learning Products", + "menuItems": [ + { + "action": "Delete UI Object", + "askConfirmation": true, + "confirmationLabel": "Confirm to Delete", + "label": "Delete", + "iconPathOn": "delete", + "iconPathOff": "delete", + "actionFunction": "payload.executeAction" + } + ], + "title": [ + "Use Reference Parent" + ], + "alternativeIcons": "Use Reference Parent Parent", + "addLeftIcons": true, + "level": 2, + "referenceAttachesTo": { + "compatibleTypes": "->Project Definition->" + }, + "chainAttachesTo": { + "compatibleTypes": "->Learning Mine Data->" + }, + "propertyNameAtParent": "projectLearningProducts", + "properties": [ + ], + "icon": "bitcoin" + }, + { + "type": "Project Trading Products", + "menuItems": [ + { + "action": "Delete UI Object", + "askConfirmation": true, + "confirmationLabel": "Confirm to Delete", + "label": "Delete", + "iconPathOn": "delete", + "iconPathOff": "delete", + "actionFunction": "payload.executeAction" + } + ], + "title": [ + "Use Reference Parent" + ], + "alternativeIcons": "Use Reference Parent Parent", + "addLeftIcons": true, + "level": 2, + "referenceAttachesTo": { + "compatibleTypes": "->Project Definition->" + }, + "chainAttachesTo": { + "compatibleTypes": "->Trading Mine Data->" + }, + "propertyNameAtParent": "projectTradingProducts", + "properties": [ + ], + "icon": "bitcoin" } ] \ No newline at end of file diff --git a/Projects/Superalgos/Function-Libraries/DataStorageFunctions.js b/Projects/Superalgos/Function-Libraries/DataStorageFunctions.js index f8a73dddf..71e157719 100644 --- a/Projects/Superalgos/Function-Libraries/DataStorageFunctions.js +++ b/Projects/Superalgos/Function-Libraries/DataStorageFunctions.js @@ -236,7 +236,7 @@ function newSuperalgosFunctionLibraryDataStorageFunctions() { let projectDefinition = rootNode.projectDefinition if (projectDefinition !== undefined) { if (UI.projects.superalgos.utilities.children.isMissingChildren(node, projectDefinition, true) === true) { - let projectTasks = UI.projects.superalgos.functionLibraries.uiObjectsFromNodes.addUIObject(node, newNodeType) + let projectTasks = UI.projects.superalgos.functionLibraries.uiObjectsFromNodes.addUIObject(node, newNodeType, undefined, project) projectTasks.payload.referenceParent = projectDefinition } } diff --git a/Projects/Superalgos/Function-Libraries/TaskFunctions.js b/Projects/Superalgos/Function-Libraries/TaskFunctions.js index 31bd7af96..002de3a31 100644 --- a/Projects/Superalgos/Function-Libraries/TaskFunctions.js +++ b/Projects/Superalgos/Function-Libraries/TaskFunctions.js @@ -519,7 +519,7 @@ function newSuperalgosFunctionLibraryTaskFunctions() { let projectDefinition = rootNode.projectDefinition if (projectDefinition !== undefined) { if (UI.projects.superalgos.utilities.children.isMissingChildren(node, projectDefinition, true) === true) { - let projectTasks = UI.projects.superalgos.functionLibraries.uiObjectsFromNodes.addUIObject(node, newNodeType) + let projectTasks = UI.projects.superalgos.functionLibraries.uiObjectsFromNodes.addUIObject(node, newNodeType, undefined, project) projectTasks.payload.referenceParent = projectDefinition } }