move external links to Vue config

move external links to Vue config
This commit is contained in:
hiteshkumar87 2023-10-20 19:10:19 +05:30
parent 10b1d941ef
commit 2404c5f9f2
4 changed files with 15 additions and 5 deletions

View file

@ -21,6 +21,9 @@ const applicationConfig = {
"//" +
location.host +
"/fmg/?fmgPage=payment-method&src=concept-funnel",
GOOGLE_CALENDAR: process.env.VUE_APP_GOOGLE_CALENDAR,
YAHOO_CALENDAR: process.env.VUE_APP_YAHOO_CALENDAR,
OUTLOOK_CALENDAR: process.env.VUE_APP_OUTLOOK_CALENDAR,
};
export { applicationConfig };

View file

@ -33,6 +33,7 @@ import {
} from "@/helpers/date-helper";
import store from "@/store";
import { serviceType } from "@/constants/service-type";
import { applicationConfig } from "@/constants/application-config.js";
export default {
name: "add-to-calendar",
components: {
@ -207,8 +208,8 @@ export default {
methods: {
setCalendarAppointment(calendarOption) {
if (
calendarOption.name.includes(calendarOptions.ICAL) ||
calendarOption.name.includes(calendarOptions.OUTLOOK)
calendarOption.name == calendarOptions.ICAL ||
calendarOption.name == calendarOptions.OUTLOOK
) {
this.getAppointment();
} else {
@ -227,7 +228,7 @@ export default {
const dateFormat = "yyyyMMddTHHmmss";
const outlookComTimeSpanFormat = "yyyy-MM-ddTHH:mm:ss";
if (type == calendarOptions.OUTLOOKCOM) {
URL = `https://outlook.office.com/calendar/deeplink/compose?path=/calendar/action/compose&rru=addevent&startdt=${encodeURIComponent(
URL = `${applicationConfig.OUTLOOK_CALENDAR}&startdt=${encodeURIComponent(
getDateFormat(this.Appointment.StartDate, outlookComTimeSpanFormat)
)}&enddt=${encodeURIComponent(
getDateFormat(this.Appointment.EndDate, outlookComTimeSpanFormat)
@ -238,7 +239,7 @@ export default {
)}`;
}
if (type == calendarOptions.GOOGLE) {
URL = `https://www.google.com/calendar/render?action=TEMPLATE&text=${encodeURIComponent(
URL = `${applicationConfig.GOOGLE_CALENDAR}&text=${encodeURIComponent(
this.Appointment.Subject
)}&dates=${encodeURIComponent(
getDateFormat(this.Appointment.StartDate, dateFormat)
@ -249,7 +250,7 @@ export default {
)}&location=${encodeURIComponent(this.Appointment.Location)}&sf=true&output=xml`;
}
if (type == calendarOptions.YAHOO) {
URL = `https://calendar.yahoo.com/?v=60&TITLE=${encodeURIComponent(
URL = `${applicationConfig.YAHOO_CALENDAR}&TITLE=${encodeURIComponent(
this.Appointment.Subject
)}&DESC=${encodeURIComponent(this.Appointment.Body)}&ST=${encodeURIComponent(
getDateFormat(this.Appointment.StartDate, dateFormat)

View file

@ -6,6 +6,9 @@ process.env.VUE_APP_MY_ACCOUNT = "https://myaccountdev.safelite.com/";
//process.env.VUE_APP_SAFELITE_HOP = "http://localhost:60966/fmgCheckoutEmbedded.aspx";
process.env.VUE_APP_SAFELITE_HOP = "https://sv2-safelitehop-sys.safelite.com/fmgCheckoutEmbedded.aspx";
process.env.VUE_APP_GOOGLE_CALENDAR = "https://www.google.com/calendar/render?action=TEMPLATE";
process.env.VUE_APP_YAHOO_CALENDAR = "https://calendar.yahoo.com/?v=60";
process.env.VUE_APP_OUTLOOK_CALENDAR = "https://outlook.office.com/calendar/deeplink/compose?path=/calendar/action/compose&rru=addevent";
// GA & GTM
process.env.VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY =

View file

@ -5,6 +5,9 @@ process.env.VUE_APP_CURRENT_ENVIRONMENT = "__VUE_APP_CURRENT_ENVIRONMENT__";
process.env.VUE_APP_MY_ACCOUNT = "__VUE_APP_MY_ACCOUNT__";
process.env.VUE_APP_SAFELITE_HOP = "__VUE_APP_SAFELITE_HOP__";
process.env.VUE_APP_GOOGLE_CALENDAR = "__VUE_APP_GOOGLE_CALENDAR__";
process.env.VUE_APP_YAHOO_CALENDAR = "__VUE_APP_YAHOO_CALENDAR__";
process.env.VUE_APP_OUTLOOK_CALENDAR = "__VUE_APP_OUTLOOK_CALENDAR__";
// GA & GTM
process.env.VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY = "__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__";