WEB-313 Fix server selector (#2656)
Co-authored-by: Soporte <soporte@MacBook-Pro-de-Fintecheando.local>
This commit is contained in:
@@ -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 -->
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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'] = '';
|
||||
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ export default {
|
||||
'mifos_x': {
|
||||
'version': '250828',
|
||||
'hash': 'b92f79e2'
|
||||
},
|
||||
'allow_switching_backend_instance': true
|
||||
}
|
||||
};
|
||||
/* tslint:enable */
|
||||
|
||||
@@ -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: '',
|
||||
|
||||
@@ -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: '',
|
||||
|
||||
Reference in New Issue
Block a user