@infrab4a/connect 3.7.0 → 3.7.1-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.
@@ -2568,7 +2568,7 @@
2568
2568
  })
2569
2569
  .catch(function (error) { return error; });
2570
2570
  };
2571
- CategoryFirestoreRepository.prototype.getCategoriesForHome = function (categoryIds, limit) {
2571
+ CategoryFirestoreRepository.prototype.getCategoriesForHome = function (categoryIds, limit, gender) {
2572
2572
  if (limit === void 0) { limit = 4; }
2573
2573
  return __awaiter(this, void 0, void 0, function () {
2574
2574
  var categorySnap, categories, homeSections;
@@ -2592,7 +2592,7 @@
2592
2592
  _a = {
2593
2593
  category: category
2594
2594
  };
2595
- return [4 /*yield*/, this.mountCategory(category, { limit: limit, hasStock: true })];
2595
+ return [4 /*yield*/, this.mountCategory(category, { limit: limit, hasStock: true, gender: gender })];
2596
2596
  case 1: return [2 /*return*/, (_a.products = _b.sent(),
2597
2597
  _a)];
2598
2598
  }
@@ -2633,6 +2633,8 @@
2633
2633
  query = _b.sent();
2634
2634
  if (options === null || options === void 0 ? void 0 : options.hasStock)
2635
2635
  query = query.where('stock.quantity', '>', 0);
2636
+ if (options === null || options === void 0 ? void 0 : options.gender)
2637
+ query = query.where('tags', 'array-contains', options === null || options === void 0 ? void 0 : options.gender);
2636
2638
  if (options === null || options === void 0 ? void 0 : options.limit)
2637
2639
  query = query.limit(options === null || options === void 0 ? void 0 : options.limit);
2638
2640
  return [4 /*yield*/, query.get()];