@pxp-nd/flow 1.0.90 → 1.0.92
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 +12 -2
- package/dist/entity/Flow.d.ts +1 -1
- package/dist/entity/Flow.js +3 -2
- package/package.json +1 -1
package/dist/controllers/Flow.js
CHANGED
|
@@ -187,6 +187,12 @@ let Flow = class Flow extends core_1.Controller {
|
|
|
187
187
|
if (dataFlow.status == 'on') {
|
|
188
188
|
throw new core_1.PxpError(400, 'Your flow is on. It is not possible to change the name');
|
|
189
189
|
}
|
|
190
|
+
if (dataFlow.type == 'template') {
|
|
191
|
+
dataFlow.code = params.code;
|
|
192
|
+
dataFlow.description = params.description;
|
|
193
|
+
dataFlow.icon = params.icon;
|
|
194
|
+
dataFlow.flowType = params.flowType;
|
|
195
|
+
}
|
|
190
196
|
dataFlow.name = params.name;
|
|
191
197
|
dataFlow.modifiedAt = new Date();
|
|
192
198
|
dataFlow.modifiedBy = this.user.username;
|
|
@@ -384,8 +390,12 @@ let Flow = class Flow extends core_1.Controller {
|
|
|
384
390
|
}
|
|
385
391
|
else {
|
|
386
392
|
const oName = (_a = totalNodes === null || totalNodes === void 0 ? void 0 : totalNodes.action) === null || _a === void 0 ? void 0 : _a.originName;
|
|
387
|
-
|
|
388
|
-
|
|
393
|
+
if (flow.templateType == 'funnel') {
|
|
394
|
+
cond = `and (at.name ='PAGE') and (a.originName is null or a.originName = '${oName}')`;
|
|
395
|
+
}
|
|
396
|
+
else {
|
|
397
|
+
cond = `and (at.name != 'EVENT' and at.name!='PAGE') and (a.originName is null or a.originName = '${oName}')`;
|
|
398
|
+
}
|
|
389
399
|
}
|
|
390
400
|
let actions = await (0, typeorm_1.getManager)()
|
|
391
401
|
.createQueryBuilder(Action_1.default, "a")
|
package/dist/entity/Flow.d.ts
CHANGED
package/dist/entity/Flow.js
CHANGED
|
@@ -24,6 +24,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
24
24
|
* ----------- ----------- -------------- ------------------------------------
|
|
25
25
|
* 04-Sep-2023 SP08SEP23 Rensi Arteaga add modified at and by
|
|
26
26
|
* 06-Dec-2024 8001237262 Mercedes Zambrana add flow_type
|
|
27
|
+
* 31-Jan-2025 8035304698 Mercedes Zambrana Change code to string
|
|
27
28
|
****************************************************************************/
|
|
28
29
|
const typeorm_1 = require("typeorm");
|
|
29
30
|
const FlowInstance_1 = __importDefault(require("./FlowInstance"));
|
|
@@ -40,8 +41,8 @@ __decorate([
|
|
|
40
41
|
__metadata("design:type", Number)
|
|
41
42
|
], Flow.prototype, "vendorId", void 0);
|
|
42
43
|
__decorate([
|
|
43
|
-
(0, typeorm_1.Column)({ type: '
|
|
44
|
-
__metadata("design:type",
|
|
44
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: false, length: 20 }),
|
|
45
|
+
__metadata("design:type", String)
|
|
45
46
|
], Flow.prototype, "code", void 0);
|
|
46
47
|
__decorate([
|
|
47
48
|
(0, typeorm_1.Column)({ type: 'varchar', nullable: false, length: 100 }),
|