fix for APP_ENABLE_ACCOUNT_LIMITS_ALL

This commit is contained in:
Dave Horton committed 2022-12-05 08:30:14 -05:00
1 parent 4535820828
commit 3da6594092
3 files changed
+26 -14

No files matched your search

+7 -3
View File
@@ -1,5 +1,6 @@
const { REACT_APP_API_BASE_URL, REACT_APP_ENABLE_ACCOUNT_LIMITS_ALL } = process.env;
export const APP_API_BASE_URL = (window.JAMBONZ) ? window.JAMBONZ.APP_API_BASE_URL : REACT_APP_API_BASE_URL;
export const APP_ENABLE_ACCOUNT_LIMITS_ALL = (window.JAMBONZ) ? window.JAMBONZ.REACT_APP_ENABLE_ACCOUNT_LIMITS_ALL : JSON.parse(REACT_APP_ENABLE_ACCOUNT_LIMITS_ALL);
export const LIMITS = [
// {
// label: "Max registered devices (0=unlimited)",
@@ -14,8 +15,9 @@ export const LIMITS = [
category: "voice_call_session",
}
];
if (REACT_APP_ENABLE_ACCOUNT_LIMITS_ALL) {
console.log(`REACT_APP_API_BASE_URL: ${REACT_APP_API_BASE_URL}, APP_ENABLE_ACCOUNT_LIMITS_ALL: ${APP_ENABLE_ACCOUNT_LIMITS_ALL}`);
console.log(`typeof APP_ENABLE_ACCOUNT_LIMITS_ALL: ${typeof APP_ENABLE_ACCOUNT_LIMITS_ALL}`);
if (APP_ENABLE_ACCOUNT_LIMITS_ALL || APP_ENABLE_ACCOUNT_LIMITS_ALL === "true") {
LIMITS.push({
label: "Licensed calls",
category: "voice_call_session_license",
@@ -28,4 +30,6 @@ export const LIMITS = [
label: "Licensed minutes",
category: "voice_call_minutes_license",
});
}
}
console.log(`LIMITS: ${JSON.stringify(LIMITS)}`);