@infrab4a/connect 3.2.6-beta.1 → 3.2.6-beta.3
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 +19 -16
- package/bundles/infrab4a-connect.umd.js.map +1 -1
- package/esm2015/infra/hasura-graphql/repositories/catalog/category-hasura-graphql.repository.js +6 -5
- package/fesm2015/infrab4a-connect.js +4 -3
- package/fesm2015/infrab4a-connect.js.map +1 -1
- package/package.json +1 -1
|
@@ -3849,20 +3849,23 @@
|
|
|
3849
3849
|
case 3:
|
|
3850
3850
|
_f.apply(_e, [_g.sent()]);
|
|
3851
3851
|
_g.label = 4;
|
|
3852
|
-
case 4:
|
|
3853
|
-
|
|
3854
|
-
return
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3852
|
+
case 4:
|
|
3853
|
+
if (!categoriesHasura.length)
|
|
3854
|
+
return [2 /*return*/, []];
|
|
3855
|
+
return [4 /*yield*/, Promise.all(categories.map(function (category) { return __awaiter(_this, void 0, void 0, function () {
|
|
3856
|
+
var _c;
|
|
3857
|
+
return __generator(this, function (_d) {
|
|
3858
|
+
switch (_d.label) {
|
|
3859
|
+
case 0:
|
|
3860
|
+
_c = {
|
|
3861
|
+
category: category
|
|
3862
|
+
};
|
|
3863
|
+
return [4 /*yield*/, this.mountCategory(category, { limit: limit, hasStock: true })];
|
|
3864
|
+
case 1: return [2 /*return*/, (_c.products = _d.sent(),
|
|
3865
|
+
_c)];
|
|
3866
|
+
}
|
|
3867
|
+
});
|
|
3868
|
+
}); }))];
|
|
3866
3869
|
case 5:
|
|
3867
3870
|
homeSections = _g.sent();
|
|
3868
3871
|
return [2 /*return*/, homeSections];
|
|
@@ -3876,8 +3879,8 @@
|
|
|
3876
3879
|
return __generator(this, function (_c) {
|
|
3877
3880
|
switch (_c.label) {
|
|
3878
3881
|
case 0:
|
|
3879
|
-
if (!category.products)
|
|
3880
|
-
|
|
3882
|
+
if (!(category === null || category === void 0 ? void 0 : category.products))
|
|
3883
|
+
return [2 /*return*/, []];
|
|
3881
3884
|
products = [];
|
|
3882
3885
|
return [4 /*yield*/, this.productRepository.find(Object.assign({ filters: Object.assign({ id: { operator: exports.Where.IN, value: category.products }, published: true }, ((options === null || options === void 0 ? void 0 : options.hasStock) ? { stock: { quantity: { operator: exports.Where.GT, value: 0 } } } : {})), fields: [
|
|
3883
3886
|
'id',
|