diff --git a/src/App.vue b/src/App.vue
index 3d7d6dd2f..045a28bf8 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -39,6 +39,9 @@ export default {
funnelFooter,
salesforceWebchat,
},
+ mounted() {
+ showFmgLoadingModal(true);
+ },
};
// Add a global Javascript exception handler for logging exceptions, this handler will log when there is an uncaught exception
diff --git a/src/constants/application-config.js b/src/constants/application-config.js
index 14f195cfc..788de3fd7 100644
--- a/src/constants/application-config.js
+++ b/src/constants/application-config.js
@@ -6,6 +6,7 @@ const applicationConfig = {
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,
APPLICATION_NAME: "FixMyGlass",
ANALYTICS_APPLICATION_NAME: "FixMyGlassNextGen",
APPLICATION_ABBREVIATION: "fmg",
@@ -15,21 +16,12 @@ const applicationConfig = {
CASH_DEFAULT_BILL_TO_ACCOUNT_NUMBER: "87291",
MY_ACCOUNT: process.env.VUE_APP_MY_ACCOUNT,
PIA_RESPONSE_URL:
- location.protocol +
- "//" +
- location.host +
- "/fmg/?fmgPage=payment-pia-return&src=concept-funnel",
+ location.protocol + "//" + location.host + "/fmg/payment-pia-return?src=concept-funnel",
PIA_CANCEL_URL:
- location.protocol +
- "//" +
- location.host +
- "/fmg/?fmgPage=payment-method&src=concept-funnel",
+ location.protocol + "//" + location.host + "/fmg/payment-method?src=concept-funnel",
PIA_ERROR_URL:
- location.protocol +
- "//" +
- location.host +
- "/fmg/?fmgPage=payment-pia-return&src=concept-funnel",
- CONFIRMATION_URL: location.protocol + "//" + location.host + "/fmg/?fmgPage=confirmation",
+ location.protocol + "//" + location.host + "/fmg/payment-pia-return?src=concept-funnel",
+ CONFIRMATION_URL: location.protocol + "//" + location.host + "/fmg/confirmation",
GOOGLE_CALENDAR: "https://www.google.com/calendar/render?action=TEMPLATE",
YAHOO_CALENDAR: "https://calendar.yahoo.com/?v=60",
OUTLOOK_CALENDAR:
@@ -38,7 +30,7 @@ const applicationConfig = {
AFFILIATE_COOKIE_CONTAINING_NAME: "_Track",
COOKIE_NAME_LENGTH_MAX_LIMIT: 44,
SESSION_TIMEOUT_MINUTES: process.env.VUE_APP_SESSION_TIMEOUT_MINUTES,
- RETURN_USER_PAGE: "/fmg/?fmgPage=return-user",
+ RETURN_USER_PAGE: "/fmg/return-user",
};
export { applicationConfig };
diff --git a/src/constants/store-actions.js b/src/constants/store-actions.js
index 7b76d4064..9f0965480 100644
--- a/src/constants/store-actions.js
+++ b/src/constants/store-actions.js
@@ -117,6 +117,7 @@ const storeActions = {
UPDATE_EXTERNAL_PARAMETER_MMS: "updateExternalParameterMMS",
SAVE_LOGGING_OPTION: "saveLoggingOption",
+ UPDATE_HAS_TRIGGERED_ERROR: "updateHasTriggeredError",
};
export { storeActions };
diff --git a/src/constants/store-mutations.js b/src/constants/store-mutations.js
index 5064864d0..f7e8d9f4b 100644
--- a/src/constants/store-mutations.js
+++ b/src/constants/store-mutations.js
@@ -94,6 +94,7 @@ const storeMutations = {
UPDATE_SAVE_SESSION_PROMISE: "updateSaveSessionPromise",
UPDATE_LAST_PAGE_VISITED: "updateLastPageVisited",
UPDATE_LOGGING_OPTION: "updateLoggingOption",
+ UPDATE_HAS_TRIGGERED_ERROR: "updateHasTriggeredError",
// EXPERIMENT MUTATIONS
UPDATE_EXPERIMENTS: "updateExperiments",
diff --git a/src/digital-components/button-question/button-question.spec.js b/src/digital-components/button-question/button-question.spec.js
index 3b7a4e80e..73c048936 100644
--- a/src/digital-components/button-question/button-question.spec.js
+++ b/src/digital-components/button-question/button-question.spec.js
@@ -1143,7 +1143,7 @@ describe("buttonQuestion.vue", () => {
});
function setupMocks(mountOptionsMockData = {}) {
- const defaultMountOptions = { route: { query: { fmgPage: "page-name" } } };
+ const defaultMountOptions = { route: { name: "page-name" } };
const baseMountOptions = getMountOptions(
Object.assign(defaultMountOptions, mountOptionsMockData)
);
diff --git a/src/digital-components/date-picker/date-picker.vue b/src/digital-components/date-picker/date-picker.vue
index b23ccece2..17d06d057 100644
--- a/src/digital-components/date-picker/date-picker.vue
+++ b/src/digital-components/date-picker/date-picker.vue
@@ -688,17 +688,18 @@ export default {
if (!this.months) return;
this.isLoading = true;
let monthToShow;
- let monthStartDateNum = 0;
+ let monthStartDate;
if (this.hideSomeDaysForInitialView) {
monthToShow = this.months.find(
({ isMonthThatHidesSomeDaysForInitialView }) =>
isMonthThatHidesSomeDaysForInitialView
);
+
// find the first day-hidden to become the next api call start date
- monthStartDateNum =
- monthToShow.dates.find(({ dayClasses }) => dayClasses.includes("day-hidden"))
- .dateNum - 1;
+ monthStartDate = monthToShow.dates.find(({ dayClasses }) =>
+ dayClasses.includes("day-hidden")
+ );
} else {
if (this.calendarViewDirection === "future") {
monthToShow = this.months.find((month) =>
@@ -713,9 +714,13 @@ export default {
}
}
if (monthToShow) {
+ const monthStartDateString = monthStartDate
+ ? monthStartDate.inputValue
+ : monthToShow.dates[0].inputValue;
+
// make new API call with this month's start and end dates
const moreSelectableDatesData = await this.updateSelectableDates(
- monthToShow.dates[monthStartDateNum].inputValue,
+ monthStartDateString,
monthToShow.dates[monthToShow.dates.length - 1].inputValue
);
this.isLoading = false;
@@ -854,7 +859,7 @@ export default {
}
.calendar-grid-container {
margin: 0 auto 1rem auto;
- max-width: 400px;
+ max-width: 360px;
position: relative;
transition:
height ease 2s,
@@ -864,9 +869,6 @@ export default {
justify-content: center;
align-items: center;
padding: 0;
- @include media-breakpoint-up(md) {
- padding: 0 0.75rem;
- }
opacity: 1;
.grid-item {
@@ -999,6 +1001,7 @@ export default {
min-width: 2.5rem;
width: 2.5rem;
height: 2.5rem;
+ border: 2px solid transparent;
span {
&.small {
@@ -1087,6 +1090,13 @@ export default {
input[type="radio"]:checked + label:after {
background-color: $black;
}
+ &.selectable-day {
+ label {
+ &:after {
+ display: none;
+ }
+ }
+ }
}
}
diff --git a/src/digital-components/modal/modal.vue b/src/digital-components/modal/modal.vue
index 7b89b7e57..4cc75f701 100644
--- a/src/digital-components/modal/modal.vue
+++ b/src/digital-components/modal/modal.vue
@@ -46,9 +46,7 @@
diff --git a/src/layouts/quote/quote.spec.js b/src/layouts/quote/quote.spec.js
index f132f6de1..c162017c1 100644
--- a/src/layouts/quote/quote.spec.js
+++ b/src/layouts/quote/quote.spec.js
@@ -651,7 +651,7 @@ describe("quote.vue", () => {
//Assert
expect(wrapper.vm.isInsuranceSelected).toBe(false);
});
- test("should default to cash if isCashSelected is true, despite all other checks pointing to insurance selection", async () => {
+ test("should default to cash if offer = cash, despite all other checks pointing to insurance selection", async () => {
// Also needs no query parameter or previous selection in store to be present
//Arrange
@@ -695,7 +695,7 @@ describe("quote.vue", () => {
//Act
await quote.beforeRouteEnter.call(
wrapper.vm,
- { query: { fmgPage: "quote", isInsuranceSelected: true, isCashSelected: true } },
+ { name: "quote", query: { isInsuranceSelected: true, offer: "cash" } },
undefined,
(c) => c(wrapper.vm)
);
diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue
index 663f778c1..e7039da54 100644
--- a/src/layouts/quote/quote.vue
+++ b/src/layouts/quote/quote.vue
@@ -168,18 +168,25 @@ import {
getDeviceIdValue,
} from "@/helpers/heritage-integration/cookie-helper";
import { showFmgLoadingModal } from "@/helpers/loading-modal-helper";
-import { fmgPageValues } from "@/router/router-constants/fmgPage-values";
+import { routeData } from "@/router/constants/routes";
+import { consumeQueryFromStash } from "@/router/methods/helpers/querystring-stash";
import { storeMutations } from "@/constants/store-mutations";
+import { debugLog } from "@/helpers/debug-log-helper";
defineRule("option-required", required(errorMessages.OPTION_REQUIRED));
const INSURANCE_TAB_TO_DISPLAY_THRESHOLD_DEFAULT = 300;
+const ACCEPTED_QUOTE_TYPES = {
+ CASH: "cash",
+ INSURANCE: "insurance",
+};
+
export default {
name: "quote",
async beforeRouteEnter(to, from, next) {
// Call APIs
- const cmsContentPromise = fetchCmsContentForPage(to.query.fmgPage);
+ const cmsContentPromise = fetchCmsContentForPage(to.name);
const wipersPromise = baseMixin.methods.dispatchStoreActionWithLogging(
storeActions.GET_WIPERS,
{
@@ -216,7 +223,7 @@ export default {
userId: getUserIdValue(),
deviceId: getDeviceIdValue(),
sessionKey: getSessionKeyValue(),
- pageName: to.query.fmgPage,
+ pageName: to.name,
experiment: skipQuoteExperiment,
},
"quote",
@@ -246,7 +253,7 @@ export default {
userId: getUserIdValue(),
deviceId: getDeviceIdValue(),
sessionKey: getSessionKeyValue(),
- pageName: to.query.fmgPage,
+ pageName: to.name,
experiment: afterpayBreakoutDisplayExperiment,
},
"quote",
@@ -277,7 +284,7 @@ export default {
const emailFromStore = store.getters.order.customer.emailAddress;
const isEmailInStoreOnPageLoad = emailFromStore?.length > 0;
const isPopupSkipped =
- store.getters.pageData(fmgPageValues.QUOTE)?.saveProgressPopupSkipped === true;
+ store.getters.pageData(routeData.QUOTE.name)?.saveProgressPopupSkipped === true;
const showSaveProgressPopup = !(isEmailInStoreOnPageLoad || isPopupSkipped);
const showSaveProgressModal = isEmailInStoreOnPageLoad ? false : true;
const shouldSkipToInsurance =
@@ -353,7 +360,7 @@ export default {
const oldActivePromos = store.getters.lineItems.promos?.slice(0);
const oldInactivePromos = store.getters.order.payment.inactivePromos?.slice(0);
- const promoCodeFromQueryString = getQuerystringParameter(queryStrings.PROMO);
+ const promoCodeFromQueryString = consumeQueryFromStash(queryStrings.PROMO);
const { validatePromoResponse, revalidatePromoResponse } =
await revalidatePromosAndValidateQueryStringPromo(
promoCodeFromQueryString,
@@ -403,10 +410,15 @@ export default {
}
const getIsInsuranceSelectedValue = (availableLineItems, insuranceThreshold) => {
- // query param checked here is set on insurance-selection "Pay on my own" link click
- if (to.query?.isCashSelected || to.query?.iscashselected) {
+ // Override auto-select if specified
+ const quoteTypeParam = to.query?.offer?.toLowerCase();
+
+ if (quoteTypeParam === ACCEPTED_QUOTE_TYPES.CASH) {
return false;
+ } else if (quoteTypeParam === ACCEPTED_QUOTE_TYPES.INSURANCE) {
+ return true;
}
+
const serviceLocationState = store.getters.order.serviceLocation.state;
// usually true when returning from heritage but can be false when returning from heritage on a save quote
@@ -451,9 +463,7 @@ export default {
baseMixin.methods.getTierOnePackagePrice(lineItemsNoDiscount);
// prettier-ignore
{
- if (store.getters.applicationUser.loggingOption) {
- console.log(new Date() + " quote tierOnePrice comparison: " + tierOnePrice + " > " + insuranceThreshold + "=" + (tierOnePrice > insuranceThreshold));
- }
+ debugLog("quote tierOnePrice comparison: " + tierOnePrice + " > " + insuranceThreshold + "=" + (tierOnePrice > insuranceThreshold));
}
// compare base price vs arbitrary threshold (representing insurance price)
@@ -474,21 +484,17 @@ export default {
// prettier-ignore
{
- if (store.getters.applicationUser.loggingOption) {
- console.log("------------- quote.vue thresholds start -----------------");
- console.log(new Date() + " isExternalParameter: " + isExternalParameter);
- console.log(new Date() + " internalThreshold: " + internalThreshold);
- console.log(new Date() + " externalThreshold: " + externalThreshold);
- console.log("------------- quote.vue thresholds end -----------------");
- }
+ debugLog("--- quote.vue thresholds start ---");
+ debugLog(" isExternalParameter: ", isExternalParameter);
+ debugLog(" internalThreshold: ", internalThreshold);
+ debugLog(" externalThreshold: ", externalThreshold);
+ debugLog("--- quote.vue thresholds end ---");
}
if (isExternalParameter === externalParameterStatus.NOT_SET) {
// prettier-ignore
{
- if (store.getters.applicationUser.loggingOption) {
- console.log(new Date() + "quote.vue tab select EXTERNAL not set");
- }
+ debugLog("quote.vue tab select EXTERNAL not set");
}
// there are no active or inactive external parameters; use internal threshold
if (internalThreshold) thresholdToUse = internalThreshold;
@@ -503,9 +509,7 @@ export default {
if (getBoolFromString(store.getters.externalParameterQuote?.isInsurance)) {
// prettier-ignore
{
- if (store.getters.applicationUser.loggingOption) {
- console.log(new Date() + "quote.vue tab select EXTERNAL ISINSURANCE");
- }
+ debugLog("quote.vue tab select EXTERNAL ISINSURANCE");
}
const insuranceSelection = true;
@@ -524,9 +528,7 @@ export default {
// prettier-ignore
{
- if (store.getters.applicationUser.loggingOption) {
- console.log(new Date() + "quote.vue tab select NOT EXTERNAL");
- }
+ debugLog("quote.vue tab select NOT EXTERNAL");
}
vm.isInsuranceSelected = getIsInsuranceSelectedValue(
@@ -642,16 +644,13 @@ export default {
// prettier-ignore
{
- const log = getQuerystringParameter(queryStrings.LOG);
- if (log === "true" || !preReqResult) {
- console.log("------------- quote.vue pagePrereqs start -----------------");
- console.log(new Date() + " store.getters.order.serviceLocation.zipCode: " + store.getters.order.serviceLocation?.zipCode);
- console.log(new Date() +" store.getters.order.serviceLocation.zipCodeCtu: " + store.getters.order.serviceLocation?.zipCodeCtu);
- console.log(new Date() + " store.getters.order.damage.isRepair: " + store.getters.order.damage?.isRepair);
- console.log(new Date() + " store.getters.order.lineItems?.glassParts: " + JSON.stringify(store.getters.order.lineItems?.glassParts));
- console.log(new Date() + " store.getters.order.payment.insuranceCoverage?.isVerified: " + payment?.insuranceCoverage?.isVerified);
- console.log("------------- quote.vue pagePrereqs end -----------------");
- }
+ debugLog("--- quote.vue pagePrereqs start ---", null, !preReqResult);
+ debugLog("store.getters.order.serviceLocation.zipCode:", store.getters.order.serviceLocation?.zipCode, !preReqResult);
+ debugLog("store.getters.order.serviceLocation.zipCodeCtu:", store.getters.order.serviceLocation?.zipCodeCtu, !preReqResult);
+ debugLog("store.getters.order.damage.isRepair:", store.getters.order.damage?.isRepair, !preReqResult);
+ debugLog("store.getters.order.lineItems?.glassParts:", store.getters.order.lineItems?.glassParts, !preReqResult);
+ debugLog("store.getters.order.payemt.insuranceCoverage?.isVerified:", store.getters.order.payment?.insuranceCoverage?.isVerified, !preReqResult);
+ debugLog("--- quote.vue pagePrereqs end ---", null, !preReqResult);
}
return preReqResult;
@@ -674,7 +673,7 @@ export default {
await this.dispatchStoreAction(
storeActions.SAVE_PAGE_DATA,
{
- page: fmgPageValues.QUOTE,
+ page: routeData.QUOTE.name,
data: { saveProgressPopupSkipped: true },
},
false
@@ -760,12 +759,12 @@ export default {
if (payment.isInsurance) {
this.$router.navigateWithSaving(
this.navigationScenarios.CLICKED_FORWARD_WITH_INSURANCE,
- this.$route
+ this.pageName
);
} else {
this.$router.navigateWithSaving(
this.navigationScenarios.CLICKED_FORWARD_WITH_CASH,
- this.$route
+ this.pageName
);
}
diff --git a/src/layouts/quote/service-package-question/service-package-question.vue b/src/layouts/quote/service-package-question/service-package-question.vue
index 546bb573a..2dc3e4028 100644
--- a/src/layouts/quote/service-package-question/service-package-question.vue
+++ b/src/layouts/quote/service-package-question/service-package-question.vue
@@ -292,7 +292,7 @@ export default {
})
).toFixed(2);
- if (this.hasPricingByDay()) {
+ if (this.hasPricingByDay() && !this.isAfterpayBreakoutDisplay()) {
return "$" + formattedPriceFloat;
}
return (this.isInsuranceSelected ? "As little as $" : "$") + formattedPriceFloat;
diff --git a/src/layouts/return-user/return-user.spec.js b/src/layouts/return-user/return-user.spec.js
index dc631ce62..b3d2924ca 100644
--- a/src/layouts/return-user/return-user.spec.js
+++ b/src/layouts/return-user/return-user.spec.js
@@ -13,7 +13,7 @@ import router from "@/router";
import navbar from "@/fmg-components/nav-bar/nav-bar";
import { Form } from "vee-validate";
import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
-import { navigationScenarios } from "@/router/router-constants/navigation-scenarios";
+import { navigationScenarios } from "@/router/constants/navigation-scenarios";
import { settleAllPromises } from "@/helpers/layout-helper";
import { getFunnelCookie } from "@/helpers/heritage-integration/cookie-helper";
import { deleteFunnelCookie } from "@/helpers/heritage-integration/cookie-helper";
@@ -257,7 +257,7 @@ describe("return-user.vue", () => {
// Assert
expect(wrapper.vm.$router.navigateWithoutSaving).toBeCalledWith(
navigationScenarios.CLICKED_FORWARD,
- wrapper.vm.$route
+ wrapper.vm.$route.name
);
});
test("expect functions in startOver to be called", async () => {
@@ -272,18 +272,15 @@ describe("return-user.vue", () => {
// Assert
expect(wrapper.vm.$router.navigateWithoutSaving).toBeCalledWith(
- navigationScenarios.CLICKED_FORWARD,
- wrapper.vm.$route
+ navigationScenarios.CLICKED_RESTART,
+ wrapper.vm.$route.name
);
-
- expect(dispatchStoreActionSpy).toHaveBeenCalledWith(storeActions.RESET_STATE);
- expect(deleteFunnelCookie).toHaveBeenCalled();
});
});
});
function setupMocks({ customMountOptions }) {
- const route = { query: { fmgPage: "return-user" }, params: {} };
+ const route = { name: "return-user" };
baseMixin.methods.ResetExternalParamsAndHideModal = jest.fn();
@@ -294,6 +291,7 @@ function setupMocks({ customMountOptions }) {
mountOptions.global.mocks["$store"] = store;
mountOptions.global.mocks["$router"] = router;
+ mountOptions.global.mocks.pageName = route.name;
baseMixin.methods.isFormValid = jest.fn().mockReturnValue(true);
mountOptions["attachTo"] = document.body;
diff --git a/src/layouts/return-user/return-user.vue b/src/layouts/return-user/return-user.vue
index d655a0c14..5b397ea76 100644
--- a/src/layouts/return-user/return-user.vue
+++ b/src/layouts/return-user/return-user.vue
@@ -55,7 +55,7 @@ export default {
name: "return-user",
async beforeRouteEnter(to, from, next) {
// Call APIs
- const cmsContentPromise = fetchCmsContentForPage(to.query.fmgPage);
+ const cmsContentPromise = fetchCmsContentForPage(to.name);
// Settle promises and get results
const promiseResultMap = [
{
@@ -85,22 +85,15 @@ export default {
async forwardButtonAction() {
this.$router.navigateWithoutSaving(
this.navigationScenarios.CLICKED_FORWARD,
- this.$route
+ this.pageName
);
},
async startOver() {
- this.pushEventToGA(
- this.$route.query[this.queryStrings.FMG_PAGE],
- this.GaActions.CLICKED,
- "Start over",
- true
- );
- deleteFunnelCookie();
- await this.dispatchStoreAction(storeActions.RESET_STATE);
+ this.pushEventToGA(this.pageName, this.GaActions.CLICKED, "Start over", true);
this.$router.navigateWithoutSaving(
- this.navigationScenarios.CLICKED_FORWARD,
- this.$route
+ this.navigationScenarios.CLICKED_RESTART,
+ this.pageName
);
},
},
diff --git a/src/layouts/schedule/schedule.spec.js b/src/layouts/schedule/schedule.spec.js
index f3281d34e..4b17224db 100644
--- a/src/layouts/schedule/schedule.spec.js
+++ b/src/layouts/schedule/schedule.spec.js
@@ -463,14 +463,13 @@ describe("schedule.vue...", () => {
expect(testOutput4).toBe("3:30 PM");
});
- test("getDisplayTextForMilitaryTime should return the correctly formatted string", () => {
+ test("Clicking back should fire correct navigation", () => {
// Arrange
const { wrapper } = setupMocks({});
wrapper.vm.selectableDatesData = {
days: [],
};
wrapper.vm.$router.navigateWithoutSaving = jest.fn();
- wrapper.vm.$route = "testRoute";
// Act
wrapper.vm.backButtonAction();
@@ -478,7 +477,7 @@ describe("schedule.vue...", () => {
// Assert
expect(wrapper.vm.$router.navigateWithoutSaving).toBeCalledWith(
"CLICKED_BACK",
- "testRoute"
+ "schedule"
);
});
});
@@ -598,6 +597,7 @@ const mockCmsContent = {};
function setupMocks({ customMountOptions }) {
const mountOptions = getMountOptions({
...customMountOptions,
+ route: { name: "schedule" },
});
mountOptions.global.mocks["$store"] = store;
@@ -613,6 +613,7 @@ function setupMocks({ customMountOptions }) {
},
},
];
+ mountOptions.global.mocks.pageName = "schedule";
const wrapper = shallowMount(schedule, mountOptions);
diff --git a/src/layouts/schedule/schedule.vue b/src/layouts/schedule/schedule.vue
index ae05b9358..b752a5d22 100644
--- a/src/layouts/schedule/schedule.vue
+++ b/src/layouts/schedule/schedule.vue
@@ -94,6 +94,7 @@ import { getAmountDue, getPricingByDayPartWithPrice } from "@/helpers/pricing-he
import { getItemsWithoutRecalParts } from "@/helpers/recal-helper";
import { partNumberStrings } from "@/constants/part-number-strings";
import { deepClone } from "@/helpers/object-helper";
+import { debugLog } from "@/helpers/debug-log-helper";
// DEFINE VALIDATION RULES
defineRule("date-required", required(errorMessages.DATE_REQUIRED));
@@ -267,7 +268,7 @@ export default {
}
// Set up promises
- const cmsContentPromise = fetchCmsContentForPage(to.query.fmgPage);
+ const cmsContentPromise = fetchCmsContentForPage(to.name);
const alertReasonsPromise = locationAlerts.methods.loadInitialData(
store.getters.order.serviceLocation.zipCodeCtu,
@@ -428,18 +429,15 @@ export default {
// prettier-ignore
{
- const log = getQuerystringParameter(queryStrings.LOG);
- if (log === "true" || !preReqResult) {
- console.log("------------- schedule.vue pagePrereqs start -----------------");
- console.log(new Date() + " store.getters.order.serviceLocation.zipCode: " + serviceLocation.zipCode);
- console.log(new Date() + " store.getters.order.serviceLocation.zipCodeCtu: " + serviceLocation.zipCodeCtu);
- console.log(new Date() + " store.getters.order.serviceLocation.appointmentType: " + serviceLocation.appointmentType);
- console.log(new Date() + " store.getters.order.serviceLocation.provider.providerNumber: " + serviceLocation.provider.providerNumber);
- console.log(new Date() + " store.getters.payment.isInsurance: " + store.getters.payment?.isInsurance);
- console.log(new Date() + " store.getters.order.damage.isRepair: " + store.getters.order.damage.isRepair);
- console.log(new Date() + " store.getters.order.lineItems.glassParts: " + JSON.stringify(store.getters.order.lineItems?.glassParts));
- console.log("------------- schedule.vue pagePrereqs end -------------------");
- }
+ debugLog("--- schedule.vue pagePrereqs start ---", null, !preReqResult);
+ debugLog("store.getters.order.serviceLocation.zipCode:", serviceLocation.zipCode, !preReqResult);
+ debugLog("store.getters.order.serviceLocation.zipCodeCtu:", serviceLocation.zipCodeCtu, !preReqResult);
+ debugLog("store.getters.order.serviceLocation.appointmentType:", serviceLocation.appointmentType, !preReqResult);
+ debugLog("store.getters.order.serviceLocation.provider.providerNumber:", serviceLocation.provider?.providerNumber, !preReqResult);
+ debugLog("store.getters.payment.isInsurance:", store.getters.payment?.isInsurance, !preReqResult);
+ debugLog("store.getters.order.damage.isRepair:", store.getters.order.damage?.isRepair, !preReqResult);
+ debugLog("store.getters.order.lineItems.glassParts:", store.getters.order.lineItems?.glassParts, !preReqResult);
+ debugLog("--- schedule.vue pagePrereqs end ---", null, !preReqResult);
}
return preReqResult;
},
@@ -536,7 +534,10 @@ export default {
}
},
backButtonAction() {
- this.$router.navigateWithoutSaving(this.navigationScenarios.CLICKED_BACK, this.$route);
+ this.$router.navigateWithoutSaving(
+ this.navigationScenarios.CLICKED_BACK,
+ this.pageName
+ );
},
forwardButtonAction() {
this.updateSupportingItems();
@@ -585,7 +586,10 @@ export default {
);
}
- this.$router.navigateWithSaving(this.navigationScenarios.CLICKED_FORWARD, this.$route);
+ this.$router.navigateWithSaving(
+ this.navigationScenarios.CLICKED_FORWARD,
+ this.pageName
+ );
},
setDisplayWaitList() {
if (
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 fc83f041a..f50d855f7 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
@@ -235,9 +235,11 @@ export default {
this.displayMismatchStateAndZipAlert = false;
},
async setMobileLocation() {
- this.resetAlerts();
// Validate the Zip Code
- if (this.internalModel.addressQuestions.zipCode === "") {
+ if (
+ this.internalModel.addressQuestions.zipCode === "" ||
+ this.internalModel.addressQuestions.zipCode.length !== 5
+ ) {
this.setMobileLocationInvalid(true);
return;
}
@@ -247,10 +249,12 @@ export default {
);
if (!zipCodeData.isValid) {
+ this.displayMismatchStateAndZipAlert = false;
this.displayInvalidZipAlert = true;
this.setMobileLocationInvalid(true);
return;
} else if (zipCodeData.state != this.internalModel.addressQuestions.state) {
+ this.displayInvalidZipAlert = false;
this.displayMismatchStateAndZipAlert = true;
this.setMobileLocationInvalid(true);
return;
@@ -258,6 +262,9 @@ export default {
this.internalModel.addressQuestions.zipCode !==
this.modelValue.addressQuestions.zipCode
) {
+ //reset alerts
+ this.resetAlerts();
+
// retrieve mobile fee part
const serviceZipCode = this.internalModel.addressQuestions.zipCode;
const mobileFeePart = await getPricedMobileFeePart(
@@ -292,7 +299,6 @@ export default {
}
// update the page level model
this.$emit("setMobileLocation", this.internalModel);
- this.setMobileLocationInvalid(false);
},
toggleMobileLocation() {
this.isMobileLocationOpened = !this.isMobileLocationOpened;
diff --git a/src/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question.vue b/src/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question.vue
index ce0f7ed53..b13f72ca9 100644
--- a/src/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question.vue
+++ b/src/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question.vue
@@ -57,7 +57,7 @@ export default {