diff --git a/feature-libs/product-configurator/rulebased/core/state/reducers/configurator.reducer.ts b/feature-libs/product-configurator/rulebased/core/state/reducers/configurator.reducer.ts index 85b99bce73b..5793f79a5d0 100644 --- a/feature-libs/product-configurator/rulebased/core/state/reducers/configurator.reducer.ts +++ b/feature-libs/product-configurator/rulebased/core/state/reducers/configurator.reducer.ts @@ -193,7 +193,7 @@ function takeOverChanges( const content = { ...action.payload }; const groups = content.groups.length > 0 ? content.groups : state.groups; - const result = { + const result: Configurator.Configuration = { ...state, ...content, groups: groups, diff --git a/feature-libs/product-configurator/rulebased/occ/variant/converters/occ-configurator-variant-normalizer.spec.ts b/feature-libs/product-configurator/rulebased/occ/variant/converters/occ-configurator-variant-normalizer.spec.ts index 897a3a562b9..6339bce48b1 100644 --- a/feature-libs/product-configurator/rulebased/occ/variant/converters/occ-configurator-variant-normalizer.spec.ts +++ b/feature-libs/product-configurator/rulebased/occ/variant/converters/occ-configurator-variant-normalizer.spec.ts @@ -186,6 +186,7 @@ const attributeMSIWithValue: Configurator.Attribute = { const configuration: OccConfigurator.Configuration = { configId: configId, complete: true, + consistent: true, rootProduct: 'CONF_PRODUCT', groups: [ { @@ -286,9 +287,10 @@ describe('OccConfiguratorVariantNormalizer', () => { expect(occConfiguratorVariantNormalizer).toBeTruthy(); }); - it('should convert a configuration', () => { + it('should convert a configuration and support "complete" and "consistent" attribute', () => { const result = occConfiguratorVariantNormalizer.convert(configuration); expect(result.complete).toBe(true); + expect(result.consistent).toBe(true); }); it('should not touch isRequiredCartUpdate and isCartEntryUpdatePending when converting a configuration', () => { diff --git a/feature-libs/product-configurator/rulebased/occ/variant/converters/occ-configurator-variant-normalizer.ts b/feature-libs/product-configurator/rulebased/occ/variant/converters/occ-configurator-variant-normalizer.ts index b9153642a01..392b816418f 100644 --- a/feature-libs/product-configurator/rulebased/occ/variant/converters/occ-configurator-variant-normalizer.ts +++ b/feature-libs/product-configurator/rulebased/occ/variant/converters/occ-configurator-variant-normalizer.ts @@ -24,6 +24,7 @@ export class OccConfiguratorVariantNormalizer interactionState: target?.interactionState ?? {}, configId: source.configId, complete: source.complete, + consistent: source.consistent, totalNumberOfIssues: source.totalNumberOfIssues, productCode: source.rootProduct, groups: [], diff --git a/feature-libs/product-configurator/rulebased/occ/variant/variant-configurator-occ.models.ts b/feature-libs/product-configurator/rulebased/occ/variant/variant-configurator-occ.models.ts index 7a1bd0d36f6..2f8de847747 100644 --- a/feature-libs/product-configurator/rulebased/occ/variant/variant-configurator-occ.models.ts +++ b/feature-libs/product-configurator/rulebased/occ/variant/variant-configurator-occ.models.ts @@ -12,7 +12,12 @@ export namespace OccConfigurator { * @member {boolean} [complete] */ complete?: boolean; - + /** + * Configuration is consistent, meaning it does not contain conflicts + * + * @member {boolean} + */ + consistent?: boolean; totalNumberOfIssues?: number; groups?: Group[]; rootProduct?: string;