WEB-313 Fix server selector (#2656)

Co-authored-by: Soporte <soporte@MacBook-Pro-de-Fintecheando.local>
This commit is contained in:
EmanuelCR03
2025-09-17 01:47:40 -06:00
committed by GitHub
co-authored by Soporte
parent 5e7fb6743d
commit 87f1639768
7 changed files with 14 additions and 8 deletions
+1 -4
View File
@@ -43,10 +43,7 @@
<div class="layout-row-reverse">
<mifosx-language-selector class="p-t-10 p-r-10 width-40"></mifosx-language-selector>
<mifosx-theme-toggle class="p-t-10"></mifosx-theme-toggle>
<mifosx-server-selector
class="p-t-10"
*ngIf="!environment.production && environment.allowServerSwitch"
></mifosx-server-selector>
<mifosx-server-selector class="p-t-10" *ngIf="allowServerSwitch()"></mifosx-server-selector>
</div>
<!-- Logo with Organization Name -->
+4
View File
@@ -110,4 +110,8 @@ export class LoginComponent implements OnInit, OnDestroy {
displayTenantSelector(): boolean {
return environment.displayTenantSelector === 'false' ? false : true;
}
allowServerSwitch(): boolean {
return environment.allowServerSwitch === 'false' ? false : true;
}
}
+3
View File
@@ -20,6 +20,9 @@
// Char delimiter to Export CSV options: ',' ';' '|' ' '
window['env']['defaultCharDelimiter'] = '';
// Display or not the Server Selector
window['env']['allowServerSwitch'] = '';
// Display or not the BackEnd Info
window['env']['displayBackEndInfo'] = '';
+3
View File
@@ -20,6 +20,9 @@
// Char delimiter to Export CSV options: ',' ';' '|' ' '
window['env']['defaultCharDelimiter'] = '$MIFOS_DEFAULT_CHAR_DELIMITER';
// Display or not the Server Selector
window['env']['allowServerSwitch'] = '$MIFOS_ALLOW_SERVER_SWITCH_SELECTOR';
// Display or not the BackEnd Info
window['env']['displayBackEndInfo'] = '$MIFOS_DISPLAY_BACKEND_INFO';
+1 -2
View File
@@ -4,7 +4,6 @@ export default {
'mifos_x': {
'version': '250828',
'hash': 'b92f79e2'
},
'allow_switching_backend_instance': true
}
};
/* tslint:enable */
+1 -1
View File
@@ -20,7 +20,7 @@ export const environment = {
loadedEnv['fineractApiUrl'] ||
(loadedEnv['fineractApiUrls']?.length > 0 ? loadedEnv['fineractApiUrls'].split(',')[0] : window.location.origin),
oauthServerUrl: loadedEnv['oauthServerUrl'] || loadedEnv['fineractApiUrl'] + loadedEnv['apiProvider'],
allowServerSwitch: env.allow_switching_backend_instance,
allowServerSwitch: loadedEnv.allowServerSwitch || 'true',
apiProvider: loadedEnv['apiProvider'] || '/fineract-provider/api',
apiVersion: loadedEnv['apiVersion'] || '/v1',
serverUrl: '',
+1 -1
View File
@@ -24,7 +24,7 @@ export const environment = {
baseApiUrl:
loadedEnv.fineractApiUrl ||
(loadedEnv.fineractApiUrls?.length > 0 ? loadedEnv.fineractApiUrls.split(',')[0] : window.location.origin),
allowServerSwitch: env.allow_switching_backend_instance,
allowServerSwitch: loadedEnv.allowServerSwitch || 'true',
apiProvider: loadedEnv.apiProvider || '/fineract-provider/api',
apiVersion: loadedEnv.apiVersion || '/v1',
serverUrl: '',