diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c94a22456..1e1a023b0 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -110,18 +110,6 @@ stages: clearFolder: true deployFolder: "" region: us-east-2 - appDeployVariables: - __VUE_APP_CONSUMER_CF_DISTRO__: $(__VUE_APP_CONSUMER_CF_DISTRO__) - __VUE_APP_GOOGLE_PLACES_API_KEY__: $(__VUE_APP_GOOGLE_PLACES_API_KEY__) - __VUE_APP_HERITAGE_FUNNEL__: $(__VUE_APP_HERITAGE_FUNNEL__) - __VUE_APP_SAFELITE_HOP__: $(__VUE_APP_SAFELITE_HOP__) - __VUE_APP_CURRENT_ENVIRONMENT__: $(__VUE_APP_CURRENT_ENVIRONMENT__) - __VUE_APP_MY_ACCOUNT__: $(__VUE_APP_MY_ACCOUNT__) - __VUE_APP_SESSION_TIMEOUT_MINUTES__: $(__VUE_APP_SESSION_TIMEOUT_MINUTES__) - indexDeployVariables: - __VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__: $(__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__) - __VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__: $(__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__) - __VUE_APP_SOLARWINDS_MONITORING_SCRIPT__: $(__VUE_APP_SOLARWINDS_MONITORING_SCRIPT__) - template: templates/digital/invalidate-cloudfront-cache.yml@AzureDevOps parameters: awsCliContainer: awscli @@ -171,18 +159,6 @@ stages: clearFolder: true deployFolder: "" region: us-east-2 - appDeployVariables: - __VUE_APP_CONSUMER_CF_DISTRO__: $(__VUE_APP_CONSUMER_CF_DISTRO__) - __VUE_APP_GOOGLE_PLACES_API_KEY__: $(__VUE_APP_GOOGLE_PLACES_API_KEY__) - __VUE_APP_HERITAGE_FUNNEL__: $(__VUE_APP_HERITAGE_FUNNEL__) - __VUE_APP_SAFELITE_HOP__: $(__VUE_APP_SAFELITE_HOP__) - __VUE_APP_CURRENT_ENVIRONMENT__: $(__VUE_APP_CURRENT_ENVIRONMENT__) - __VUE_APP_MY_ACCOUNT__: $(__VUE_APP_MY_ACCOUNT__) - __VUE_APP_SESSION_TIMEOUT_MINUTES__: $(__VUE_APP_SESSION_TIMEOUT_MINUTES__) - indexDeployVariables: - __VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__: $(__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__) - __VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__: $(__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__) - __VUE_APP_SOLARWINDS_MONITORING_SCRIPT__: $(__VUE_APP_SOLARWINDS_MONITORING_SCRIPT__) - template: templates/digital/invalidate-cloudfront-cache.yml@AzureDevOps parameters: awsCliContainer: awscli @@ -232,18 +208,6 @@ stages: clearFolder: true deployFolder: "" region: us-east-2 - appDeployVariables: - __VUE_APP_CONSUMER_CF_DISTRO__: $(__VUE_APP_CONSUMER_CF_DISTRO__) - __VUE_APP_GOOGLE_PLACES_API_KEY__: $(__VUE_APP_GOOGLE_PLACES_API_KEY__) - __VUE_APP_HERITAGE_FUNNEL__: $(__VUE_APP_HERITAGE_FUNNEL__) - __VUE_APP_SAFELITE_HOP__: $(__VUE_APP_SAFELITE_HOP__) - __VUE_APP_CURRENT_ENVIRONMENT__: $(__VUE_APP_CURRENT_ENVIRONMENT__) - __VUE_APP_MY_ACCOUNT__: $(__VUE_APP_MY_ACCOUNT__) - __VUE_APP_SESSION_TIMEOUT_MINUTES__: $(__VUE_APP_SESSION_TIMEOUT_MINUTES__) - indexDeployVariables: - __VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__: $(__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__) - __VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__: $(__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__) - __VUE_APP_SOLARWINDS_MONITORING_SCRIPT__: $(__VUE_APP_SOLARWINDS_MONITORING_SCRIPT__) - template: templates/digital/invalidate-cloudfront-cache.yml@AzureDevOps parameters: awsCliContainer: awscli @@ -293,18 +257,6 @@ stages: clearFolder: true deployFolder: "" region: us-east-2 - appDeployVariables: - __VUE_APP_CONSUMER_CF_DISTRO__: $(__VUE_APP_CONSUMER_CF_DISTRO__) - __VUE_APP_GOOGLE_PLACES_API_KEY__: $(__VUE_APP_GOOGLE_PLACES_API_KEY__) - __VUE_APP_HERITAGE_FUNNEL__: $(__VUE_APP_HERITAGE_FUNNEL__) - __VUE_APP_SAFELITE_HOP__: $(__VUE_APP_SAFELITE_HOP__) - __VUE_APP_CURRENT_ENVIRONMENT__: $(__VUE_APP_CURRENT_ENVIRONMENT__) - __VUE_APP_MY_ACCOUNT__: $(__VUE_APP_MY_ACCOUNT__) - __VUE_APP_SESSION_TIMEOUT_MINUTES__: $(__VUE_APP_SESSION_TIMEOUT_MINUTES__) - indexDeployVariables: - __VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__: $(__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__) - __VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__: $(__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__) - __VUE_APP_SOLARWINDS_MONITORING_SCRIPT__: $(__VUE_APP_SOLARWINDS_MONITORING_SCRIPT__) - template: templates/digital/invalidate-cloudfront-cache.yml@AzureDevOps parameters: awsCliContainer: awscli diff --git a/environment-variables.js b/environment-variables.js new file mode 100644 index 000000000..4d894b006 --- /dev/null +++ b/environment-variables.js @@ -0,0 +1,23 @@ +// DEFINE every environment variable we will use here, +// with a default value to use in local development and unit tests. +// +// Default values will not be used when we deploy to prod or non-prod. +const environmentVariables = { + ['__VUE_APP_CONSUMER_CF_DISTRO__']: "https://digitalapi.dev.safelite.io", + ['__VUE_APP_CURRENT_ENVIRONMENT__']: "Localhost", + ['__VUE_APP_GOOGLE_PLACES_API_KEY__']: "AIzaSyDptGCkOPgN2uWJOy4ou4M33phRD4MAoJo", + ['__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__']: "https://www.googletagmanager.com/ns.html?id=GTM-M6XCRH>m_auth=amlAYNhxUxuskQo7jmjadg>m_preview=env-38>m_cookies_win=x", + ['__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__']: "(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl+ '>m_auth=amlAYNhxUxuskQo7jmjadg>m_preview=env-38>m_cookies_win=x';f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-M6XCRH');", + ['__VUE_APP_HERITAGE_FUNNEL__']: "https://fixmyglassdev.safelite.com/default.aspx", + ['__VUE_APP_MY_ACCOUNT__']: "https://myaccountdev.safelite.com/", + ['__VUE_APP_SAFELITE_HOP__']: "https://sv2-safelitehop-dev.safelite.com/fmgCheckoutShared.aspx", + ['__VUE_APP_SESSION_TIMEOUT_MINUTES__']: 30, + ['__VUE_APP_SOLARWINDS_MONITORING_SCRIPT__']: "", +}; + +const keysOnly = Object.keys(environmentVariables); + +module.exports = { + environmentVariablesWithoutDefaults: keysOnly, + environmentVariablesWithDefaults: environmentVariables, +}; \ No newline at end of file diff --git a/jest.config.js b/jest.config.js index b192b8784..10af0ccf0 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,3 +1,5 @@ +const { environmentVariablesWithDefaults } = require('./environment-variables.js'); + module.exports = { verbose: true, coverageReporters: ["html", "text", "jest-junit", "cobertura"], reporters: ['default', 'jest-junit'], @@ -49,3 +51,5 @@ module.exports = { // Uncomment this to avoid the massive amount of warnings we are getting for onSubmit and onInvalidSubmit //silent: true, }; + +process.env = Object.assign(process.env, environmentVariablesWithDefaults); \ No newline at end of file diff --git a/public/index.html b/public/index.html index 15cf004a2..45f83a20f 100644 --- a/public/index.html +++ b/public/index.html @@ -4,7 +4,7 @@ - + @@ -16,7 +16,7 @@ @@ -27,6 +27,6 @@
- <%= process.env.VUE_APP_SOLARWINDS_MONITORING_SCRIPT %> + <%= process.env.__VUE_APP_SOLARWINDS_MONITORING_SCRIPT__ %> diff --git a/src/constants/application-config.js b/src/constants/application-config.js index 788de3fd7..93a6f70d8 100644 --- a/src/constants/application-config.js +++ b/src/constants/application-config.js @@ -1,12 +1,12 @@ const applicationConfig = { - CONSUMER_CF_DISTRO: process.env.VUE_APP_CONSUMER_CF_DISTRO, - GOOGLE_PLACES_API_KEY: process.env.VUE_APP_GOOGLE_PLACES_API_KEY, + CONSUMER_CF_DISTRO: process.env.__VUE_APP_CONSUMER_CF_DISTRO__, + GOOGLE_PLACES_API_KEY: process.env.__VUE_APP_GOOGLE_PLACES_API_KEY__, ANALYTICS_SESSION_TIMEOUT_MINUTES: 30, SAVED_SESSION_TIMEOUT_DAYS: 45, COOKIE_PATH: "/", - CURRENT_ENVIRONMENT: process.env.VUE_APP_CURRENT_ENVIRONMENT, // "Localhost", "Dev", "QA", and "Prod" - HERITAGE_FUNNEL: process.env.VUE_APP_HERITAGE_FUNNEL, - SAFELITE_HOP: process.env.VUE_APP_SAFELITE_HOP, + CURRENT_ENVIRONMENT: process.env.__VUE_APP_CURRENT_ENVIRONMENT__, // "Localhost", "Dev", "QA", and "Prod" + HERITAGE_FUNNEL: process.env.__VUE_APP_HERITAGE_FUNNEL__, + SAFELITE_HOP: process.env.__VUE_APP_SAFELITE_HOP__, APPLICATION_NAME: "FixMyGlass", ANALYTICS_APPLICATION_NAME: "FixMyGlassNextGen", APPLICATION_ABBREVIATION: "fmg", @@ -14,7 +14,7 @@ const applicationConfig = { SITE_ENTRY_TRIGGER_VALUE: "FixMyGlass", CASH_PARENT_ACCOUNT_NUMBER: 167132, CASH_DEFAULT_BILL_TO_ACCOUNT_NUMBER: "87291", - MY_ACCOUNT: process.env.VUE_APP_MY_ACCOUNT, + MY_ACCOUNT: process.env.__VUE_APP_MY_ACCOUNT__, PIA_RESPONSE_URL: location.protocol + "//" + location.host + "/fmg/payment-pia-return?src=concept-funnel", PIA_CANCEL_URL: @@ -29,7 +29,7 @@ const applicationConfig = { FRONTEND_LOGGER_PATH: "/analytics/api/v1/logging", AFFILIATE_COOKIE_CONTAINING_NAME: "_Track", COOKIE_NAME_LENGTH_MAX_LIMIT: 44, - SESSION_TIMEOUT_MINUTES: process.env.VUE_APP_SESSION_TIMEOUT_MINUTES, + SESSION_TIMEOUT_MINUTES: process.env.__VUE_APP_SESSION_TIMEOUT_MINUTES__, RETURN_USER_PAGE: "/fmg/return-user", }; diff --git a/src/digital-components/date-picker/date-picker.vue b/src/digital-components/date-picker/date-picker.vue index 1a3080286..cbaba9193 100644 --- a/src/digital-components/date-picker/date-picker.vue +++ b/src/digital-components/date-picker/date-picker.vue @@ -2,16 +2,6 @@
-
- - -
-
Select a day and time
View more dates -
@@ -1028,14 +866,6 @@ export default { align-items: flex-start; text-align: left; - .duration-text-block { - text-align: left; - } - - .date-picker-header { - margin-bottom: 1.5rem; - } - fieldset { flex-grow: 1; position: relative; diff --git a/src/digital-components/textbox-question/textbox-question.vue b/src/digital-components/textbox-question/textbox-question.vue index 71f025d6f..9e0810513 100644 --- a/src/digital-components/textbox-question/textbox-question.vue +++ b/src/digital-components/textbox-question/textbox-question.vue @@ -43,7 +43,7 @@ ]" :validationRules="validationRules" @change="handleChange" - @blur="handleChange" + @blur="handleBlur" :maxlength="maxLength ? maxLength : '999'" @focus="$emit('focus', $event.target.value)" @keydown="keyDownHandler" diff --git a/src/fmg-components/cart/cart.vue b/src/fmg-components/cart/cart.vue index c1f281e3d..5a611390d 100644 --- a/src/fmg-components/cart/cart.vue +++ b/src/fmg-components/cart/cart.vue @@ -195,6 +195,7 @@ export default { name: "cart", props: { modelValue: Object, + inactivePromos: Object, damage: Object, servicePackageOptionsCmsName: String, availableVaps: Object, @@ -327,15 +328,26 @@ export default { this.lineItems.vaps = [...lineItems.vaps]; this.lineItems.promos = [...lineItems.promos]; await this.dispatchStoreAction(storeActions.SAVE_VAPS, this.lineItems.vaps, false); + + // any new promos that are also in inactive list? + const newInactivePromos = this.inactivePromos.filter((promo) => { + return this.lineItems.promos.includes(promo); + }); + this.updateInactivePromos(newInactivePromos); + await this.dispatchStoreAction( storeActions.SAVE_ACTIVE_AND_OR_INACTIVE_PROMOS, { activePromos: this.lineItems.promos, + inactivePromos: this.inactivePromos, }, false ); }, + updateInactivePromos(newInactivePromos) { + this.$emit("update:inactivePromos", newInactivePromos); + }, getPromoCodeList() { if (this.$refs["promoModalQuestion"]) { return this.$refs["promoModalQuestion"].getPromoCodeList(); diff --git a/src/helpers/heritage-integration/navigation-helper.js b/src/helpers/heritage-integration/navigation-helper.js index 90f9593b9..539d36648 100644 --- a/src/helpers/heritage-integration/navigation-helper.js +++ b/src/helpers/heritage-integration/navigation-helper.js @@ -42,12 +42,12 @@ export async function navigateToHeritageFunnel({ shouldSaveSession, pageNameToLo } if ( - (process.env.VUE_APP_HERITAGE_FUNNEL.includes("fixmyglasstest") && - process.env.VUE_APP_CURRENT_ENVIRONMENT === "Localhost") || - (process.env.VUE_APP_HERITAGE_FUNNEL.includes("fixmyglassdev") && - process.env.VUE_APP_CURRENT_ENVIRONMENT === "Localhost") || - (process.env.VUE_APP_HERITAGE_FUNNEL.includes("localhost") && - process.env.VUE_APP_CURRENT_ENVIRONMENT === "Localhost") + (applicationConfig.HERITAGE_FUNNEL.includes("fixmyglasstest") && + applicationConfig.CURRENT_ENVIRONMENT === "Localhost") || + (applicationConfig.HERITAGE_FUNNEL.includes("fixmyglassdev") && + applicationConfig.CURRENT_ENVIRONMENT === "Localhost") || + (applicationConfig.HERITAGE_FUNNEL.includes("localhost") && + applicationConfig.CURRENT_ENVIRONMENT === "Localhost") ) { heritageParms["forceEndToEndInsurance"] = true; } diff --git a/src/layouts/estimate/estimate.vue b/src/layouts/estimate/estimate.vue index 68dbe3426..5e2ff4e15 100644 --- a/src/layouts/estimate/estimate.vue +++ b/src/layouts/estimate/estimate.vue @@ -275,6 +275,7 @@ export default { } .sub-text strong { text-transform: uppercase; + font-weight: 400; } } diff --git a/src/layouts/payment-method/payment-method.spec.js b/src/layouts/payment-method/payment-method.spec.js index 3e31f88c5..76d4daa1e 100644 --- a/src/layouts/payment-method/payment-method.spec.js +++ b/src/layouts/payment-method/payment-method.spec.js @@ -6,6 +6,15 @@ import { shallowMount } from "@vue/test-utils"; import { getMountOptions } from "@/helpers/unit-test-helper.js"; import store from "@/store"; import { experimentSettings } from "@/constants/experiments"; +import { storeMutations } from "@/constants/store-mutations"; +import globalMethods from "@/global-methods"; + +globalMethods.callHttpClient = jest.fn(); + +global.crypto = { randomUUID: jest.fn() }; +const mockPriceOrderItemsAndSaveServerData = jest + .fn() + .mockResolvedValue(/* your mock return value */); // Mock our module for promises. jest.mock("@/helpers/layout-helper.js", () => ({ @@ -34,7 +43,6 @@ describe("payment-method.vue", () => { // Assert expect(wrapper.vm.$router.navigateWithoutSaving).toHaveBeenCalled(); }); - test("if the continue button is clicked, navigate forward", async () => { // Arrange const { wrapper } = setupMocks(); @@ -81,7 +89,10 @@ function setupMocks() { city: "Anytown", state: "OH", zipCode: "00000", + provider: { providerNumber: "0000567" }, }, + vehicle: { year: 2020, make: "Toyota", model: "Camry", carId: "12345" }, + damage: { isRepair: false }, }, policy: { currentDeductible: 123, @@ -101,6 +112,9 @@ function setupMocks() { store: { getters: store.getters, }, + actions: { + priceOrderItemsAndSaveServerData: mockPriceOrderItemsAndSaveServerData, + }, }); const mockMixin = { diff --git a/src/layouts/payment-method/payment-method.vue b/src/layouts/payment-method/payment-method.vue index eb75cf207..f1bb25810 100644 --- a/src/layouts/payment-method/payment-method.vue +++ b/src/layouts/payment-method/payment-method.vue @@ -22,6 +22,7 @@ :availableVaps="availableVaps" :allowItemRemoval="true" v-model="lineItems" + v-model:inactivePromos="inactivePromos" pageName="payment-method" servicePackageOptionsCmsName="ServicePackageTitle" recyclingModalCmsWidgetName="RecycleModal" @@ -263,7 +264,7 @@ export default { : (resultMap.wipers.filter((wiper) => wiper.partType == partTypeStrings.REAR_WIPER) ?? []); - const lineItemsToTax = [ + const allLineItems = [ resultMap.rainDefense, ...supportingItems, ...availableFrontWipers, @@ -272,6 +273,10 @@ export default { ...vaps, ]; + const lineItemsToTax = Array.from( + new Map(allLineItems.map((item) => [item.partNumber, item])).values() + ); + const availableVaps = [ resultMap.rainDefense, ...availableFrontWipers, @@ -542,6 +547,16 @@ export default { getPromoCodeWithoutBundleIdentifier(x.promoCode) ); + // SAVE PROMO CHANGES TO STORE + this.dispatchStoreAction( + storeActions.SAVE_ACTIVE_AND_OR_INACTIVE_PROMOS, + { + activePromos: this.lineItems.promos, + inactivePromos: this.inactivePromos, + }, + false + ); + this.$refs.loadingModal.hideModal(); }, getIsRecalAckOptInFromStore() { @@ -563,6 +578,7 @@ export default { this.paymentMethod, false ); + // save lineitems as they now have salestax added await this.dispatchStoreAction( storeActions.SAVE_GLASS_PARTS_SUPPRESSING_STATE_RESETTING, @@ -820,7 +836,7 @@ export default { isAfterpayBreakoutDisplay() { return ( this.showInsuranceCoverageAs !== coverageStatus.PENDING && - (!this.isRecalPriceRemove || !this.isRecalibrationOnOrder) && + !this.isRecalPriceRemove && this.hasSettingEqualTo(experimentSettings.DISPLAY_AFTERPAY_BREAKOUT_DISPLAY, "true") ); }, diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index 18252e66f..a3b0137f9 100644 --- a/src/layouts/quote/quote.vue +++ b/src/layouts/quote/quote.vue @@ -2,7 +2,9 @@
-
+
@@ -286,6 +288,7 @@ export default { const isEmailInStoreOnPageLoad = emailFromStore?.length > 0; const isPopupSkipped = store.getters.pageData(routeData.QUOTE.name)?.saveProgressPopupSkipped === true; + // "popup" is the automatic opening centered popup on load const showSaveProgressPopup = !(isEmailInStoreOnPageLoad || isPopupSkipped); const showSaveProgressModal = isEmailInStoreOnPageLoad ? false : true; const shouldSkipToInsurance = @@ -555,8 +558,8 @@ export default { servicePackage: null, holdParentAccountNumber: null, holdBillToAccountNumber: null, - showSaveProgressPopup: null, - showSaveProgressModal: null, + showSaveProgressPopup: null, // "popup" is the automatic opening centered popup on load + showSaveProgressModal: null, // "modal" is the user-triggered slide-in drawer isSaveProgressComplete: null, packageNumber: null, skipToInsurance: null, @@ -899,6 +902,10 @@ export default { diff --git a/src/layouts/schedule/mobile-fee-waiver-alert/mobile-fee-waiver-alert.vue b/src/layouts/schedule/mobile-fee-waiver-alert/mobile-fee-waiver-alert.vue new file mode 100644 index 000000000..7b560d4ba --- /dev/null +++ b/src/layouts/schedule/mobile-fee-waiver-alert/mobile-fee-waiver-alert.vue @@ -0,0 +1,141 @@ + + + + + diff --git a/src/layouts/schedule/schedule.vue b/src/layouts/schedule/schedule.vue index 6f1cf5e8b..8f0272758 100644 --- a/src/layouts/schedule/schedule.vue +++ b/src/layouts/schedule/schedule.vue @@ -5,17 +5,16 @@
- +
- +
+
+ + +
+ { if (result.data) { @@ -524,7 +549,7 @@ export default { { availableLineItems: [result.data], }, - "schedule", + to.name, false ); } else { @@ -626,6 +651,16 @@ export default { return this.isGlassServiceableMobile; } }, + showTimeSlotQuestion() { + if ( + this.selectedDate && + this.selectedDate.includes("mobile") && + !this.isMobileSelected + ) { + this.getNewSelectedDate(); + } + return this.selectedDate && this.appointmentTypeFromAppointmentTypeQuestion; + }, isMobileStaticRecalibrationApplicable() { return ( this.displayMSR && @@ -785,6 +820,21 @@ export default { } return []; }, + selectedRouteCodeData() { + if (!this.selectedTimeSlotInfo?.timeSlot?.routeCode) { + return null; + } + return { + routeCode: this.selectedTimeSlotInfo.timeSlot.routeCode, + isPremiumAppointment: this.selectedTimeSlotInfo.isPremiumAppointment, + }; + }, + questionText() { + return this.getCmsContent("YourSafeliteShopWidget", "QuestionText"); + }, + datePickerHeaderText() { + return this.getCmsContent("DatePickerSubHeaderWidget", "HeaderText"); + }, appointmentTypeStrings() { return AppointmentTypeStrings; }, @@ -795,12 +845,12 @@ export default { // Splits content when brackets are found in text so that text can be looped through and router-link can be injected when needed return this.splitCopyOnCMSPlaceHolder(this.ChangeShopLinkText); }, - getServiceMinutesMin() { + estimatedServiceMinutesMinimum() { return this.isMobileSelected ? this.selectableDatesMobile.estimatedServiceMinutesMinimum : this.selectableDatesInshop.estimatedServiceMinutesMinimum; }, - getServiceMinutesMax() { + estimatedServiceMinutesMaximum() { return this.isMobileSelected ? this.selectableDatesMobile.estimatedServiceMinutesMaximum : this.selectableDatesInshop.estimatedServiceMinutesMaximum; @@ -820,6 +870,18 @@ export default { ); } }, + isSameDay() { + const todaysDate = new Date().toISOString().split("T")[0]; + return this.selectedDate === todaysDate; + }, + isOvernightDropoff() { + return ( + this.selectedTimeSlotInfo?.timeSlot?.routeCode && + this.selectedTimeSlotInfo.timeSlot.routeCode.includes( + RouteCodeFlags.OVERNIGHT_DROP_OFF + ) + ); + }, }, methods: { splitCopyOnCMSPlaceHolder, @@ -1305,7 +1367,7 @@ export default { ) { navigateToHeritageFunnel({ shouldSaveSession: false, - pageNameToLog: "service-location", + pageNameToLog: this.pageName, navType: "back", }); } else { @@ -1558,22 +1620,46 @@ export default { } }, updateTimeSlot(timeSlotObj) { - if (this.preSelectedDate && !timeSlotObj?.timeSlot?.date) return; - this.selectedTimeSlotInfo = timeSlotObj; + if (!timeSlotObj?.routeCode) { + this.appointmentType = AppointmentTypeStrings.IN_SHOP_OR_DROP_OFF; + this.selectedTimeSlotInfo = { + timeSlot: { + date: null, + routeCode: null, + startTime: null, + endTime: null, + jobMaxMinutes: null, + jobMinMinutes: null, + }, + isPremiumAppointment: null, + }; + return; + } + const timeSlot = this.timeSlotsForSelectedDate?.timeSlots?.find( + (slot) => slot.id == timeSlotObj.routeCode + ); + + this.selectedTimeSlotInfo = { + timeSlot: { + date: this.timeSlotsForSelectedDate.date, + routeCode: timeSlotObj.routeCode, + startTime: timeSlot.startTime, + endTime: timeSlot.endTime, + jobMaxMinutes: this.estimatedServiceMinutesMaximum.toString(), + jobMinMinutes: this.estimatedServiceMinutesMinimum.toString(), + }, + isPremiumAppointment: timeSlotObj.isPremiumAppointment ? true : false, + }; + if ( this.appointmentType !== AppointmentTypeStrings.MOBILE && this.appointmentType !== null ) { // update apptType based on routeCode to determine if it should be dropoff or inshop debugLog(`Updating appointment type based on route code.`); - debugLog(`Route code =`, timeSlotObj.timeSlot.routeCode); - debugLog( - `Parsed type = `, - this.getInShopOrDropOffApptType(timeSlotObj.timeSlot.routeCode) - ); - this.appointmentType = this.getInShopOrDropOffApptType( - timeSlotObj.timeSlot.routeCode - ); + debugLog(`Route code =`, timeSlotObj.routeCode); + debugLog(`Parsed type = `, this.getInShopOrDropOffApptType(timeSlotObj.routeCode)); + this.appointmentType = this.getInShopOrDropOffApptType(timeSlotObj.routeCode); } }, getInShopOrDropOffApptType(routeCode) { @@ -1607,8 +1693,13 @@ export default { }, updateSelectedProvider(newProvider) { if (newProvider) { + const didProviderNumberChange = + this.selectedProvider.providerNumber !== newProvider.providerNumber; this.selectedProvider = newProvider; - this.initializeDatePicker(); + + if (didProviderNumberChange) { + this.initializeDatePicker(); + } } else if (this.appointmentType === this.appointmentTypeStrings.MOBILE) { this.selectedProvider = { providerNumber: this.shopProviderData.mobileProviderNumber.toString(), @@ -1630,7 +1721,7 @@ export default { handleZipCodeChange(newZipCode) { this.resetMobileLocation(); - getShopProviderData(newZipCode.zipCode).then((result) => { + getShopProviderData(newZipCode.zipCode, this.pageName).then((result) => { this.shopProviderData = result.data; this.resetSelectedProvider(); this.state = newZipCode.state; @@ -1697,6 +1788,9 @@ export default { this.selectedDate = this.getSelectedDate(); this.setDisplayWaitList(); }, + getNewSelectedDate() { + this.selectedDate = this.getSelectedDate(); + }, }, watch: { appointmentTypeFromAppointmentTypeQuestion: { @@ -1740,12 +1834,15 @@ export default { datePicker, locationAlerts, textBlock, + timeSlotQuestion, alert, serviceZipModalQuestion, appointmentTypeQuestion, contentGroupModal, + durationTextBlock, shopLocation, + mobileFeeWaiverAlert, }, }; @@ -1780,12 +1877,17 @@ export default { font-weight: 600; } -:deep(.funnel-sub-header:not(.mb-5)) { +:deep(.funnel-sub-header:not(#schedule-your-service)) { h5.dark-header { font-weight: 600; font-size: 1rem; } } +:deep(.funnel-sub-header#schedule-your-service) { + h5.dark-header { + margin-bottom: 0; + } +} .col-12 a { font-family: UrbanistSemibold; diff --git a/src/layouts/schedule/time-slot-question/time-slot-question.vue b/src/layouts/schedule/time-slot-question/time-slot-question.vue index 900db972d..18f3b77d2 100644 --- a/src/layouts/schedule/time-slot-question/time-slot-question.vue +++ b/src/layouts/schedule/time-slot-question/time-slot-question.vue @@ -3,6 +3,7 @@
@@ -92,7 +94,6 @@ import { isDropOffRouteCode, militaryToTwelveHourTime, } from "@/layouts/schedule/helpers/schedule-helper"; -import { getDisplayTextForDurationLength } from "@/helpers/duration-length-helper"; // Validation import { defineRule, useField } from "vee-validate"; @@ -116,23 +117,8 @@ defineRule("time-slot-required", required(errorMessages.OPTION_REQUIRED)); export default { name: "time-slot-question", - emits: ["update:modelValue", "TimeSlotSelected", "click-event"], + emits: ["update:modelValue", "time-slot-selection-changed"], props: { - modelValue: { - type: Object, - default: () => ({ - timeSlot: { - routeCode: null, - date: null, - startTime: null, - endTime: null, - jobMaxMinutes: null, - jobMinMinutes: null, - }, - isPremiumAppointment: null, - }), - }, - cmsWidgetName: String, mobileCmsWidgetName: String, mobilePremiumCmsWidgetName: String, dropoffCmsWidgetName: String, @@ -142,21 +128,23 @@ export default { appointmentType: String, timeSlotsForSelectedDate: Object, premiumAppointmentFee: Object, - estimatedServiceMinutesMinimum: Number, - estimatedServiceMinutesMaximum: Number, validationRules: String, customComponentId: String, - selectedDate: String, + isSameDay: Boolean, displayWaitList: Boolean, + selectedRouteCodeData: Object, }, data() { return { - selectedRouteCode: null, timeSlotModalListButton: timeSlotModalListButton, - selectedAnswerForDropOffOrInshop: null, selectedAnswerForTimeSlots: null, + selectedAnswerForDropOffOrInshop: null, }; }, + mounted() { + this.updateDropoffAndTimeSlotAnswersFromSelectedRouteCodeData(this.selectedRouteCodeData); + this.autoSelectTimeSlotIfOnlyOneIsAvailable(); + }, setup(props) { const uuid = uuidv4(); const componentId = !props.customComponentId @@ -186,20 +174,33 @@ export default { errors, }; }, + watch: { + waitListRequested(newVal) { + if (newVal) { + this.$nextTick(() => { + this.scrollToSuccessMessage(); + }); + } + }, + selectedRouteCodeData(newValue) { + this.updateDropoffAndTimeSlotAnswersFromSelectedRouteCodeData(newValue); + }, + timeSlotsForSelectedDate() { + this.selectedAnswerForDropOffOrInshop = null; + this.selectedAnswerForTimeSlots = null; + this.autoSelectTimeSlotIfOnlyOneIsAvailable(); + }, + }, computed: { supplementalInformationBlock() { let appointmentTypeCmsWidgetName; if ( - this.selectedDate == null || this.appointmentType === AppointmentTypeStrings.IN_SHOP_OR_DROP_OFF || this.appointmentType === AppointmentTypeStrings.IN_SHOP || this.appointmentType === AppointmentTypeStrings.DROP_OFF || !this.availableTimeSlots ) { - if (!this.selectedAnswerForTimeSlots && !this.selectedAnswerForDropOffOrInshop) { - this.autoSelectTimeSlotIfOnlyOneIsAvailable(); - } return null; // This is planned to be used again for drop-off // Wrote this to be ready for that eventuality, is untested and no HTML work done yet @@ -214,11 +215,7 @@ export default { // ); // } } else { - if (!this.selectedAnswerForTimeSlots && this.selectedRouteCode) { - // Clearing selectedRouteCode if no time slot is selected - this.resetSelectedTimeSlot(); - } - appointmentTypeCmsWidgetName = this.selectedRouteCode?.includes( + appointmentTypeCmsWidgetName = this.selectedRouteCodeData?.routeCode?.includes( PREMIUM_TIME_SLOT_ID_FLAG ) ? this.mobilePremiumCmsWidgetName @@ -299,13 +296,6 @@ export default { // return null; // } // }, - isSameDay() { - if (!this.timeSlotsForSelectedDate) { - return false; - } - const todaysDate = new Date().toISOString().split("T")[0]; - return this.selectedDate === todaysDate; - }, availableTimeSlots() { if (!this.timeSlotsForSelectedDate) { return null; @@ -407,29 +397,60 @@ export default { }, }, methods: { - initializeComponent() { - this.setSelectedRouteCodeFromParent(); - }, - async setSelectedTimeSlot() { - this.selectedRouteCode = - this.selectedAnswerForTimeSlots || this.selectedAnswerForDropOffOrInshop; - this.$emit( - "update:modelValue", - this.getSelectedTimeSlotInfoObject(this.selectedRouteCode) - ); - }, - getRelevantDropOffCmsWidgetNameForSelectedTimeSlot( - selectedRouteCode, - isSameDayRelevant = false - ) { - if (selectedRouteCode.includes(RouteCodeFlags.OVERNIGHT_DROP_OFF)) { - return this.overnightDropOffCmsWidgetName; - } else if (selectedRouteCode.includes(RouteCodeFlags.ALL_DAY_DROP_OFF)) { - return this.isSameDay && isSameDayRelevant - ? this.sameDayDropOffCmsWidgetName - : this.dropoffCmsWidgetName; + updateDropoffAndTimeSlotAnswersFromSelectedRouteCodeData(selectedRouteCodeData) { + if (selectedRouteCodeData?.routeCode) { + let routeCode = selectedRouteCodeData.routeCode; + if (isDropOffRouteCode(routeCode)) { + this.selectedAnswerForDropOffOrInshop = routeCode; + } else { + this.selectedAnswerForDropOffOrInshop = PICK_A_TIME_BUTTON_VALUE; + if (this.selectedRouteCodeData.isPremiumAppointment) { + routeCode = this.addPremiumFlagToInput(routeCode); + } + this.selectedAnswerForTimeSlots = routeCode; + } + } else { + this.selectedAnswerForDropOffOrInshop = null; + this.selectedAnswerForTimeSlots = null; } }, + dropOffSelectionChanged(newValue) { + let newSelectedRouteCodeData = null; + if (newValue && newValue != PICK_A_TIME_BUTTON_VALUE) { + newSelectedRouteCodeData = { + routeCode: newValue, + isPremiumAppointment: false, + }; + } + this.selectedAnswerForTimeSlots = null; + this.$emit("time-slot-selection-changed", newSelectedRouteCodeData); + }, + timeSlotSelectionChanged(newValue) { + if (newValue) { + let routeCode = newValue; + let isPremiumAppointment = routeCode.includes(PREMIUM_TIME_SLOT_ID_FLAG); + if (isPremiumAppointment) { + routeCode = this.removePremiumFlagFromInput(routeCode); + } + this.$emit("time-slot-selection-changed", { + routeCode: routeCode, + isPremiumAppointment: isPremiumAppointment, + }); + } + }, + // This is unused but planned to be used again + // getRelevantDropOffCmsWidgetNameForSelectedTimeSlot( + // selectedRouteCode, + // isSameDayRelevant = false + // ) { + // if (selectedRouteCode.includes(RouteCodeFlags.OVERNIGHT_DROP_OFF)) { + // return this.overnightDropOffCmsWidgetName; + // } else if (selectedRouteCode.includes(RouteCodeFlags.ALL_DAY_DROP_OFF)) { + // return this.isSameDay && isSameDayRelevant + // ? this.sameDayDropOffCmsWidgetName + // : this.dropoffCmsWidgetName; + // } + // }, getAvailableTimeSlotsForInshop(timeSlotsForSelectedDate) { return timeSlotsForSelectedDate .filter((timeSlot) => { @@ -463,8 +484,6 @@ export default { ); } - this.resetSelectedTimeSlotIfDateChange(timeSlotsForSelectedDate); - return availableTimeSlots; }, getPremiumAppointmentTimeSlot(timeSlotData) { @@ -480,35 +499,19 @@ export default { }, }; }, - setSelectedRouteCodeFromParent() { - if (!this.modelValue?.timeSlot?.routeCode) { - return; - } - const routeCodeFromParent = this.modelValue.timeSlot.routeCode; - if (this.modelValue?.isPremiumAppointment) { - // Mobile Only - this.selectedAnswerForTimeSlots = this.addPremiumFlagToInput(routeCodeFromParent); - } else { - if (isDropOffRouteCode(routeCodeFromParent)) { - this.selectedAnswerForDropOffOrInshop = routeCodeFromParent; - } else { - this.selectedAnswerForDropOffOrInshop = PICK_A_TIME_BUTTON_VALUE; - this.selectedAnswerForTimeSlots = routeCodeFromParent; - } - } - }, getWaitListRequestedFromStore() { return store.getters.order.customer?.waitListRequested; }, autoSelectTimeSlotIfOnlyOneIsAvailable() { const numberOfOptions = this.timeSlotsForSelectedDate?.timeSlots?.length; - if (this.appointmentType && numberOfOptions === 1) { + if (numberOfOptions === 1) { if (this.availableTimeSlots.length > 0) { + // this.availableTimeSlots only returns mobile/inshop slots so we know + // the only available slot is not dropOFf this.selectedAnswerForTimeSlots = this.availableTimeSlots[0].value; } else { this.selectedAnswerForDropOffOrInshop = this.answersForDropOffQuestion[0].value; } - this.setSelectedTimeSlot(); } }, addPremiumFlagToInput(routeCode) { @@ -517,41 +520,6 @@ export default { removePremiumFlagFromInput(routeCode) { return routeCode.replace(PREMIUM_TIME_SLOT_ID_FLAG, ""); }, - getSelectedTimeSlotInfoObject(routeCode) { - const routeCodeIncludesPremium = routeCode?.includes(PREMIUM_TIME_SLOT_ID_FLAG); - if (routeCodeIncludesPremium) { - routeCode = this.removePremiumFlagFromInput(routeCode); - } - const timeSlot = this.timeSlotsForSelectedDate?.timeSlots?.find( - (slot) => slot.id == routeCode - ); - - if (timeSlot) { - return { - timeSlot: { - date: this.timeSlotsForSelectedDate.date, - routeCode: timeSlot.id, - startTime: timeSlot.startTime, - endTime: timeSlot.endTime, - jobMaxMinutes: this.estimatedServiceMinutesMaximum?.toString() || null, - jobMinMinutes: this.estimatedServiceMinutesMinimum?.toString() || null, - }, - isPremiumAppointment: routeCodeIncludesPremium ? true : false, - }; - } - - return { - timeSlot: { - date: null, - routeCode: null, - startTime: null, - endTime: null, - jobMaxMinutes: null, - jobMinMinutes: null, - }, - isPremiumAppointment: null, - }; - }, waitListChecked(event) { this.$emit("waitListRequested", event.target.checked); }, @@ -561,65 +529,6 @@ export default { successMessageElement.scrollIntoView({ behavior: "smooth" }); } }, - resetSelectedTimeSlotIfDateChange(timeSlotsForSelectedDate) { - if (this.selectedRouteCode) { - const selectedRouteCodeString = this.selectedRouteCode.replace( - PREMIUM_TIME_SLOT_ID_FLAG, - "" - ); - const matchingTimeSlot = timeSlotsForSelectedDate.find((slot) => { - return slot.id === selectedRouteCodeString; - }); - if (!matchingTimeSlot) { - this.resetSelectedTimeSlot(); - } - } - }, - resetSelectedTimeSlot() { - this.selectedRouteCode = null; - }, - }, - watch: { - waitListRequested(newVal) { - if (newVal) { - this.$nextTick(() => { - this.scrollToSuccessMessage(); - }); - } - }, - modelValue: { - handler(newValue) { - this.handleChange(newValue); - }, - deep: true, - }, - selectedDate: { - handler() { - this.resetSelectedTimeSlot(); - this.selectedAnswerForDropOffOrInshop = null; - this.selectedAnswerForTimeSlots = null; - this.autoSelectTimeSlotIfOnlyOneIsAvailable(); - }, - }, - selectedRouteCode(newValue) { - if (newValue) { - this.setSelectedTimeSlot(); - } - }, - selectedAnswerForDropOffOrInshop(newValue) { - if (newValue == PICK_A_TIME_BUTTON_VALUE) { - this.selectedRouteCode = null; - this.setSelectedTimeSlot(); - } else { - this.selectedAnswerForTimeSlots = null; - this.selectedRouteCode = newValue; - } - }, - selectedAnswerForTimeSlots(newValue) { - if (newValue) { - this.selectedRouteCode = newValue; - } - }, }, components: { textBlock, diff --git a/src/layouts/service-location/helpers/service-location-helper/service-location-helper.js b/src/layouts/service-location/helpers/service-location-helper/service-location-helper.js index 3b81966cc..602fff0e3 100644 --- a/src/layouts/service-location/helpers/service-location-helper/service-location-helper.js +++ b/src/layouts/service-location/helpers/service-location-helper/service-location-helper.js @@ -7,8 +7,8 @@ export async function getPricedMobileFeePart(serviceZipCode, pageNameToLog) { return null; } - const zipCodeData = await getZipCodeData(serviceZipCode); - const providerData = await getShopProviderData(serviceZipCode); + const zipCodeData = await getZipCodeData(serviceZipCode, pageNameToLog); + const providerData = await getShopProviderData(serviceZipCode, pageNameToLog); // Get the Mobile Fee Part const mobileFeePart = await baseMixin.methods.dispatchStoreActionWithLogging( @@ -50,7 +50,7 @@ export async function getPricedRecycleFeePart(serviceZipCode, pageNameToLog) { return null; } - const zipCodeData = await getZipCodeData(serviceZipCode); + const zipCodeData = await getZipCodeData(serviceZipCode, pageNameToLog); // Get supporting items const supportingItems = await baseMixin.methods.dispatchStoreActionWithLogging( @@ -102,23 +102,23 @@ export async function getServiceabilityDetails(serviceZipCode, lineItems, pageNa ); } -export async function getBillToAccountNumber(providerNumber) { +export async function getBillToAccountNumber(providerNumber, pageNameToLog) { // Get the BillTo Account Number return await baseMixin.methods.dispatchStoreActionWithLogging( storeActions.GET_BILL_TO_ACCOUNT_NUMBER, { providerNumber: providerNumber }, - "service-location", + pageNameToLog, false ); } -export async function getShopProviderData(serviceZipCode) { +export async function getShopProviderData(serviceZipCode, pageNameToLog) { return await baseMixin.methods.dispatchStoreActionWithLogging( storeActions.GET_PROVIDERS, { serviceZipCode: serviceZipCode, }, - "service-location" + pageNameToLog ); } @@ -139,6 +139,6 @@ export async function getClosestApplicableShops(serviceZipCode, carId, pageNameT return closestShops.data; } -export async function getZipCodeData(serviceZipCode) { - return await baseMixin.methods.getZipCodeData(serviceZipCode, "service-location"); +export async function getZipCodeData(serviceZipCode, pageNameToLog) { + return await baseMixin.methods.getZipCodeData(serviceZipCode, pageNameToLog); } diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue index ccd4b1aca..4e74786f1 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue @@ -193,8 +193,7 @@ export default { return; } const zipCodeData = await this.getZipCodeData( - this.internalModel.addressQuestions.zipCode, - "service-location" + this.internalModel.addressQuestions.zipCode ); if (!zipCodeData.isValid) { @@ -216,26 +215,21 @@ export default { // retrieve mobile fee part const serviceZipCode = this.internalModel.addressQuestions.zipCode; - const mobileFeePart = await getPricedMobileFeePart( - serviceZipCode, - "service-location" - ); + const mobileFeePart = await getPricedMobileFeePart(serviceZipCode, this.pageName); // retrieve recycle fee part - const recycleFeePart = await getPricedRecycleFeePart( - serviceZipCode, - "service-location" - ); + const recycleFeePart = await getPricedRecycleFeePart(serviceZipCode, this.pageName); // retrieve serviceability details const serviceabilityDetails = await getServiceabilityDetails( serviceZipCode, null, - "service-location" + this.pageName ); const billToAccountNumber = await getBillToAccountNumber( - this.internalModel.zipCodeCtu + this.internalModel.zipCodeCtu, + this.pageName ); // update content related to service zip code diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index dd6b75d53..ee7f1797a 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -226,17 +226,17 @@ export default { const cmsContentPromise = fetchCmsContentForPage(to.name); const serviceZipCode = store.getters.order.serviceLocation.zipCode; - const zipCodeDataPromise = getZipCodeData(serviceZipCode); + const zipCodeDataPromise = getZipCodeData(serviceZipCode, to.name); const serviceabilityDetailsPromise = getServiceabilityDetails( serviceZipCode, null, - "service-location" + to.name ); - const mobileFeePartPromise = getPricedMobileFeePart(serviceZipCode, "service-location"); + const mobileFeePartPromise = getPricedMobileFeePart(serviceZipCode, to.name); - const shopProviderDataPromise = getShopProviderData(serviceZipCode); // shopQuestion.methods.loadInitialData(serviceZipCode); + const shopProviderDataPromise = getShopProviderData(serviceZipCode, to.name); // shopQuestion.methods.loadInitialData(serviceZipCode); // Settle promises and get results const promiseResultMap = [ @@ -846,7 +846,7 @@ export default { zipCode: { handler(newValue) { if (!this.navigatingForward) { - getShopProviderData(this.zipCode).then(async (result) => { + getShopProviderData(this.zipCode, this.pageName).then(async (result) => { this.shopProviderData = result.data; if (this.selectedAppointmentType === "Mobile") { this.selectedProvider = new Provider( diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue index 2ee6aac3f..d91fcd210 100644 --- a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue @@ -162,7 +162,7 @@ export default { const zipCodeData = await this.getZipCodeData( this.internalModel.zipCode, - "service-location" + this.pageName ); if (!zipCodeData.isValid) { @@ -175,7 +175,7 @@ export default { const closestShops = await getClosestApplicableShops( this.internalModel.zipCode, this.carId, - "service-location" + this.pageName ); if (!closestShops || closestShops.inShopProviders?.length === 0) { @@ -193,24 +193,25 @@ export default { const serviceZipCode = this.internalModel.zipCode; const mobileFeePart = await getPricedMobileFeePart( serviceZipCode, - "service-location" + this.pageName ); // retrieve recycle fee part const recycleFeePart = await getPricedRecycleFeePart( serviceZipCode, - "service-location" + this.pageName ); // retrieve serviceability details const serviceabilityDetails = await getServiceabilityDetails( serviceZipCode, null, - "service-location" + this.pageName ); const billToAccountNumber = await getBillToAccountNumber( - this.internalModel.zipCodeCtu + this.internalModel.zipCodeCtu, + this.pageName ); // update content related to service zip code diff --git a/src/layouts/service-location/shop-question/shop-question-popup.vue b/src/layouts/service-location/shop-question/shop-question-popup.vue index 58871decc..430c347e1 100644 --- a/src/layouts/service-location/shop-question/shop-question-popup.vue +++ b/src/layouts/service-location/shop-question/shop-question-popup.vue @@ -280,7 +280,7 @@ export default { } this.isLoading = true; - this.zipCodeData = await this.getZipCodeData(this.localZipCode, "service-location"); + this.zipCodeData = await this.getZipCodeData(this.localZipCode, this.pageName); // Add zipCode to zipCodeData as it does not come back from endpoint this.zipCodeData.zipCode = this.localZipCode; if (this.zipCodeData.isValid) { @@ -289,7 +289,7 @@ export default { const closestShops = await getClosestApplicableShops( this.localZipCode, this.$store.getters.order.vehicle.carId, - "service-location" + this.pageName ); if (!closestShops || closestShops.inShopProviders?.length === 0) { this.isLoading = false; diff --git a/src/layouts/vin-lookup/vin-lookup.vue b/src/layouts/vin-lookup/vin-lookup.vue index fbc55aa82..e849a37fb 100644 --- a/src/layouts/vin-lookup/vin-lookup.vue +++ b/src/layouts/vin-lookup/vin-lookup.vue @@ -318,10 +318,6 @@ export default { "vin-lookup" ); - // Update button "Continue with..." - this.$refs.navbar.updateButtonText( - `Continue with ${resultMap.vehicleLookupResponse.year} ${resultMap.vehicleLookupResponse.make} ${resultMap.vehicleLookupResponse.model}` - ); return this.$refs.navbar.removeLoader(); } diff --git a/src/router/constants/externalUrl-values.js b/src/router/constants/externalUrl-values.js index 5516095c4..1da839822 100644 --- a/src/router/constants/externalUrl-values.js +++ b/src/router/constants/externalUrl-values.js @@ -1,6 +1,8 @@ +import { applicationConfig } from "@/constants/application-config"; + const externalUrls = { - HERITAGE_FUNNEL: process.env.VUE_APP_HERITAGE_FUNNEL, - SAFELITE_HOP: process.env.VUE_APP_SAFELITE_HOP, + HERITAGE_FUNNEL: applicationConfig.HERITAGE_FUNNEL, + SAFELITE_HOP: applicationConfig.SAFELITE_HOP, }; export { externalUrls }; diff --git a/src/ux-components/text-link/text-link.vue b/src/ux-components/text-link/text-link.vue index 7bf3e9268..cae562b08 100644 --- a/src/ux-components/text-link/text-link.vue +++ b/src/ux-components/text-link/text-link.vue @@ -1,26 +1,21 @@