@infrab4a/connect 0.7.3 → 0.7.5
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 +6 -2
- package/bundles/infrab4a-connect.umd.js.map +1 -1
- package/esm2015/lib/domain/shopping/models/coupons/coupon.js +1 -1
- package/esm2015/lib/infra/firebase/firestore/repositories/catalog/category-firestore.repository.js +6 -2
- package/fesm2015/infrab4a-connect.js +5 -1
- package/fesm2015/infrab4a-connect.js.map +1 -1
- package/lib/domain/shopping/models/coupons/coupon.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1694,7 +1694,7 @@
|
|
|
1694
1694
|
};
|
|
1695
1695
|
CategoryFirestoreRepository.prototype.mountCategory = function (category) {
|
|
1696
1696
|
return __awaiter(this, void 0, void 0, function () {
|
|
1697
|
-
var chunks, products, chunks_1, chunks_1_1, productIds, productSnap, e_2_1;
|
|
1697
|
+
var chunks, products, publishedField, chunks_1, chunks_1_1, productIds, productSnap, e_2_1;
|
|
1698
1698
|
var e_2, _a;
|
|
1699
1699
|
return __generator(this, function (_b) {
|
|
1700
1700
|
switch (_b.label) {
|
|
@@ -1709,6 +1709,7 @@
|
|
|
1709
1709
|
return resultArray;
|
|
1710
1710
|
}, []);
|
|
1711
1711
|
products = [];
|
|
1712
|
+
publishedField = category.shop === exports.Shops.GLAMSHOP ? 'publishedGlam' : 'published';
|
|
1712
1713
|
_b.label = 1;
|
|
1713
1714
|
case 1:
|
|
1714
1715
|
_b.trys.push([1, 6, 7, 8]);
|
|
@@ -1717,7 +1718,10 @@
|
|
|
1717
1718
|
case 2:
|
|
1718
1719
|
if (!!chunks_1_1.done) return [3 /*break*/, 5];
|
|
1719
1720
|
productIds = chunks_1_1.value;
|
|
1720
|
-
return [4 /*yield*/, this.collection('products')
|
|
1721
|
+
return [4 /*yield*/, this.collection('products')
|
|
1722
|
+
.where(publishedField, '==', true)
|
|
1723
|
+
.where('id', 'in', productIds)
|
|
1724
|
+
.get()];
|
|
1721
1725
|
case 3:
|
|
1722
1726
|
productSnap = _b.sent();
|
|
1723
1727
|
if (productSnap.empty)
|