diff options
author | 2020-10-07 10:20:21 +0200 | |
---|---|---|
committer | 2020-10-07 10:20:21 +0200 | |
commit | 0dd225849c1e874219de60b36313000bf17d17d8 (patch) | |
tree | 390550771cac50c5ffde88279017f1377b555ca3 /cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.ts | |
parent | cbd6d18fc892cb00ce4e405c6b4edf2bc0bceee7 (diff) |
divide html components to action and function attributes
Issue-ID: CCSDK-2874
Signed-off-by: ShaabanEltanany <shaaban.eltanany.ext@orange.com>
Change-Id: Ieb428c80a3125909adbad1600861448437b00326
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.ts')
-rw-r--r-- | cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.ts | 30 |
1 files changed, 28 insertions, 2 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 b5e5fda75..f4f74a9fd 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 @@ -8,11 +8,14 @@ import {InputActionAttribute, OutputActionAttribute} from './models/InputActionA }) export class ActionAttributesComponent implements OnInit { - inputs: [InputActionAttribute]; - outputs: [OutputActionAttribute]; + inputs = []; + outputs = []; actionAttributesSideBar: boolean; + inputActionAttribute = new InputActionAttribute(); + outputActionAttribute = new OutputActionAttribute(); constructor() { + } ngOnInit() { @@ -29,4 +32,27 @@ export class ActionAttributesComponent implements OnInit { addOutput(output: OutputActionAttribute) { this.outputs.push(output); } + + setInputType(type) { + this.inputActionAttribute.type = type; + } + + setInputRequired(isRequired) { + this.inputActionAttribute.required = isRequired; + } + + setOutputRequired(isRequired) { + this.outputActionAttribute.required = isRequired; + } + + setOutputType(type) { + this.outputActionAttribute.type = type; + } + + submitAttributes() { + console.log(this.inputActionAttribute); + console.log(this.outputActionAttribute); + this.inputs.push(this.inputActionAttribute); + this.outputs.push(this.outputActionAttribute); + } } |