simpo-component-library 3.8.12 → 3.8.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/esm2022/lib/sections/header-section/header-section.component.mjs +12 -6
- package/fesm2022/simpo-component-library.mjs +11 -5
- package/fesm2022/simpo-component-library.mjs.map +1 -1
- package/package.json +1 -1
- package/simpo-component-library-3.8.13.tgz +0 -0
- package/simpo-component-library-3.8.12.tgz +0 -0
|
@@ -17934,11 +17934,17 @@ class HeaderSectionComponent {
|
|
|
17934
17934
|
return brightness > threshold ? '#000000' : '#ffffff';
|
|
17935
17935
|
}
|
|
17936
17936
|
getCategoriesHeader() {
|
|
17937
|
-
this.restService.getCategoriesHeaderData().subscribe(
|
|
17938
|
-
|
|
17939
|
-
|
|
17940
|
-
|
|
17941
|
-
|
|
17937
|
+
this.restService.getCategoriesHeaderData().subscribe({
|
|
17938
|
+
next: (res) => {
|
|
17939
|
+
// The headers API sends the multi-store flag as `isStoreEnabled` (true only for businesses with
|
|
17940
|
+
// more than one store). `storeAvailable` is also accepted in case the API ever uses that name.
|
|
17941
|
+
this.storeAvaiable = !!(res?.data?.isStoreEnabled ?? res?.data?.storeAvailable);
|
|
17942
|
+
this.schemeAvailable = res?.data?.schemesAvailable;
|
|
17943
|
+
this.categoryList = res?.data?.categoryDetails;
|
|
17944
|
+
this.collectionList = res?.data?.itemCollections;
|
|
17945
|
+
},
|
|
17946
|
+
// If the headers API fails (e.g. a server error) keep the defaults: no store button, no category menu.
|
|
17947
|
+
error: () => { }
|
|
17942
17948
|
});
|
|
17943
17949
|
}
|
|
17944
17950
|
restrictInPages() {
|