@yomotech/view-toolkit 0.0.26 → 0.0.28
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.
|
@@ -2696,17 +2696,22 @@ class ConfigService {
|
|
|
2696
2696
|
}
|
|
2697
2697
|
async loadOktaConfig(projectName) {
|
|
2698
2698
|
try {
|
|
2699
|
+
let tenantKey = "";
|
|
2699
2700
|
let tenantName = "";
|
|
2700
|
-
let selectedTenant = "";
|
|
2701
2701
|
if (this.platform.ANDROID || this.platform.IOS) {
|
|
2702
|
+
tenantKey = await this.utilityService.getLocalStorage('tenantKey');
|
|
2702
2703
|
tenantName = await this.utilityService.getLocalStorage('tenantName');
|
|
2703
|
-
selectedTenant = await this.utilityService.getLocalStorage('selectedTenant');
|
|
2704
2704
|
}
|
|
2705
2705
|
else {
|
|
2706
|
+
tenantKey = await this.utilityService.getStorage('tenantKey');
|
|
2706
2707
|
tenantName = await this.utilityService.getStorage('tenantName');
|
|
2707
|
-
selectedTenant = await this.utilityService.getStorage('selectedTenant');
|
|
2708
2708
|
}
|
|
2709
|
-
|
|
2709
|
+
if (tenantName) {
|
|
2710
|
+
this.config = await this.couchdbService.getFileContentFromCouchDb(`${tenantName}_${projectName}`, 'environments/environment.json');
|
|
2711
|
+
}
|
|
2712
|
+
else {
|
|
2713
|
+
this.config = await this.couchdbService.getFileContentFromCouchDb(`${projectName}`, 'environments/environment.json');
|
|
2714
|
+
}
|
|
2710
2715
|
if (this.platform.ANDROID || this.platform.IOS) {
|
|
2711
2716
|
if (this.config.environment.login.mobile) {
|
|
2712
2717
|
this.setConfiguration(this.config.environment.login.mobile);
|
|
@@ -2751,17 +2756,23 @@ class ConfigService {
|
|
|
2751
2756
|
return this.config;
|
|
2752
2757
|
}
|
|
2753
2758
|
async loadKeycloakConfig(projectName) {
|
|
2759
|
+
let tenantKey = "";
|
|
2754
2760
|
let tenantName = "";
|
|
2755
|
-
let selectedTenant = "";
|
|
2756
2761
|
if (this.platform.ANDROID || this.platform.IOS) {
|
|
2762
|
+
tenantKey = await this.utilityService.getLocalStorage('tenantKey');
|
|
2757
2763
|
tenantName = await this.utilityService.getLocalStorage('tenantName');
|
|
2758
|
-
selectedTenant = await this.utilityService.getLocalStorage('selectedTenant');
|
|
2759
2764
|
}
|
|
2760
2765
|
else {
|
|
2766
|
+
tenantKey = await this.utilityService.getStorage('tenantKey');
|
|
2761
2767
|
tenantName = await this.utilityService.getStorage('tenantName');
|
|
2762
|
-
selectedTenant = await this.utilityService.getLocalStorage('selectedTenant');
|
|
2763
2768
|
}
|
|
2764
|
-
|
|
2769
|
+
let env = {};
|
|
2770
|
+
if (tenantName) {
|
|
2771
|
+
env = await this.couchdbService.getFileContentFromCouchDb(`${tenantName}_${projectName}`, 'environments/environment.json');
|
|
2772
|
+
}
|
|
2773
|
+
else {
|
|
2774
|
+
env = await this.couchdbService.getFileContentFromCouchDb(`${projectName}`, 'environments/environment.json');
|
|
2775
|
+
}
|
|
2765
2776
|
if (env?.environment?.login.type === "keycloak") {
|
|
2766
2777
|
if (this.platform.ANDROID || this.platform.IOS) {
|
|
2767
2778
|
this.keycloakConfig = {
|