@infrab4a/connect 0.13.2 → 0.13.3-beta.0
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/bundles/infrab4a-connect.umd.js +3 -10
- package/bundles/infrab4a-connect.umd.js.map +1 -1
- package/esm2015/lib/infra/firebase/firestore/repositories/catalog/category-firestore.repository.js +2 -9
- package/fesm2015/infrab4a-connect.js +1 -8
- package/fesm2015/infrab4a-connect.js.map +1 -1
- package/package.json +1 -1
|
@@ -2061,7 +2061,7 @@
|
|
|
2061
2061
|
CategoryFirestoreRepository.prototype.getCategoriesForHome = function (categoryIds, limit) {
|
|
2062
2062
|
if (limit === void 0) { limit = 4; }
|
|
2063
2063
|
return __awaiter(this, void 0, void 0, function () {
|
|
2064
|
-
var categorySnap, categories, homeSections, categories_1, categories_1_1, category,
|
|
2064
|
+
var categorySnap, categories, homeSections, categories_1, categories_1_1, category, products, e_1_1;
|
|
2065
2065
|
var e_1, _a;
|
|
2066
2066
|
return __generator(this, function (_b) {
|
|
2067
2067
|
switch (_b.label) {
|
|
@@ -2083,16 +2083,9 @@
|
|
|
2083
2083
|
case 3:
|
|
2084
2084
|
if (!!categories_1_1.done) return [3 /*break*/, 6];
|
|
2085
2085
|
category = categories_1_1.value;
|
|
2086
|
-
|
|
2087
|
-
return [4 /*yield*/, this.collection('products')
|
|
2088
|
-
.where('categories', 'array-contains', category.id)
|
|
2089
|
-
.where(publishedField, '==', true)
|
|
2090
|
-
.where('stock.quantity', '>', 1)
|
|
2091
|
-
.limit(limit)
|
|
2092
|
-
.get()];
|
|
2086
|
+
return [4 /*yield*/, this.mountCategory(category)];
|
|
2093
2087
|
case 4:
|
|
2094
|
-
|
|
2095
|
-
products = productSnap.docs.map(function (doc) { return doc.data(); });
|
|
2088
|
+
products = _b.sent();
|
|
2096
2089
|
homeSections.push({ category: category, products: products });
|
|
2097
2090
|
_b.label = 5;
|
|
2098
2091
|
case 5:
|