@infrab4a/connect-angular 5.5.0-beta.12 → 5.5.0-beta.13
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/services/catalog/helpers/brand-manager.helper.mjs +7 -8
- package/fesm2015/infrab4a-connect-angular.mjs +6 -10
- package/fesm2015/infrab4a-connect-angular.mjs.map +1 -1
- package/fesm2020/infrab4a-connect-angular.mjs +6 -7
- package/fesm2020/infrab4a-connect-angular.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1920,13 +1920,7 @@ class BrandManagerHelper {
|
|
|
1920
1920
|
if (isEmpty(brands) && options.filters) {
|
|
1921
1921
|
delete options.filters.brands;
|
|
1922
1922
|
}
|
|
1923
|
-
|
|
1924
|
-
this.brandsList[indexKey] = await this.fetchBrandsOnly(options);
|
|
1925
|
-
}
|
|
1926
|
-
else {
|
|
1927
|
-
this.brandsList[indexKey] = this.brandsList[indexKey] || brands;
|
|
1928
|
-
}
|
|
1929
|
-
// this.brandsList[indexKey] = this.brandsList[indexKey] || brands || (await this.fetchBrandsOnly(options))
|
|
1923
|
+
this.brandsList[indexKey] = this.brandsList[indexKey] || brands || (await this.fetchBrandsOnly(options));
|
|
1930
1924
|
this.brandsList[indexKey] = this.brandsList[indexKey].filter(Boolean);
|
|
1931
1925
|
if (options.filters) {
|
|
1932
1926
|
options.filters = {
|
|
@@ -1948,10 +1942,15 @@ class BrandManagerHelper {
|
|
|
1948
1942
|
return '';
|
|
1949
1943
|
}
|
|
1950
1944
|
async fetchBrandsOnly(options) {
|
|
1945
|
+
let filters = {};
|
|
1946
|
+
if (options.category) {
|
|
1947
|
+
filters = await this.productCatalog.categoryStructureAdapter.buildProductFilterByCategory(options.category);
|
|
1948
|
+
}
|
|
1951
1949
|
return this.productCatalog.productCatalogRepository
|
|
1952
1950
|
.findCatalog({
|
|
1953
1951
|
fields: ['id'],
|
|
1954
1952
|
filters: {
|
|
1953
|
+
...filters,
|
|
1955
1954
|
published: { operator: Where.EQUALS, value: true },
|
|
1956
1955
|
},
|
|
1957
1956
|
options: {
|