From 32596854ea810466ee6311a9dfe4af88e0b91016 Mon Sep 17 00:00:00 2001 From: Ryan Mathis Date: Fri, 6 Sep 2019 10:59:39 -0700 Subject: [PATCH] SHIBUI-1407 comparison highlights --- .../metadata-configuration.component.ts | 2 +- .../property/array-property.component.html | 16 ++++++++-------- .../property/primitive-property.component.html | 4 +++- .../app/metadata/configuration/reducer/index.ts | 6 ++++++ ui/src/app/metadata/domain/model/property.ts | 1 + 5 files changed, 19 insertions(+), 10 deletions(-) diff --git a/ui/src/app/metadata/configuration/component/metadata-configuration.component.ts b/ui/src/app/metadata/configuration/component/metadata-configuration.component.ts index 280c362a6..1b04ba636 100644 --- a/ui/src/app/metadata/configuration/component/metadata-configuration.component.ts +++ b/ui/src/app/metadata/configuration/component/metadata-configuration.component.ts @@ -8,7 +8,7 @@ import { CONFIG_DATE_FORMAT } from '../configuration.values'; selector: 'metadata-configuration', changeDetection: ChangeDetectionStrategy.OnPush, templateUrl: './metadata-configuration.component.html', - styleUrls: [] + styleUrls: ['./metadata-configuration.component.scss'] }) export class MetadataConfigurationComponent { @Input() configuration: MetadataConfiguration; diff --git a/ui/src/app/metadata/configuration/component/property/array-property.component.html b/ui/src/app/metadata/configuration/component/property/array-property.component.html index 53682ea90..1a1fe28d1 100644 --- a/ui/src/app/metadata/configuration/component/property/array-property.component.html +++ b/ui/src/app/metadata/configuration/component/property/array-property.component.html @@ -1,13 +1,13 @@ -
+
-
{{ property.name }}
-
+
{{ property.name }}
+
-
+
{{ property.items.properties[prop].title }}
-
- {{ attr.label }} + {{ attr.label }}
true @@ -51,8 +51,8 @@
-
- {{ property.name }} +
+ {{ property.name }}

-

    +
    { + if (!array) { + return false; + } + return JSON.stringify(model[prop.id]) !== JSON.stringify(array[0][prop.id]); + }), value: models.map(model => { return model[prop.id]; }) diff --git a/ui/src/app/metadata/domain/model/property.ts b/ui/src/app/metadata/domain/model/property.ts index 4768de9e4..dba90e82e 100644 --- a/ui/src/app/metadata/domain/model/property.ts +++ b/ui/src/app/metadata/domain/model/property.ts @@ -5,6 +5,7 @@ export interface Property { value: any[]; items: Property; properties: Property[]; + differences?: boolean; widget?: { id: string; data?: {key: string, label: string}[];