@infrab4a/connect-angular 4.5.3-beta.5 → 4.5.3-beta.6
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 +10 -9
- package/fesm2015/infrab4a-connect-angular.mjs +9 -8
- package/fesm2015/infrab4a-connect-angular.mjs.map +1 -1
- package/fesm2020/infrab4a-connect-angular.mjs +9 -8
- package/fesm2020/infrab4a-connect-angular.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1777,14 +1777,14 @@ class CatalogService {
|
|
|
1777
1777
|
async findCatalogAndSortByMostRevelant(mostRelevants, productIds, options, limits) {
|
|
1778
1778
|
console.log('mostRelevant', mostRelevants);
|
|
1779
1779
|
console.log('productIds', productIds);
|
|
1780
|
-
const { offset } = limits
|
|
1781
|
-
if (offset === 0) {
|
|
1782
|
-
|
|
1783
|
-
}
|
|
1784
|
-
if (offset > 0) {
|
|
1785
|
-
|
|
1786
|
-
}
|
|
1787
|
-
console.log('limits', limits)
|
|
1780
|
+
// const { offset } = limits
|
|
1781
|
+
// if (offset === 0) {
|
|
1782
|
+
// limits.limit -= mostRelevants.length
|
|
1783
|
+
// }
|
|
1784
|
+
// if (offset > 0) {
|
|
1785
|
+
// limits.offset -= mostRelevants.length
|
|
1786
|
+
// }
|
|
1787
|
+
// console.log('limits', limits)
|
|
1788
1788
|
const mostRelevantProductsIds = [...new Set(mostRelevants.concat(productIds))];
|
|
1789
1789
|
console.log('mostRelevantProductsIds', mostRelevantProductsIds);
|
|
1790
1790
|
const totalResult = await this.productRepository.findCatalog({
|
|
@@ -1793,6 +1793,7 @@ class CatalogService {
|
|
|
1793
1793
|
id: { operator: Where.IN, value: mostRelevantProductsIds },
|
|
1794
1794
|
...this.buildFilterQuery(options?.filters || {}),
|
|
1795
1795
|
},
|
|
1796
|
+
orderBy: this.buildSortQuery('news'),
|
|
1796
1797
|
options: {
|
|
1797
1798
|
minimal: ['price'],
|
|
1798
1799
|
maximum: ['price'],
|