Product definition references Plotter module

This commit is contained in:
Luis Fernando Molina committed 2019-12-03 09:46:48 +01:00
1 parent 69918eff2b
commit e1c6eb0ce1
4 files changed
+49

No files matched your search

@@ -1518,6 +1518,9 @@ function newProtocolNode () {
if (includePayload) {
object.savedPayload = getSavedPayload(node, includeReferences)
}
if (followReferenceParent) {
object.referenceParent = getProtocolNode(node.payload.referenceParent, removePersonalData, parseCode, includeIds, includePayload, includeReferences, followReferenceParent, includeParent, followAncestors, excludeChildren, excludeType)
}
return object
}
case 'Record Definition': {
@@ -1616,6 +1619,11 @@ function newProtocolNode () {
code: getProtocolNode(node.code, removePersonalData, parseCode, includeIds, includePayload, includeReferences, followReferenceParent, includeParent, followAncestors, excludeChildren, excludeType),
panels: []
}
if (includeParent) {
followAncestors = true
excludeChildren = true
object.parentNode = getProtocolNode(node.payload.parentNode, removePersonalData, parseCode, includeIds, includePayload, includeReferences, followReferenceParent, includeParent, followAncestors, excludeChildren, excludeType)
}
if (node.panels !== undefined) {
for (let m = 0; m < node.panels.length; m++) {
let panel = getProtocolNode(node.panels[m], removePersonalData, parseCode, includeIds, includePayload, includeReferences, followReferenceParent, includeParent, followAncestors, excludeChildren, excludeType)
@@ -44,6 +44,10 @@ function newReferenceAttachDetach () {
completeDetachment(node)
return
}
case 'Product Definition': {
completeDetachment(node)
return
}
}
}
@@ -85,6 +89,10 @@ function newReferenceAttachDetach () {
completeAttachment(node, attachToNode)
}
break
case 'Product Definition': {
completeAttachment(node, attachToNode)
}
break
}
}
@@ -965,6 +965,15 @@ function newUiObjectsFromNodes () {
return
}
case 'Product Definition': {
let referenceParent
if (mapOfReferenceChildren !== undefined) {
if (node.savedPayload.referenceParent !== undefined) {
if (node.savedPayload.referenceParent.id !== undefined) {
mapOfReferenceChildren.set(node.id, node)
referenceParent = node.savedPayload.referenceParent
}
}
}
createUiObject(false, node.type, node.name, node, parentNode, chainParent, node.type, positionOffset)
if (node.record !== undefined) {
createUiObjectFromNode(node.record, node, node, positionOffset)
@@ -979,6 +988,11 @@ function newUiObjectsFromNodes () {
if (node.dataBuilding !== undefined) {
createUiObjectFromNode(node.dataBuilding, node, node, positionOffset)
}
if (referenceParent !== undefined) {
node.savedPayload = {
referenceParent: referenceParent
}
}
return
}
case 'Record Definition': {
@@ -1024,6 +1038,14 @@ function newUiObjectsFromNodes () {
return
}
case 'Plotter Module': {
let referenceChildren
if (mapOfReferenceParents !== undefined) {
if (node.savedPayload.referenceChildren !== undefined) {
referenceChildren = []
mapOfReferenceParents.set(node.id, node)
referenceChildren = node.savedPayload.referenceChildren
}
}
createUiObject(false, node.type, node.name, node, parentNode, chainParent, node.type, positionOffset)
if (node.code !== undefined) {
createUiObjectFromNode(node.code, node, node, positionOffset)
@@ -1032,6 +1054,13 @@ function newUiObjectsFromNodes () {
let panel = node.panels[m]
createUiObjectFromNode(panel, node, node, positionOffset)
}
if (referenceChildren !== undefined) {
node.savedPayload = {
referenceChildren: referenceChildren
}
} else {
node.referenceChildren = []
}
return
}
case 'Plotter Panel': {
+4
View File
@@ -711,6 +711,10 @@ function newUiObject () {
compatibleType = '->' + 'Process Definition' + '->'
compatibleSubType = undefined
break
case 'Product Definition':
compatibleType = '->' + 'Plotter Module' + '->'
compatibleSubType = undefined
break
default:
return
}