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) {
|
||||
console.log("no embedded svc found");
|
||||
var s = document.createElement("script");
|
||||
s.setAttribute(
|
||||
"src",
|
||||
|
|
@ -63,7 +62,6 @@ export function initializeSalesforceWebchatForQa() {
|
|||
};
|
||||
document.body.appendChild(s);
|
||||
} else {
|
||||
console.log("embedded svc found");
|
||||
initESW("https://service.force.com");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
import { initializeSalesforceWebchatForDev } from "./salesforce-helper-dev";
|
||||
import { initializeSalesforceWebchatForQa } from "./salesforce-helper-qa";
|
||||
import { initializeSalesforceWebchatForProd } from "./salesforce-helper-prod";
|
||||
import { applicationConfig } from "@/constants/application-config";
|
||||
|
||||
export default {
|
||||
name: "salesforceWebchat",
|
||||
|
|
@ -28,23 +29,16 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
initializeSalesforceWebchat() {
|
||||
console.log(
|
||||
"process.env.VUE_APP_CURRENT_ENVIRONMENT",
|
||||
process.env.VUE_APP_CURRENT_ENVIRONMENT
|
||||
);
|
||||
switch (process.env.VUE_APP_CURRENT_ENVIRONMENT) {
|
||||
switch (applicationConfig.CURRENT_ENVIRONMENT) {
|
||||
case "Prod":
|
||||
console.log("Prod");
|
||||
initializeSalesforceWebchatForProd();
|
||||
break;
|
||||
case "QA":
|
||||
case "SysTest":
|
||||
console.log("QA");
|
||||
initializeSalesforceWebchatForQa();
|
||||
break;
|
||||
case "Dev":
|
||||
case "Localhost":
|
||||
console.log("Dev");
|
||||
initializeSalesforceWebchatForDev();
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue