@yomotech/view-toolkit 0.0.25 → 0.0.27
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.
|
@@ -365,7 +365,15 @@ class UtilityService {
|
|
|
365
365
|
}
|
|
366
366
|
else {
|
|
367
367
|
const value = localStorage.getItem(key);
|
|
368
|
-
|
|
368
|
+
if (value === null) {
|
|
369
|
+
return null;
|
|
370
|
+
}
|
|
371
|
+
try {
|
|
372
|
+
return JSON.parse(value);
|
|
373
|
+
}
|
|
374
|
+
catch {
|
|
375
|
+
return value;
|
|
376
|
+
}
|
|
369
377
|
}
|
|
370
378
|
}
|
|
371
379
|
async showAllProjects() {
|
|
@@ -2696,9 +2704,11 @@ class ConfigService {
|
|
|
2696
2704
|
}
|
|
2697
2705
|
else {
|
|
2698
2706
|
tenantName = await this.utilityService.getStorage('tenantName');
|
|
2699
|
-
selectedTenant = await this.utilityService.
|
|
2707
|
+
selectedTenant = await this.utilityService.getLocalStorage('selectedTenant');
|
|
2700
2708
|
}
|
|
2701
|
-
|
|
2709
|
+
let tenant = tenantName ? tenantName : selectedTenant;
|
|
2710
|
+
console.log('tenant2: ', tenant);
|
|
2711
|
+
this.config = await this.couchdbService.getFileContentFromCouchDb(`${tenant}_${projectName}`, 'environments/environment.json');
|
|
2702
2712
|
if (this.platform.ANDROID || this.platform.IOS) {
|
|
2703
2713
|
if (this.config.environment.login.mobile) {
|
|
2704
2714
|
this.setConfiguration(this.config.environment.login.mobile);
|
|
@@ -2753,7 +2763,9 @@ class ConfigService {
|
|
|
2753
2763
|
tenantName = await this.utilityService.getStorage('tenantName');
|
|
2754
2764
|
selectedTenant = await this.utilityService.getLocalStorage('selectedTenant');
|
|
2755
2765
|
}
|
|
2756
|
-
|
|
2766
|
+
let tenant = tenantName ? tenantName : selectedTenant;
|
|
2767
|
+
console.log('tenant1: ', tenant);
|
|
2768
|
+
const env = await this.couchdbService.getFileContentFromCouchDb(`${tenant}_${projectName}`, 'environments/environment.json');
|
|
2757
2769
|
if (env?.environment?.login.type === "keycloak") {
|
|
2758
2770
|
if (this.platform.ANDROID || this.platform.IOS) {
|
|
2759
2771
|
this.keycloakConfig = {
|