@softheon/armature 21.16.0 → 21.16.1
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.
|
@@ -6719,11 +6719,20 @@ class MarketSelectionService {
|
|
|
6719
6719
|
/**
|
|
6720
6720
|
* Select Local Environment
|
|
6721
6721
|
* Switches to local env, clearing any selected market
|
|
6722
|
+
* Gated by isLocalEnvSelectionEnabled - use this for the manual, user-facing environment toggle
|
|
6722
6723
|
*/
|
|
6723
6724
|
selectLocalEnv() {
|
|
6724
|
-
if (
|
|
6725
|
-
|
|
6725
|
+
if (!!this.isLocalEnvSelectionEnabled) {
|
|
6726
|
+
this.forceLocalEnv();
|
|
6726
6727
|
}
|
|
6728
|
+
}
|
|
6729
|
+
/**
|
|
6730
|
+
* Force Local Environment
|
|
6731
|
+
* Switches to local env, clearing any selected market, bypassing isLocalEnvSelectionEnabled
|
|
6732
|
+
* Intended for config-driven route defaults (e.g. defaultMarketPaths) that must apply to every
|
|
6733
|
+
* user regardless of the manual local-env-selection permission
|
|
6734
|
+
*/
|
|
6735
|
+
forceLocalEnv() {
|
|
6727
6736
|
this.cookieService.delete('selectedMarket', '/');
|
|
6728
6737
|
window.sessionStorage.removeItem(this.MFE_QUEUE_LOOKUP);
|
|
6729
6738
|
this.selectedMarketContext.setMarket(null);
|
|
@@ -6744,7 +6753,7 @@ class MarketSelectionService {
|
|
|
6744
6753
|
* Load Market from Cookies
|
|
6745
6754
|
*/
|
|
6746
6755
|
loadMarketFromCookies() {
|
|
6747
|
-
if (this.
|
|
6756
|
+
if (this.cookieService.get(this.LOCAL_ENV_COOKIE) === 'true') {
|
|
6748
6757
|
this.localEnvSelectedSubject.next(true);
|
|
6749
6758
|
return;
|
|
6750
6759
|
}
|