From 8eaac04aa9bd33aca89a839fd96c6d6b3fd9ab5e Mon Sep 17 00:00:00 2001 From: Danilo Hoffmann Date: Mon, 3 May 2021 16:20:48 +0200 Subject: [PATCH] fix: repair data refresh on product pages (#675) --- src/app/core/facades/product-context.facade.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/app/core/facades/product-context.facade.ts b/src/app/core/facades/product-context.facade.ts index 31d7bc523f..dac37c5e34 100644 --- a/src/app/core/facades/product-context.facade.ts +++ b/src/app/core/facades/product-context.facade.ts @@ -258,11 +258,18 @@ export class ProductContextFacade extends RxState { ); } + private get isMaximumLevel(): boolean { + return ( + this.get('requiredCompletenessLevel') === ProductCompletenessLevel.Detail || + this.get('requiredCompletenessLevel') === true + ); + } + private postProductFetch(product: ProductView, displayProperties: Partial) { if ( (ProductHelper.isRetailSet(product) || ProductHelper.isMasterProduct(product)) && displayProperties.price && - this.get('requiredCompletenessLevel') !== ProductCompletenessLevel.Detail + !this.isMaximumLevel ) { this.set('requiredCompletenessLevel', () => ProductCompletenessLevel.Detail); }