forked from openMF/web-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenvironment.ts
More file actions
88 lines (79 loc) · 3.96 KB
/
environment.ts
File metadata and controls
88 lines (79 loc) · 3.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
// The file contents for the current environment will overwrite these during build.
// The build system defaults to the dev environment which uses `environment.ts`, but if you do
// `ng build --env=prod` then `environment.prod.ts` will be used instead.
// The list of which env maps to which file can be found in `angular.json`.
// `.env.ts` is generated by the `npm run env` command
import env from './.env';
// The `window.env` object is loaded in the `index.html` file
const loadedEnv = window.env || {};
export const environment = {
production: false,
version: env.mifos_x.version,
hash: env.mifos_x.hash,
// For connecting to server running elsewhere update the tenant identifier
fineractPlatformTenantId: loadedEnv.fineractPlatformTenantId || 'default',
fineractPlatformTenantIds: loadedEnv.fineractPlatformTenantIds || 'default',
// For connecting to others servers running elsewhere update the base API URL
baseApiUrls:
loadedEnv.fineractApiUrls ||
'https://sandbox.mifos.community,https://demo.mifos.community,https://localhost:8443,' + window.location.origin,
// For connecting to server running elsewhere set the base API URL
baseApiUrl:
loadedEnv.fineractApiUrl ||
(loadedEnv.fineractApiUrls?.length > 0 ? loadedEnv.fineractApiUrls.split(',')[0] : window.location.origin),
allowServerSwitch: loadedEnv.allowServerSwitch || 'true',
apiProvider: loadedEnv.apiProvider || '/fineract-provider/api',
apiVersion: loadedEnv.apiVersion || '/v1',
apiActuator: loadedEnv.apiActuator || '/fineract-provider',
serverUrl: '',
/** Feature flag for Remember Me functionality */
enableRememberMe: false,
oauth: {
enabled: loadedEnv.oauthServerEnabled === true,
serverUrl: loadedEnv.oauthServerUrl || '',
logoutUrl: loadedEnv.oauthServerLogoutUrl || '',
appId: loadedEnv.oauthAppId || '',
authorizeUrl: loadedEnv.oauthAuthorizeUrl || '',
tokenUrl: loadedEnv.oauthTokenUrl || '',
redirectUri: loadedEnv.oauthRedirectUri || '',
scope: loadedEnv.oauthScope || ''
},
warningDialog: {
title: 'Warning',
content:
'This system is for authorized use only. Unauthorized access will result in possible legal action. By accessing this system, you acknowledge that you are authorized to do so and that all data stored and processed here is confidential.',
buttonText: 'Close'
},
defaultLanguage: loadedEnv.defaultLanguage || 'en-US',
supportedLanguages:
loadedEnv.supportedLanguages || 'cs-CS,de-DE,en-US,es-MX,fr-FR,it-IT,ko-KO,lt-LT,lv-LV,ne-NE,pt-PT,sw-SW',
preloadClients: loadedEnv['preloadClients'] || true,
defaultCharDelimiter: loadedEnv.defaultCharDelimiter || ',',
displayBackEndInfo: loadedEnv.displayBackEndInfo || 'true',
displayTenantSelector: loadedEnv.displayTenantSelector || 'true',
tenantLogoUrl: loadedEnv.tenantLogoUrl || 'assets/images/mifos_lg-logo.png',
// Time in seconds, default 60 seconds
waitTimeForNotifications: loadedEnv.waitTimeForNotifications || 60,
// Time in seconds, default 30 seconds
waitTimeForCOBCatchUp: loadedEnv.waitTimeForCOBCatchUp || 30,
session: {
timeout: {
idleTimeout: loadedEnv.sessionIdleTimeout || 300000 // 5 minutes
}
},
httpCacheEnabled: loadedEnv.httpCacheEnabled || false,
vNextApiUrl: window.env?.vNextApiUrl || 'https://apis.flexcore.mx',
vNextApiProvider: window.env?.vNextApiProvider || '/vnext1',
vNextApiVersion: window.env?.vNextApiVersion || '/v1.0',
interbankTransfers: window.env?.interbankTransfers || false,
minPasswordLength: loadedEnv.minPasswordLength || 12,
OIDC: {
oidcServerEnabled: window['env']['oidcServerEnabled'] === true || window['env']['oidcServerEnabled'] === 'true',
oidcBaseUrl: window['env']['oidcBaseUrl'] || '',
oidcClientId: window['env']['oidcClientId'] || '',
oidcApiUrl: window['env']['oidcApiUrl'] || '',
oidcFrontUrl: window['env']['oidcFrontUrl'] || ''
}
};
// Server URL
environment.serverUrl = `${environment.baseApiUrl}${environment.apiProvider}${environment.apiVersion}`;