summaryrefslogtreecommitdiffstats
path: root/cds-ui/designer-client
diff options
context:
space:
mode:
authorEltanany Shaaban <shaaban.eltanany.ext@orange.com>2021-01-13 11:29:44 +0200
committerEltanany Shaaban <shaaban.eltanany.ext@orange.com>2021-01-13 11:29:44 +0200
commit462f304e905e48ef068ddd0e23f9253568c4012c (patch)
tree739cc6cbd39897e42325cf9f7faf8abb9b0c7fc9 /cds-ui/designer-client
parentbb91b6eedec5d15ec4d9e473f27dd63592762cf9 (diff)
fixing bugs import inputs and outputs from functions into actions
Issue-ID: CCSDK-2779 Issue-ID: CCSDK-3025 Signed-off-by: Eltanany Shaaban <shaaban.eltanany.ext@orange.com> Change-Id: Ic70fc13f782ef9594bfa2ce3e21c1d17ce4001c6
Diffstat (limited to 'cds-ui/designer-client')
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.ts17
1 files changed, 5 insertions, 12 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.ts
index 15f2ce456..6873f8948 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.ts
@@ -120,7 +120,9 @@ export class ActionAttributesComponent implements OnInit {
console.log(input);
if (input && input.type && input.name) {
const insertedInputActionAttribute = Object.assign({}, input);
- this.newInputs.push(insertedInputActionAttribute);
+ if (!this.newInputs.includes(insertedInputActionAttribute)) {
+ this.newInputs.push(insertedInputActionAttribute);
+ }
}
}
@@ -166,7 +168,7 @@ export class ActionAttributesComponent implements OnInit {
this.storeOutputs(this.newOutputs);
this.storeInputs((this.newInputs));
this.newInputs.forEach(input => {
- if (!this.inputs.includes(input)) {
+ if (!this.inputs.includes(input.name)) {
this.inputs.push(input);
}
});
@@ -392,16 +394,7 @@ export class ActionAttributesComponent implements OnInit {
this.convertToObject(originalAttributes.substr(0, originalAttributes.length - 1)
+ newAttributes + '}');
}
- const action = this.designerState.template.workflows[this.actionName] as Action;
- this.inputs = [];
- if (action.inputs) {
- const namesOfInput = Object.keys(action.inputs);
- this.inputs = this.extractFields(namesOfInput, action.inputs);
- }
- /* console.log(originalAttributes.substr(0, originalAttributes.length - 1) + ',' + newAttributes + '}');
- this.designerState.template.workflows[this.actionName][attributeType] =
- this.convertToObject(originalAttributes.substr(0, originalAttributes.length - 1)
- + ',' + newAttributes + '}');*/
+
}
private removeTheLastComma(newInputs: string): string {