Skip to content

Commit

Permalink
Fixed: incorrect listing icon for products not listed and not in cate…
Browse files Browse the repository at this point in the history
…gory
  • Loading branch information
k2maan committed Dec 6, 2023
1 parent b77a1f1 commit f40eb87
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/views/catalog-product-details.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f40eb87

Please sign in to comment.