CASH-188 | Use a different applicationConfig variable
This commit is contained in:
parent
dafc79cd64
commit
1fd3aedf12
2 changed files with 2 additions and 10 deletions
|
|
@ -52,7 +52,6 @@ export function initializeSalesforceWebchatForQa() {
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!window.embedded_svc) {
|
if (!window.embedded_svc) {
|
||||||
console.log("no embedded svc found");
|
|
||||||
var s = document.createElement("script");
|
var s = document.createElement("script");
|
||||||
s.setAttribute(
|
s.setAttribute(
|
||||||
"src",
|
"src",
|
||||||
|
|
@ -63,7 +62,6 @@ export function initializeSalesforceWebchatForQa() {
|
||||||
};
|
};
|
||||||
document.body.appendChild(s);
|
document.body.appendChild(s);
|
||||||
} else {
|
} else {
|
||||||
console.log("embedded svc found");
|
|
||||||
initESW("https://service.force.com");
|
initESW("https://service.force.com");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
import { initializeSalesforceWebchatForDev } from "./salesforce-helper-dev";
|
import { initializeSalesforceWebchatForDev } from "./salesforce-helper-dev";
|
||||||
import { initializeSalesforceWebchatForQa } from "./salesforce-helper-qa";
|
import { initializeSalesforceWebchatForQa } from "./salesforce-helper-qa";
|
||||||
import { initializeSalesforceWebchatForProd } from "./salesforce-helper-prod";
|
import { initializeSalesforceWebchatForProd } from "./salesforce-helper-prod";
|
||||||
|
import { applicationConfig } from "@/constants/application-config";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "salesforceWebchat",
|
name: "salesforceWebchat",
|
||||||
|
|
@ -28,23 +29,16 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initializeSalesforceWebchat() {
|
initializeSalesforceWebchat() {
|
||||||
console.log(
|
switch (applicationConfig.CURRENT_ENVIRONMENT) {
|
||||||
"process.env.VUE_APP_CURRENT_ENVIRONMENT",
|
|
||||||
process.env.VUE_APP_CURRENT_ENVIRONMENT
|
|
||||||
);
|
|
||||||
switch (process.env.VUE_APP_CURRENT_ENVIRONMENT) {
|
|
||||||
case "Prod":
|
case "Prod":
|
||||||
console.log("Prod");
|
|
||||||
initializeSalesforceWebchatForProd();
|
initializeSalesforceWebchatForProd();
|
||||||
break;
|
break;
|
||||||
case "QA":
|
case "QA":
|
||||||
case "SysTest":
|
case "SysTest":
|
||||||
console.log("QA");
|
|
||||||
initializeSalesforceWebchatForQa();
|
initializeSalesforceWebchatForQa();
|
||||||
break;
|
break;
|
||||||
case "Dev":
|
case "Dev":
|
||||||
case "Localhost":
|
case "Localhost":
|
||||||
console.log("Dev");
|
|
||||||
initializeSalesforceWebchatForDev();
|
initializeSalesforceWebchatForDev();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue