@pxp-nd/flow 1.1.10 → 1.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/controllers/Flow.js
CHANGED
|
@@ -101,7 +101,7 @@ let Flow = class Flow extends core_1.Controller {
|
|
|
101
101
|
const { nodeConnectionId, nodeIdMaster, nodeIdChild, createdAt, modifiedAt, ...nodeConnectionToCopy } = connection;
|
|
102
102
|
// get node from nodeIdChild
|
|
103
103
|
const dataNodeChild = await Node_1.default.findOne({ nodeId: connection.nodeIdChild });
|
|
104
|
-
const { nodeId: newNodeIdChild } = await this.copyNode(dataNodeChild, newFlowId, manager, isCopy);
|
|
104
|
+
const { nodeId: newNodeIdChild } = await this.copyNode(dataNodeChild, newFlowId, manager, false, isCopy);
|
|
105
105
|
Object.assign(newNodeConnection, { ...nodeConnectionToCopy, nodeIdMaster: newNodeId, nodeIdChild: newNodeIdChild });
|
|
106
106
|
const insertNewNodeConnection = await (0, core_1.__)(manager.save(NodeConnection_1.default, newNodeConnection));
|
|
107
107
|
}
|
|
@@ -254,10 +254,10 @@ let Flow = class Flow extends core_1.Controller {
|
|
|
254
254
|
let isCopy = false;
|
|
255
255
|
//if we have a vendoId as parameter the origin is a template
|
|
256
256
|
if (params.vendorId) {
|
|
257
|
-
flowDataClone = await
|
|
257
|
+
flowDataClone = await (0, typeorm_1.getManager)().save(Flow_1.default, { ...flowToClone, name: `${params.name}`, vendorId: params.vendorId, type: 'custom' });
|
|
258
258
|
}
|
|
259
259
|
else {
|
|
260
|
-
flowDataClone = await
|
|
260
|
+
flowDataClone = await (0, typeorm_1.getManager)().save(Flow_1.default, { ...flowToClone, name: `${flowData.name} Copy` });
|
|
261
261
|
isCopy = true;
|
|
262
262
|
}
|
|
263
263
|
const dataNode = await Node_1.default.findOne({ where: { flowId: params.flowId, isInit: 'Y', isActive: true }, order: { nodeId: "ASC" } });
|
|
@@ -73,6 +73,10 @@ __decorate([
|
|
|
73
73
|
(0, typeorm_1.Column)({ name: 'actions_json', type: 'text' }),
|
|
74
74
|
__metadata("design:type", String)
|
|
75
75
|
], ActionType.prototype, "actionsJson", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, typeorm_1.Column)({ name: 'on_duplicate', type: 'varchar' }),
|
|
78
|
+
__metadata("design:type", String)
|
|
79
|
+
], ActionType.prototype, "onDuplicate", void 0);
|
|
76
80
|
__decorate([
|
|
77
81
|
(0, typeorm_1.Column)({ name: 'validation_controller', type: 'text' }),
|
|
78
82
|
__metadata("design:type", String)
|