summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/models/attributes-outputs/output-fe-model.ts
diff options
context:
space:
mode:
authorvasraz <vasyl.razinkov@est.tech>2022-07-14 21:06:58 +0100
committerMichael Morris <michael.morris@est.tech>2022-07-15 13:16:16 +0000
commitee8876059c520d97bf068734b25a02365d7fe1ea (patch)
tree46176fc6a016818c6d17dd0ac20054ec884e7802 /catalog-ui/src/app/models/attributes-outputs/output-fe-model.ts
parente4055451d3fbfe1fba35dcf546907ad432f6b4fc (diff)
Support Outputs during Import Service
Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech> Change-Id: I4d58576b70ef738d6fa7545cd268ec030b43f95c Issue-ID: SDC-4051
Diffstat (limited to 'catalog-ui/src/app/models/attributes-outputs/output-fe-model.ts')
-rw-r--r--catalog-ui/src/app/models/attributes-outputs/output-fe-model.ts14
1 files changed, 7 insertions, 7 deletions
diff --git a/catalog-ui/src/app/models/attributes-outputs/output-fe-model.ts b/catalog-ui/src/app/models/attributes-outputs/output-fe-model.ts
index 8806562d06..d66846bf4a 100644
--- a/catalog-ui/src/app/models/attributes-outputs/output-fe-model.ts
+++ b/catalog-ui/src/app/models/attributes-outputs/output-fe-model.ts
@@ -18,11 +18,11 @@
* ============LICENSE_END=========================================================
*/
-import * as _ from "lodash";
-import {PROPERTY_DATA} from "../../utils/constants";
-import {OutputBEModel} from "./output-be-model";
-import {AttributeFEModel} from "./attribute-fe-model";
-import {DerivedAttributeType} from "./attribute-be-model";
+import * as _ from 'lodash';
+import { PROPERTY_DATA } from '../../utils/constants';
+import { DerivedAttributeType } from './attribute-be-model';
+import { AttributeFEModel } from './attribute-fe-model';
+import { OutputBEModel } from './output-be-model';
export class OutputFEModel extends OutputBEModel {
isSimpleType: boolean;
@@ -38,7 +38,7 @@ export class OutputFEModel extends OutputBEModel {
super(output);
if (output) {
this.isSimpleType = PROPERTY_DATA.SIMPLE_TYPES.indexOf(this.type) > -1;
- let relatedAttribute = output.attributes && output.attributes[0] || output.outputs && output.outputs[0];
+ const relatedAttribute = output.attribute;
if (relatedAttribute) {
this.relatedAttributeValue = relatedAttribute.value;
this.relatedAttributeName = relatedAttribute.name;
@@ -71,6 +71,6 @@ export class OutputFEModel extends OutputBEModel {
}
hasChanged(): boolean {
- return this.hasDefaultValueChanged() ;
+ return this.hasDefaultValueChanged();
}
}