@yomotech/view-toolkit 0.0.23 → 0.0.24

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.
@@ -2688,17 +2688,17 @@ class ConfigService {
2688
2688
  }
2689
2689
  async loadOktaConfig(projectName) {
2690
2690
  try {
2691
- let tenantKey = "";
2692
2691
  let tenantName = "";
2692
+ let selectedTenant = "";
2693
2693
  if (this.platform.ANDROID || this.platform.IOS) {
2694
- tenantKey = await this.utilityService.getLocalStorage('tenantKey');
2695
2694
  tenantName = await this.utilityService.getLocalStorage('tenantName');
2695
+ selectedTenant = await this.utilityService.getLocalStorage('selectedTenant');
2696
2696
  }
2697
2697
  else {
2698
- tenantKey = await this.utilityService.getStorage('tenantKey');
2699
2698
  tenantName = await this.utilityService.getStorage('tenantName');
2699
+ selectedTenant = await this.utilityService.getStorage('selectedTenant');
2700
2700
  }
2701
- this.config = await this.couchdbService.getFileContentFromCouchDb(`${tenantName}_${projectName}`, 'environments/environment.json');
2701
+ this.config = await this.couchdbService.getFileContentFromCouchDb(`${tenantName ? tenantName : selectedTenant}_${projectName}`, 'environments/environment.json');
2702
2702
  if (this.platform.ANDROID || this.platform.IOS) {
2703
2703
  if (this.config.environment.login.mobile) {
2704
2704
  this.setConfiguration(this.config.environment.login.mobile);
@@ -2743,17 +2743,17 @@ class ConfigService {
2743
2743
  return this.config;
2744
2744
  }
2745
2745
  async loadKeycloakConfig(projectName) {
2746
- let tenantKey = "";
2747
2746
  let tenantName = "";
2747
+ let selectedTenant = "";
2748
2748
  if (this.platform.ANDROID || this.platform.IOS) {
2749
- tenantKey = await this.utilityService.getLocalStorage('tenantKey');
2750
2749
  tenantName = await this.utilityService.getLocalStorage('tenantName');
2750
+ selectedTenant = await this.utilityService.getLocalStorage('selectedTenant');
2751
2751
  }
2752
2752
  else {
2753
- tenantKey = await this.utilityService.getStorage('tenantKey');
2754
2753
  tenantName = await this.utilityService.getStorage('tenantName');
2754
+ selectedTenant = await this.utilityService.getStorage('selectedTenant');
2755
2755
  }
2756
- const env = await this.couchdbService.getFileContentFromCouchDb(`${tenantName}_${projectName}`, 'environments/environment.json');
2756
+ const env = await this.couchdbService.getFileContentFromCouchDb(`${tenantName ? tenantName : selectedTenant}_${projectName}`, 'environments/environment.json');
2757
2757
  if (env?.environment?.login.type === "keycloak") {
2758
2758
  if (this.platform.ANDROID || this.platform.IOS) {
2759
2759
  this.keycloakConfig = {