@pxp-nd/flow 1.0.93 → 1.0.95

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,6 +17,7 @@
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
+ * 07-Feb-2025 8353064698 Mercedes Zambrana Add validation for opt in page when flow si funnel change
20
21
  * ******************************************************************************
21
22
  */
22
23
  import { EntityManager } from 'typeorm';
@@ -18,6 +18,7 @@
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
+ * 07-Feb-2025 8353064698 Mercedes Zambrana Add validation for opt in page when flow si funnel change
21
22
  * ******************************************************************************
22
23
  */
23
24
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
@@ -217,14 +218,11 @@ let Flow = class Flow extends core_1.Controller {
217
218
  let flowDataClone;
218
219
  //if we have a vendoId as parameter the origin is a template
219
220
  if (params.vendorId) {
220
- console.log("con vendor:", flowToClone);
221
221
  flowDataClone = await manager.save(Flow_1.default, { ...flowToClone, name: `${params.name}`, vendorId: params.vendorId, type: 'custom' });
222
222
  }
223
223
  else {
224
- console.log("sin vendore:", flowToClone);
225
224
  flowDataClone = await manager.save(Flow_1.default, { ...flowToClone, name: `${flowData.name} Copy` });
226
225
  }
227
- console.log("el clonado:::", flowDataClone);
228
226
  const dataNode = await Node_1.default.findOne({ where: { flowId: params.flowId, isInit: 'Y', isActive: true }, order: { nodeId: "ASC" } });
229
227
  dataNode && await this.copyNode(dataNode, flowDataClone.flowId, manager, true);
230
228
  return { success: true, flowId: flowDataClone.flowId };
@@ -399,13 +397,12 @@ let Flow = class Flow extends core_1.Controller {
399
397
  else {
400
398
  const oName = (_a = totalNodes === null || totalNodes === void 0 ? void 0 : totalNodes.action) === null || _a === void 0 ? void 0 : _a.originName;
401
399
  if (flow.templateType == 'funnel') {
402
- cond = `and (at.name ='PAGE') and (a.originName is null or a.originName = '${oName}')`;
400
+ cond = `and (at.name ='PAGE' || at.name = 'CHAINED FLOW') and (a.originName is null or a.originName = '${oName}')`;
403
401
  }
404
402
  else {
405
- cond = `and (at.name != 'EVENT' and at.name!='PAGE') and (a.originName is null or a.originName = '${oName}')`;
403
+ cond = `and (at.name != 'EVENT' and at.name!='PAGE' and at.name!='CHAINED FLOW') and (a.originName is null or a.originName = '${oName}')`;
406
404
  }
407
405
  }
408
- console.log("condicion es:", cond);
409
406
  let actions = await (0, typeorm_1.getManager)()
410
407
  .createQueryBuilder(Action_1.default, "a")
411
408
  .select([
@@ -419,7 +416,6 @@ let Flow = class Flow extends core_1.Controller {
419
416
  .innerJoin("a.actionType", "at")
420
417
  .where(`a.isActive = 1 and a.hidden = 'N'` + cond)
421
418
  .getMany();
422
- console.log("actions:", actions);
423
419
  const connections = await (0, typeorm_1.getManager)()
424
420
  .createQueryBuilder(NodeConnection_1.default, "nc")
425
421
  .select([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pxp-nd/flow",
3
- "version": "1.0.93",
3
+ "version": "1.0.95",
4
4
  "description": "Workflow module for pxp-nd framework",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",