complex types selectable in Operation params 07/74107/2
authorArielk <Ariel.Kenan@amdocs.com>
Sun, 2 Dec 2018 15:05:09 +0000 (17:05 +0200)
committerEinav Keidar <einavw@amdocs.com>
Mon, 3 Dec 2018 09:02:30 +0000 (09:02 +0000)
Change-Id: I4ea366e1a9aff6bd0e3b707a292776bfb48b809f
Issue-ID: SDC-1968
Signed-off-by: Arielk <Ariel.Kenan@amdocs.com>
catalog-ui/src/app/ng2/pages/interface-operation/operation-creator/operation-creator.component.ts
catalog-ui/src/app/ng2/pages/interface-operation/operation-creator/param-row/param-row.component.ts

index e27c783..a304f1a 100644 (file)
@@ -251,11 +251,15 @@ export class OperationCreatorComponent {
         let valid = true;
         if (this.currentTab === this.TYPE_INPUT) {
             _.forEach(this.inputParameters, param => {
-                if (!param.name || !param.property) valid = false;
+                if (!param.name || !param.property) {
+                    valid = false;
+                }
             });
         } else {
             _.forEach(this.outputParameters, param => {
-                if (!param.name || !param.type) valid = false;
+                if (!param.name || !param.type) {
+                    valid = false;
+                }
             });
         }
         return valid;
index 9bedfa7..a12425d 100644 (file)
@@ -50,9 +50,8 @@ export class ParamRowComponent {
                 _.toArray(dataTypes),
                 (type: any) => type.name === prop.type
             );
-            if (!type.properties) {
-                flattenedProps.push(prop);
-            } else {
+            flattenedProps.push(prop);
+            if (type.properties) {
                 _.forEach(type.properties, subType => {
                     if (this.isTypePrimitive(subType.type)) {
                         flattenedProps.push({