@infrab4a/connect-angular 4.4.0-beta.12 → 4.4.0-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/esm2020/angular-firestore.module.mjs +1 -3
- package/esm2020/services/cart.service.mjs +2 -2
- package/esm2020/services/catalog/category.service.mjs +4 -4
- package/fesm2015/infrab4a-connect-angular.mjs +4 -6
- package/fesm2015/infrab4a-connect-angular.mjs.map +1 -1
- package/fesm2020/infrab4a-connect-angular.mjs +4 -6
- package/fesm2020/infrab4a-connect-angular.mjs.map +1 -1
- package/package.json +2 -2
- package/services/catalog/category.service.d.ts +1 -6
|
@@ -420,7 +420,6 @@ AngularFirestoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0",
|
|
|
420
420
|
return getFirestore(injector.get(FirebaseApp));
|
|
421
421
|
const firestore = initializeFirestore(injector.get(FirebaseApp), {
|
|
422
422
|
experimentalForceLongPolling: true,
|
|
423
|
-
ignoreUndefinedProperties: true,
|
|
424
423
|
localCache: memoryLocalCache(),
|
|
425
424
|
});
|
|
426
425
|
return firestore;
|
|
@@ -439,7 +438,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
439
438
|
return getFirestore(injector.get(FirebaseApp));
|
|
440
439
|
const firestore = initializeFirestore(injector.get(FirebaseApp), {
|
|
441
440
|
experimentalForceLongPolling: true,
|
|
442
|
-
ignoreUndefinedProperties: true,
|
|
443
441
|
localCache: memoryLocalCache(),
|
|
444
442
|
});
|
|
445
443
|
return firestore;
|
|
@@ -1359,7 +1357,7 @@ class CartService {
|
|
|
1359
1357
|
}), concatMap((checkout) => this.checkoutService.updateCheckoutLineItems(checkout)), map((checkout) => this.generateCartObject(checkout.lineItems)), tap((cart) => this.cartSubject.next(cart)));
|
|
1360
1358
|
}
|
|
1361
1359
|
updateUserCart(user) {
|
|
1362
|
-
return this.checkoutService.getCheckout().pipe(concatMap((checkout) => this.checkoutService.updateCheckoutUser(Checkout.toInstance({ ...checkout.toPlain(), user }))), concatMap(async (checkout) =>
|
|
1360
|
+
return this.checkoutService.getCheckout().pipe(concatMap((checkout) => this.checkoutService.updateCheckoutUser(Checkout.toInstance({ ...checkout.toPlain(), user }))), concatMap(async (checkout) => this.checkoutService
|
|
1363
1361
|
.updateCheckoutLineItems(Checkout.toInstance({
|
|
1364
1362
|
...checkout.toPlain(),
|
|
1365
1363
|
lineItems: checkout.lineItems?.length
|
|
@@ -1765,15 +1763,15 @@ class CategoryService {
|
|
|
1765
1763
|
this.categoryStructureAdapter = categoryStructureAdapter;
|
|
1766
1764
|
this.shop = shop;
|
|
1767
1765
|
}
|
|
1768
|
-
async fetchBrands(category,
|
|
1766
|
+
async fetchBrands(category, mainGender) {
|
|
1769
1767
|
const brands = await this.productRepository
|
|
1770
1768
|
.findCatalog({
|
|
1771
1769
|
filters: await this.categoryStructureAdapter.buildProductFilterByCategory(category),
|
|
1772
1770
|
fields: ['brand'],
|
|
1773
|
-
},
|
|
1771
|
+
}, mainGender || this.shop === Shops.MENSMARKET ? 'male' : 'female')
|
|
1774
1772
|
.then(({ data }) => Object.keys(data.map((product) => product.brand).reduce((brands, brand) => ({ ...brands, [brand]: true }), {})));
|
|
1775
1773
|
return this.categoryRepository
|
|
1776
|
-
.find({ filters: { brandCategory: true, shop:
|
|
1774
|
+
.find({ filters: { brandCategory: true, shop: this.shop }, orderBy: { name: 'asc' } })
|
|
1777
1775
|
.then(({ data }) => data.filter((category) => brands.includes(category.conditions.brand)));
|
|
1778
1776
|
}
|
|
1779
1777
|
async fetchFilterOptions(category) {
|