@infrab4a/connect-angular 4.5.3-beta.1 → 4.5.3-beta.2

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.
@@ -1782,6 +1782,7 @@ class CatalogService {
1782
1782
  if (offset > 0) {
1783
1783
  limits.offset -= mostRelevants.length;
1784
1784
  }
1785
+ console.log('limits', limits);
1785
1786
  const mostRelevantProductsIds = [...new Set(...mostRelevants, ...productIds)];
1786
1787
  const totalResult = await this.productRepository.findCatalog({
1787
1788
  fields: ['id', 'stock'],
@@ -1802,7 +1803,8 @@ class CatalogService {
1802
1803
  const limitedProductId = productIdsStock
1803
1804
  .concat(productIdsStockOut)
1804
1805
  .slice(limits.offset, limits.offset + limits.limit);
1805
- const orderedId = productIds.filter((product) => limitedProductId.includes(product));
1806
+ const orderedId = mostRelevantProductsIds.filter((product) => limitedProductId.includes(product));
1807
+ console.log('orderedId', orderedId);
1806
1808
  const productResult = await this.productRepository.findCatalog({
1807
1809
  filters: {
1808
1810
  id: { operator: Where.IN, value: orderedId },