summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/models/properties.ts
diff options
context:
space:
mode:
authorKrupaNagabhushan <krupa.nagabhushan@est.tech>2023-01-31 09:45:22 +0000
committerMichael Morris <michael.morris@est.tech>2023-02-08 15:32:22 +0000
commit442784e34ef8cae76cca559a600f360dfdeee97e (patch)
tree586b73a541ebc92fbb27f3bc287ab4c472aa5b73 /catalog-ui/src/app/models/properties.ts
parent259f3ae4ab8649549f752367c198c07b9da8aa6e (diff)
Enable UI component to display property constraints
Issue-ID: SDC-4360 Signed-off-by: KrupaNagabhushan <krupa.nagabhushan@est.tech> Change-Id: I63510720a260b830baea3813ff0adb304fa480e4
Diffstat (limited to 'catalog-ui/src/app/models/properties.ts')
-rw-r--r--catalog-ui/src/app/models/properties.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/catalog-ui/src/app/models/properties.ts b/catalog-ui/src/app/models/properties.ts
index 80575c4221..cff1324c30 100644
--- a/catalog-ui/src/app/models/properties.ts
+++ b/catalog-ui/src/app/models/properties.ts
@@ -94,7 +94,13 @@ export class PropertyModel extends PropertyBEModel implements IPropertyModel {
constructor(property?:PropertyModel) {
super(property);
if (property) {
- this.constraints = property.constraints;
+ if (property.propertyConstraints) {
+ this.constraints = new Array();
+ property.propertyConstraints.forEach((constraint: any) => {
+ this.constraints.push(JSON.parse(constraint));
+ });
+ }
+ this.propertyConstraints = property.propertyConstraints;
this.source = property.source;
this.valueUniqueUid = property.valueUniqueUid;
this.path = property.path;