From f40eb878cd03f64553b5dcf2d53f93df50e76d4e Mon Sep 17 00:00:00 2001 From: k2maan Date: Wed, 6 Dec 2023 11:21:03 +0530 Subject: [PATCH] Fixed: incorrect listing icon for products not listed and not in category --- src/views/catalog-product-details.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/views/catalog-product-details.vue b/src/views/catalog-product-details.vue index 3a265dd4..9ccb89de 100644 --- a/src/views/catalog-product-details.vue +++ b/src/views/catalog-product-details.vue @@ -936,7 +936,10 @@ export default defineComponent({ const shopListings = this.shopListings.filter((shopListing: any) => shopListing.shopifyShopProductId) // Checking if we have the data const shopListingsWithMissingData = shopListings.filter((shopifyListing: any) => !shopifyListing.status) - return !(shopListingsWithMissingData.length > 0) && ((this.poSummary.eligible && shopListings.length === this.poSummary.listedCount) || (!this.poSummary.eligible && shopListings.length !== this.poSummary.listedCount)) + // returning true if no missing data is there and either the product is eligible and is listed on all stores + // or the product is not eligible and is not listed on any store (no need to check shop listing for that + // product as listing count check is enough) + return !(shopListingsWithMissingData.length > 0) && ((this.poSummary.eligible && shopListings.length === this.poSummary.listedCount) || (!this.poSummary.eligible && this.poSummary.listedCount === 0)) }, prepareListingCountStatusMsg() { // Checking if it is linked