@infrab4a/connect-angular 5.2.1-beta.0 → 5.2.1-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1723,13 +1723,21 @@ class TermSearchStrategy {
1723
1723
  const defaultGender = filters?.gender?.at(0) || 'male';
1724
1724
  const stockData = totalResult.data.filter((product) => product.stock.quantity > 0);
1725
1725
  const stockOut = totalResult.data.filter((product) => product.stock.quantity <= 0);
1726
- const productIdsStockGender = productIds.filter((product) => stockData.some((result) => result.id === product && (result.gender?.includes(defaultGender) || result.gender?.includes('unisex'))));
1727
- const productIdsStockNotGender = productIds.filter((product) => stockData.some((result) => result.id === product && !result.gender?.includes(defaultGender) && !result.gender?.includes('unisex')));
1728
- const productIdsStock = productIdsStockGender.concat(productIdsStockNotGender);
1726
+ // const productIdsStockGender = productIds.filter((product) =>
1727
+ // stockData.some(
1728
+ // (result: any) =>
1729
+ // result.id === product && (result.gender?.includes(defaultGender) || result.gender?.includes('unisex')),
1730
+ // ),
1731
+ // )
1732
+ // const productIdsStockNotGender = productIds.filter((product) =>
1733
+ // stockData.some(
1734
+ // (result: any) =>
1735
+ // result.id === product && !result.gender?.includes(defaultGender) && !result.gender?.includes('unisex'),
1736
+ // ),
1737
+ // )
1738
+ // const productIdsStock = productIdsStockGender.concat(productIdsStockNotGender)
1729
1739
  const productIdsStockOut = productIds.filter((product) => stockOut.some((result) => result.id === product));
1730
- const limitedProductId = productIdsStock
1731
- .concat(productIdsStockOut)
1732
- .slice(limits.offset, limits.offset + limits.limit);
1740
+ const limitedProductId = stockData.concat(productIdsStockOut).slice(limits.offset, limits.offset + limits.limit);
1733
1741
  const orderedId = productIds.filter((product) => limitedProductId.includes(product));
1734
1742
  return this.getDetailedProducts(orderedId, totalResult, fieldsHelper);
1735
1743
  }