summaryrefslogtreecommitdiffstats
path: root/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.ts
diff options
context:
space:
mode:
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.ts58
1 files changed, 58 insertions, 0 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
new file mode 100644
index 000000000..f4f74a9fd
--- /dev/null
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.ts
@@ -0,0 +1,58 @@
+import {Component, OnInit} from '@angular/core';
+import {InputActionAttribute, OutputActionAttribute} from './models/InputActionAttribute';
+
+@Component({
+ selector: 'app-action-attributes',
+ templateUrl: './action-attributes.component.html',
+ styleUrls: ['./action-attributes.component.css']
+})
+export class ActionAttributesComponent implements OnInit {
+
+ inputs = [];
+ outputs = [];
+ actionAttributesSideBar: boolean;
+ inputActionAttribute = new InputActionAttribute();
+ outputActionAttribute = new OutputActionAttribute();
+
+ constructor() {
+
+ }
+
+ ngOnInit() {
+ }
+
+ _toggleSidebar2() {
+ this.actionAttributesSideBar = !this.actionAttributesSideBar;
+ }
+
+ addInput(input: InputActionAttribute) {
+ this.inputs.push(input);
+ }
+
+ 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);
+ }
+}