@pxp-nd/flow 1.0.82 → 1.0.84
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.
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
* 01-Sep-2023 SP08SEP23 Rensi Arteaga add base flow list
|
|
18
18
|
* 16-Sep-2023 SP22SEP23 Mercedes Zambrana Change GET to POST in insertEventFlow
|
|
19
19
|
* 28-Sep-2023 SP06OCT23 Mercedes Zambrana Add Validation when change off status (validateFlow, deleteflow, saveFlow, saveflowName)
|
|
20
|
-
* 20-Feb-2024 SP01MAR24 Mercedes Zambrana Add in getFlowRender, insertEventFlow condition for at.name=PAGE
|
|
21
20
|
* ******************************************************************************
|
|
22
21
|
*/
|
|
23
22
|
import { EntityManager } from 'typeorm';
|
package/dist/controllers/Flow.js
CHANGED
|
@@ -18,7 +18,6 @@
|
|
|
18
18
|
* 01-Sep-2023 SP08SEP23 Rensi Arteaga add base flow list
|
|
19
19
|
* 16-Sep-2023 SP22SEP23 Mercedes Zambrana Change GET to POST in insertEventFlow
|
|
20
20
|
* 28-Sep-2023 SP06OCT23 Mercedes Zambrana Add Validation when change off status (validateFlow, deleteflow, saveFlow, saveflowName)
|
|
21
|
-
* 20-Feb-2024 SP01MAR24 Mercedes Zambrana Add in getFlowRender, insertEventFlow condition for at.name=PAGE
|
|
22
21
|
* ******************************************************************************
|
|
23
22
|
*/
|
|
24
23
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
@@ -107,7 +106,6 @@ let Flow = class Flow extends core_1.Controller {
|
|
|
107
106
|
// insert new node
|
|
108
107
|
const newNode = new Node_1.default();
|
|
109
108
|
const { nodeId, flowId, createdAt, modifiedAt, ...nodeToCopy } = node;
|
|
110
|
-
//for each node, get schema_json from action_type. So, if has templateId check in configGetDescValue the parameter storeId
|
|
111
109
|
Object.assign(newNode, { ...nodeToCopy, flowId: newFlowId });
|
|
112
110
|
const insertNewNode = await (0, core_1.__)(manager.save(Node_1.default, newNode));
|
|
113
111
|
if (isFirst) {
|
|
@@ -368,37 +366,25 @@ let Flow = class Flow extends core_1.Controller {
|
|
|
368
366
|
return { success: true, nodeId: newId };
|
|
369
367
|
}
|
|
370
368
|
async getFlowRender(params) {
|
|
371
|
-
var _a
|
|
369
|
+
var _a;
|
|
372
370
|
const flow = await (0, typeorm_1.getManager)().findOne(Flow_1.default, params.flowId);
|
|
373
371
|
const totalNodes = await (0, typeorm_1.getManager)()
|
|
374
372
|
.createQueryBuilder(Node_1.default, "n")
|
|
375
373
|
.select([
|
|
376
374
|
"n.nodeId",
|
|
377
|
-
"a.originName"
|
|
378
|
-
"a.actionId"
|
|
375
|
+
"a.originName"
|
|
379
376
|
])
|
|
380
377
|
.innerJoin("n.action", "a")
|
|
381
378
|
.where(`n.isActive = 1 and n.flowId = :flowId`, { flowId: params.flowId })
|
|
382
379
|
.getOne();
|
|
383
380
|
let cond = " and 0=0";
|
|
384
381
|
if (!totalNodes) {
|
|
385
|
-
cond = " and
|
|
382
|
+
cond = " and at.name= 'EVENT' ";
|
|
386
383
|
}
|
|
387
384
|
else {
|
|
388
385
|
const oName = (_a = totalNodes === null || totalNodes === void 0 ? void 0 : totalNodes.action) === null || _a === void 0 ? void 0 : _a.originName;
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
select at.name
|
|
392
|
-
from twf_action a
|
|
393
|
-
inner join twf_action_type at on at.action_type_id = a.action_type_id
|
|
394
|
-
where a.action_id = ${(_c = totalNodes === null || totalNodes === void 0 ? void 0 : totalNodes.action) === null || _c === void 0 ? void 0 : _c.actionId}
|
|
395
|
-
`);
|
|
396
|
-
if (actionTypePage[0].name == 'PAGE') {
|
|
397
|
-
cond = `and a.code = 'BRIDGE' and at.name='PAGE'`;
|
|
398
|
-
}
|
|
399
|
-
else {
|
|
400
|
-
cond = `and (at.name not in ('EVENT','PAGE')) and (a.originName is null or a.originName = '${oName}') `;
|
|
401
|
-
}
|
|
386
|
+
//
|
|
387
|
+
cond = `and at.name != 'EVENT' and (a.originName is null or a.originName = '${oName}')`;
|
|
402
388
|
}
|
|
403
389
|
let actions = await (0, typeorm_1.getManager)()
|
|
404
390
|
.createQueryBuilder(Action_1.default, "a")
|
|
@@ -514,7 +500,7 @@ let Flow = class Flow extends core_1.Controller {
|
|
|
514
500
|
"a.actionId"
|
|
515
501
|
])
|
|
516
502
|
.innerJoin("a.actionType", "at")
|
|
517
|
-
.where(`a.isActive = 1 and a.hidden = 'N' and at.name
|
|
503
|
+
.where(`a.isActive = 1 and a.hidden = 'N' and at.name = 'EVENT' and at.isActive = 1 `, { actionId: params.actionId })
|
|
518
504
|
.getMany();
|
|
519
505
|
if (action) {
|
|
520
506
|
const newNode = manager.create(Node_1.default, {
|
package/dist/controllers/Node.js
CHANGED
|
@@ -223,6 +223,9 @@ let Node = class Node extends core_1.Controller {
|
|
|
223
223
|
...(descValue && { descValue: descValue }),
|
|
224
224
|
...(verifyIfValueFromFieldMap(value) && { fromFieldMap: true, ...findFieldMapAndMetaData(value) }),
|
|
225
225
|
};
|
|
226
|
+
if (schemaJsonObject[nameKey].hidden === true) {
|
|
227
|
+
schemaJsonObject[nameKey].initialValue = value;
|
|
228
|
+
}
|
|
226
229
|
}
|
|
227
230
|
}
|
|
228
231
|
//console.log('111 schemaJsonObject',schemaJsonObject)
|
package/dist/entity/Flow.d.ts
CHANGED
package/dist/entity/Flow.js
CHANGED
|
@@ -23,7 +23,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
23
23
|
* Date Change ID Author Description
|
|
24
24
|
* ----------- ----------- -------------- ------------------------------------
|
|
25
25
|
* 04-Sep-2023 SP08SEP23 Rensi Arteaga add modified at and by
|
|
26
|
-
* 19-Feb-2024 SP01MAR24 Mercedes Zambrana add template_type
|
|
27
26
|
*****************************************************************************/
|
|
28
27
|
const typeorm_1 = require("typeorm");
|
|
29
28
|
const FlowInstance_1 = __importDefault(require("./FlowInstance"));
|
|
@@ -83,10 +82,6 @@ __decorate([
|
|
|
83
82
|
(0, typeorm_1.Column)({ name: 'modified_by', type: 'varchar', length: 500 }),
|
|
84
83
|
__metadata("design:type", String)
|
|
85
84
|
], Flow.prototype, "modifiedBy", void 0);
|
|
86
|
-
__decorate([
|
|
87
|
-
(0, typeorm_1.Column)({ name: 'template_type', type: 'varchar', nullable: false, length: 15 }),
|
|
88
|
-
__metadata("design:type", String)
|
|
89
|
-
], Flow.prototype, "templateType", void 0);
|
|
90
85
|
Flow = __decorate([
|
|
91
86
|
(0, typeorm_1.Entity)({ name: 'twf_flow' })
|
|
92
87
|
], Flow);
|