@infrab4a/connect-angular 4.3.12-beta.0 → 4.3.12-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.
- package/esm2020/services/catalog/catalog.service.mjs +12 -5
- package/fesm2015/infrab4a-connect-angular.mjs +8 -4
- package/fesm2015/infrab4a-connect-angular.mjs.map +1 -1
- package/fesm2020/infrab4a-connect-angular.mjs +10 -3
- package/fesm2020/infrab4a-connect-angular.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1675,9 +1675,16 @@ class CatalogService {
|
|
|
1675
1675
|
return this.findCatalogAndSortByMostRevelant(productsIds, options, limits);
|
|
1676
1676
|
}
|
|
1677
1677
|
if (this.hasCategory(options) && options.sort === 'most-relevant') {
|
|
1678
|
-
const productsIds =
|
|
1679
|
-
|
|
1680
|
-
:
|
|
1678
|
+
const productsIds = await this.productRepository
|
|
1679
|
+
.find({
|
|
1680
|
+
filters: {
|
|
1681
|
+
...(await this.buildMainFilter(options)),
|
|
1682
|
+
},
|
|
1683
|
+
})
|
|
1684
|
+
.then((products) => products.data.map((product) => product.id));
|
|
1685
|
+
// const productsIds = options.category.products?.length
|
|
1686
|
+
// ? options.category.products
|
|
1687
|
+
// : await this.categoryRepository.get({ id: options.category.id }).then((categoryFound) => categoryFound.products)
|
|
1681
1688
|
return this.findCatalogAndSortByMostRevelant(productsIds, options, limits);
|
|
1682
1689
|
}
|
|
1683
1690
|
const repoParams = {
|