Merge branch 'release/2026.02.12' into feature/CASH-611
This commit is contained in:
commit
3afd8c6021
8 changed files with 220 additions and 74 deletions
|
|
@ -32,11 +32,7 @@ module.exports = {
|
||||||
"!src/layouts/payment-pia-return/*.vue", // Temp test exclusion while in development
|
"!src/layouts/payment-pia-return/*.vue", // Temp test exclusion while in development
|
||||||
"!src/layouts/insurance/*.vue", // Temp test exclusion while in development
|
"!src/layouts/insurance/*.vue", // Temp test exclusion while in development
|
||||||
"!src/layouts/insurance-company/*.vue", // Temp test exclusion while in development
|
"!src/layouts/insurance-company/*.vue", // Temp test exclusion while in development
|
||||||
"!src/layouts/schedule/**/*.vue", // Temp test exclusion while in development
|
|
||||||
"!src/digital-components/date-picker/**/*.vue", // Temp test exclusion while in development
|
"!src/digital-components/date-picker/**/*.vue", // Temp test exclusion while in development
|
||||||
|
|
||||||
"!src/**/*-june-2025.vue", // Exclude these temporary files for CASH-845 project
|
|
||||||
|
|
||||||
"!src/layouts/insurance-company/insurance-company-question/*.vue", // Temp test exclusion while in development
|
"!src/layouts/insurance-company/insurance-company-question/*.vue", // Temp test exclusion while in development
|
||||||
"!src/experiment-components/*.vue",
|
"!src/experiment-components/*.vue",
|
||||||
// END
|
// END
|
||||||
|
|
@ -44,7 +40,7 @@ module.exports = {
|
||||||
testMatch: ["**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)"],
|
testMatch: ["**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)"],
|
||||||
coverageThreshold: {
|
coverageThreshold: {
|
||||||
global: {
|
global: {
|
||||||
statements: 64,
|
statements: 68,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// Uncomment this to avoid the massive amount of warnings we are getting for onSubmit and onInvalidSubmit
|
// Uncomment this to avoid the massive amount of warnings we are getting for onSubmit and onInvalidSubmit
|
||||||
|
|
|
||||||
|
|
@ -41,9 +41,6 @@ export default {
|
||||||
beforeUnmount() {
|
beforeUnmount() {
|
||||||
// Clean up event listeners and observers
|
// Clean up event listeners and observers
|
||||||
window.removeEventListener("sierra-chat-transfer", this._handleSierraToSalesforceTransfer);
|
window.removeEventListener("sierra-chat-transfer", this._handleSierraToSalesforceTransfer);
|
||||||
if (this._salesforceChatOpenObserver) {
|
|
||||||
this._salesforceChatOpenObserver.disconnect();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initializeSalesforceWebchat() {
|
initializeSalesforceWebchat() {
|
||||||
|
|
@ -133,6 +130,9 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
.embedded-messaging > .embeddedMessagingFrame[class~="isMaximized"] {
|
||||||
|
z-index: 9999 !important;
|
||||||
|
}
|
||||||
.dockableContainer {
|
.dockableContainer {
|
||||||
&.showDockableContainer {
|
&.showDockableContainer {
|
||||||
color: $gray-600;
|
color: $gray-600;
|
||||||
|
|
|
||||||
|
|
@ -59,14 +59,6 @@ describe("sierraWebchat.vue", () => {
|
||||||
expect(window.sierraChat.closeChatModal).toHaveBeenCalled();
|
expect(window.sierraChat.closeChatModal).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
|
||||||
it("dispatches sierra-chat-closed on handleSierraOnClose", () => {
|
|
||||||
const eventSpy = jest.spyOn(window, "dispatchEvent");
|
|
||||||
wrapper.vm.createSierraConfig().onClose();
|
|
||||||
expect(eventSpy).toHaveBeenCalledWith(
|
|
||||||
expect.objectContaining({ type: "sierra-chat-closed" })
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("dispatches sierra-chat-transfer on handleSierraOnTransfer", () => {
|
it("dispatches sierra-chat-transfer on handleSierraOnTransfer", () => {
|
||||||
const eventSpy = jest.spyOn(window, "dispatchEvent");
|
const eventSpy = jest.spyOn(window, "dispatchEvent");
|
||||||
const transfer = {
|
const transfer = {
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,20 @@ import analyticsMixin from "@/mixins/analytics-mixin";
|
||||||
import store from "@/store";
|
import store from "@/store";
|
||||||
import { routeData } from "@/router/constants/routes";
|
import { routeData } from "@/router/constants/routes";
|
||||||
import { deepClone } from "@/helpers/object-helper";
|
import { deepClone } from "@/helpers/object-helper";
|
||||||
|
import { webchatHelper } from "@/helpers/webchat-helper";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "sierraWebchat",
|
name: "sierraWebchat",
|
||||||
mixins: [analyticsMixin],
|
mixins: [analyticsMixin],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
transferInProgress: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
setup() {
|
||||||
|
const { webchatGlobalNonpersistedState, launchWebchat } = webchatHelper();
|
||||||
|
return { webchatGlobalNonpersistedState, launchWebchat };
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
openSierraChatModal() {
|
openSierraChatModal() {
|
||||||
const sierra = window.sierraChat || window.sierra || window.SierraChat;
|
const sierra = window.sierraChat || window.sierra || window.SierraChat;
|
||||||
|
|
@ -35,11 +45,18 @@ export default {
|
||||||
display: "corner",
|
display: "corner",
|
||||||
onLoad: () => this.openSierraChatModal(),
|
onLoad: () => this.openSierraChatModal(),
|
||||||
onOpen: () => {},
|
onOpen: () => {},
|
||||||
onClose: () => window.dispatchEvent(new CustomEvent("sierra-chat-closed")),
|
onClose: () => {
|
||||||
onTransfer: (transfer) =>
|
if (!this.transferInProgress) {
|
||||||
|
this.webchatGlobalNonpersistedState.showWebchatButton = true;
|
||||||
|
this.transferInProgress = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onTransfer: (transfer) => {
|
||||||
|
this.transferInProgress = true;
|
||||||
window.dispatchEvent(
|
window.dispatchEvent(
|
||||||
new CustomEvent("sierra-chat-transfer", { detail: transfer })
|
new CustomEvent("sierra-chat-transfer", { detail: transfer })
|
||||||
),
|
);
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
getSierraContext() {
|
getSierraContext() {
|
||||||
|
|
@ -152,37 +169,16 @@ export default {
|
||||||
LastName: transfer.data.last_name,
|
LastName: transfer.data.last_name,
|
||||||
Email: transfer.data.email,
|
Email: transfer.data.email,
|
||||||
});
|
});
|
||||||
if (
|
|
||||||
window.embeddedservice_bootstrap.utilAPI &&
|
|
||||||
typeof window.embeddedservice_bootstrap.utilAPI.launchChat === "function"
|
|
||||||
) {
|
|
||||||
window.embeddedservice_bootstrap.utilAPI.launchChat();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
window.embeddedservice_bootstrap.utilAPI.launchChat();
|
this.webchatGlobalNonpersistedState.shouldLaunchSierra = false;
|
||||||
|
this.launchWebchat();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
window.addEventListener("sierra-chat-transfer", this._handleSierraTransfer);
|
window.addEventListener("sierra-chat-transfer", this._handleSierraTransfer);
|
||||||
|
|
||||||
// Notify funnel-header about Sierra chat open/close state
|
|
||||||
this._sierraChatContainerObserver = new MutationObserver(() => {
|
|
||||||
const isOpen = !!document.querySelector("[data-sierra-chat-container]");
|
|
||||||
window.dispatchEvent(
|
|
||||||
new CustomEvent("sierra-chat-visibility", { detail: { open: isOpen } })
|
|
||||||
);
|
|
||||||
});
|
|
||||||
this._sierraChatContainerObserver.observe(document.body, {
|
|
||||||
childList: true,
|
|
||||||
subtree: true,
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
beforeUnmount() {
|
beforeUnmount() {
|
||||||
window.removeEventListener("launch-sierra-webchat", this.triggerSierraChat);
|
window.removeEventListener("launch-sierra-webchat", this.triggerSierraChat);
|
||||||
window.removeEventListener("sierra-chat-transfer", this._handleSierraTransfer);
|
window.removeEventListener("sierra-chat-transfer", this._handleSierraTransfer);
|
||||||
if (this._sierraChatContainerObserver) {
|
|
||||||
this._sierraChatContainerObserver.disconnect();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -79,16 +79,7 @@ export default {
|
||||||
return this.getCmsContent(this.cmsWidgetName, "LogoImage");
|
return this.getCmsContent(this.cmsWidgetName, "LogoImage");
|
||||||
},
|
},
|
||||||
shouldShowWebchatButton() {
|
shouldShowWebchatButton() {
|
||||||
// Hide the chat icon if Sierra chat is open
|
return this.webchatGlobalNonpersistedState.showWebchatButton;
|
||||||
if (this.sierraChatOpen) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
// Show if either Sierra is enabled or Salesforce button is available and not hidden by page
|
|
||||||
return (
|
|
||||||
(this.webchatGlobalNonpersistedState.shouldLaunchSierra ||
|
|
||||||
this.webchatGlobalNonpersistedState.showWebchatButton) &&
|
|
||||||
!this.shouldHideWebchatButtonOnPage
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -116,10 +107,6 @@ export default {
|
||||||
webchatClicked(event) {
|
webchatClicked(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
this.launchWebchat();
|
this.launchWebchat();
|
||||||
// Only set sierraChatOpen if Sierra experiment is active
|
|
||||||
if (this.webchatGlobalNonpersistedState.shouldLaunchSierra) {
|
|
||||||
this.sierraChatOpen = true;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
syncSierraExperimentFlag() {
|
syncSierraExperimentFlag() {
|
||||||
const experiments = store.getters.applicationUser.experiments;
|
const experiments = store.getters.applicationUser.experiments;
|
||||||
|
|
@ -159,11 +146,6 @@ export default {
|
||||||
unknownAlertEvent.displayAlert = true;
|
unknownAlertEvent.displayAlert = true;
|
||||||
this.globalAlertMessages.push(unknownAlertEvent);
|
this.globalAlertMessages.push(unknownAlertEvent);
|
||||||
}
|
}
|
||||||
// Listen for Sierra chat open/close events from sierra-webchat
|
|
||||||
this._handleSierraChatVisibility = (event) => {
|
|
||||||
this.sierraChatOpen = !!(event.detail && event.detail.open);
|
|
||||||
};
|
|
||||||
window.addEventListener("sierra-chat-visibility", this._handleSierraChatVisibility);
|
|
||||||
|
|
||||||
// Add scroll listener for header shadow effect
|
// Add scroll listener for header shadow effect
|
||||||
this._handleScroll = () => {
|
this._handleScroll = () => {
|
||||||
|
|
@ -172,8 +154,6 @@ export default {
|
||||||
window.addEventListener("scroll", this._handleScroll);
|
window.addEventListener("scroll", this._handleScroll);
|
||||||
},
|
},
|
||||||
beforeUnmount() {
|
beforeUnmount() {
|
||||||
window.removeEventListener("sierra-chat-closed", this._handleSierraChatClosed);
|
|
||||||
window.removeEventListener("sierra-chat-visibility", this._handleSierraChatVisibility);
|
|
||||||
window.removeEventListener("sierra-chat-transfer", this._handleSierraToSalesforceTransfer);
|
window.removeEventListener("sierra-chat-transfer", this._handleSierraToSalesforceTransfer);
|
||||||
window.removeEventListener("scroll", this._handleScroll);
|
window.removeEventListener("scroll", this._handleScroll);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ const webchatGlobalNonpersistedState = reactive({
|
||||||
|
|
||||||
export const webchatHelper = () => {
|
export const webchatHelper = () => {
|
||||||
function launchWebchat() {
|
function launchWebchat() {
|
||||||
|
webchatGlobalNonpersistedState.showWebchatButton = false;
|
||||||
if (webchatGlobalNonpersistedState.shouldLaunchSierra) {
|
if (webchatGlobalNonpersistedState.shouldLaunchSierra) {
|
||||||
window.dispatchEvent(new CustomEvent("launch-sierra-webchat")); // launches the sierra chat
|
window.dispatchEvent(new CustomEvent("launch-sierra-webchat")); // launches the sierra chat
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
183
src/layouts/schedule/schedule.spec.js
Normal file
183
src/layouts/schedule/schedule.spec.js
Normal file
|
|
@ -0,0 +1,183 @@
|
||||||
|
// Components
|
||||||
|
import schedule from "@/layouts/schedule/schedule.vue";
|
||||||
|
|
||||||
|
// Supporting Files
|
||||||
|
import { shallowMount } from "@vue/test-utils";
|
||||||
|
import { getMountOptions } from "@/helpers/unit-test-helper.js";
|
||||||
|
import { routeData } from "@/router/constants/routes";
|
||||||
|
import store from "@/store";
|
||||||
|
import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper";
|
||||||
|
|
||||||
|
const storeMocked = {
|
||||||
|
getters: {
|
||||||
|
payment: { isInsurance: false },
|
||||||
|
order: {
|
||||||
|
payment: { isInsurance: false, insuranceCoverage: { isVerified: false } },
|
||||||
|
referralNumber: "",
|
||||||
|
serviceLocation: {
|
||||||
|
address: "",
|
||||||
|
address2: "",
|
||||||
|
city: "",
|
||||||
|
state: "",
|
||||||
|
zipCode: "00000",
|
||||||
|
zipCodeCtu: "000",
|
||||||
|
appointmentType: null,
|
||||||
|
provider: {},
|
||||||
|
isVehicleProtected: false,
|
||||||
|
},
|
||||||
|
schedule: {
|
||||||
|
date: "",
|
||||||
|
routeCode: "",
|
||||||
|
startTime: "",
|
||||||
|
endTime: "",
|
||||||
|
jobMinMinutes: null,
|
||||||
|
jobMaxMinutes: null,
|
||||||
|
},
|
||||||
|
policy: {
|
||||||
|
isItac: false,
|
||||||
|
isNoComp: false,
|
||||||
|
},
|
||||||
|
damage: { isRepair: false },
|
||||||
|
lineItems: { glassParts: [] },
|
||||||
|
},
|
||||||
|
vehicle: {
|
||||||
|
cardId: "",
|
||||||
|
},
|
||||||
|
lineItems: {
|
||||||
|
supportingItems: [],
|
||||||
|
},
|
||||||
|
applicationUser: {
|
||||||
|
experiments: [],
|
||||||
|
},
|
||||||
|
isMobileAppointment: false,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
jest.mock("@/helpers/heritage-integration/navigation-helper", () => ({
|
||||||
|
navigateToHeritageFunnel: jest.fn(),
|
||||||
|
}));
|
||||||
|
|
||||||
|
describe("schedule.vue", () => {
|
||||||
|
describe("navigation", () => {
|
||||||
|
test("backButtonAction => non-insurance: navigateWithoutSaving called", () => {
|
||||||
|
// Arrange
|
||||||
|
const { wrapper, mocks } = setupMocks();
|
||||||
|
|
||||||
|
// Act
|
||||||
|
wrapper.vm.backButtonAction();
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
expect(wrapper.vm.$router.navigateWithoutSaving).toHaveBeenCalledWith(
|
||||||
|
mocks.navigationScenarios.CLICKED_BACK,
|
||||||
|
routeData.SCHEDULE.name
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("backButtonAction => insurance verified: navigateToHeritageFunnel called", () => {
|
||||||
|
// Arrange
|
||||||
|
store.getters.order.payment.isInsurance = true;
|
||||||
|
store.getters.order.payment.insuranceCoverage = { isVerified: true };
|
||||||
|
store.getters.order.referralNumber = "";
|
||||||
|
const { wrapper } = setupMocks();
|
||||||
|
|
||||||
|
// Act
|
||||||
|
wrapper.vm.backButtonAction();
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
expect(navigateToHeritageFunnel).toHaveBeenCalledWith({
|
||||||
|
shouldSaveSession: false,
|
||||||
|
pageNameToLog: "schedule",
|
||||||
|
navType: "back",
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe("computed: isForwardActionDisabled", () => {
|
||||||
|
test("should be true when routeCode missing or appointmentType not set", async () => {
|
||||||
|
const { wrapper } = setupMocks();
|
||||||
|
await wrapper.setData({
|
||||||
|
selectedTimeSlotInfo: { timeSlot: { routeCode: null } },
|
||||||
|
appointmentType: null,
|
||||||
|
});
|
||||||
|
expect(wrapper.vm.isForwardActionDisabled).toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("should be false when routeCode present and appointmentType set", async () => {
|
||||||
|
const { wrapper } = setupMocks();
|
||||||
|
await wrapper.setData({
|
||||||
|
selectedTimeSlotInfo: { timeSlot: { routeCode: "RC123" } },
|
||||||
|
appointmentType: "SomeType",
|
||||||
|
});
|
||||||
|
expect(wrapper.vm.isForwardActionDisabled).toBe(false);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe("computed: selectedRouteCodeData", () => {
|
||||||
|
test("should return null when routeCode not set", async () => {
|
||||||
|
const { wrapper } = setupMocks();
|
||||||
|
await wrapper.setData({
|
||||||
|
selectedTimeSlotInfo: { timeSlot: { routeCode: null } },
|
||||||
|
});
|
||||||
|
expect(wrapper.vm.selectedRouteCodeData).toBeNull();
|
||||||
|
});
|
||||||
|
|
||||||
|
test("should return routeCode and premium flag when set", async () => {
|
||||||
|
const { wrapper } = setupMocks();
|
||||||
|
await wrapper.setData({
|
||||||
|
selectedTimeSlotInfo: {
|
||||||
|
timeSlot: { routeCode: "RC999" },
|
||||||
|
isPremiumAppointment: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
expect(wrapper.vm.selectedRouteCodeData).toEqual({
|
||||||
|
routeCode: "RC999",
|
||||||
|
isPremiumAppointment: true,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe("forwardButtonAction (early exit path)", () => {
|
||||||
|
test("shows recal acknowledgement popup and does not navigate when required", async () => {
|
||||||
|
const { wrapper } = setupMocks();
|
||||||
|
// Force the recal-ack modal path
|
||||||
|
wrapper.vm.showRecalAcknowledgementModal = jest.fn(() => true);
|
||||||
|
await wrapper.setData({ isRecalAcknowledgedForScheduling: null });
|
||||||
|
|
||||||
|
await wrapper.vm.forwardButtonAction();
|
||||||
|
|
||||||
|
expect(wrapper.vm.showRecalAcknowledgementPopup).toBe(true);
|
||||||
|
expect(wrapper.vm.$router.navigateWithSaving).not.toHaveBeenCalled();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
function setupMocks(mountOptionsMockData = {}) {
|
||||||
|
const route = { name: "schedule" };
|
||||||
|
const defaultMountOptions = {
|
||||||
|
route: route,
|
||||||
|
router: {
|
||||||
|
navigate: jest.fn(),
|
||||||
|
navigateWithSaving: jest.fn(),
|
||||||
|
navigateWithoutSaving: jest.fn(),
|
||||||
|
},
|
||||||
|
store: { ...storeMocked },
|
||||||
|
};
|
||||||
|
const mockBaseMixin = {
|
||||||
|
methods: {
|
||||||
|
getTierOnePackagePrice: jest.fn(),
|
||||||
|
filterOutFees: jest.fn(),
|
||||||
|
getCmsContent: jest.fn(),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
const baseMountOptions = getMountOptions({
|
||||||
|
...defaultMountOptions,
|
||||||
|
...mountOptionsMockData,
|
||||||
|
});
|
||||||
|
|
||||||
|
baseMountOptions.global.mixins = [mockBaseMixin];
|
||||||
|
baseMountOptions.global.mocks.pageName = route.name;
|
||||||
|
const wrapper = shallowMount(schedule, baseMountOptions);
|
||||||
|
wrapper.getCmsContent = jest.fn();
|
||||||
|
|
||||||
|
return { wrapper, mocks: baseMountOptions.global?.mocks || {} };
|
||||||
|
}
|
||||||
|
|
@ -98,11 +98,11 @@
|
||||||
linkWidgetName="ServiceZipLinkWidget"
|
linkWidgetName="ServiceZipLinkWidget"
|
||||||
modalWidgetName="ServiceZipModalWidget" />
|
modalWidgetName="ServiceZipModalWidget" />
|
||||||
</div>
|
</div>
|
||||||
<div class="row your-shop-location" v-if="showInshopComponent">
|
<div class="row your-shop-location" v-if="showShopLocationComponent">
|
||||||
<div class="col-12 col-md-10 col-lg-8 col-xl-7">
|
<div class="col-12 col-md-10 col-lg-8 col-xl-7">
|
||||||
<div>
|
<div>
|
||||||
<shopLocation
|
<shopLocation
|
||||||
v-if="showInshopComponent"
|
v-if="showShopLocationComponent"
|
||||||
:selectedShop="selectedShopAnswer"
|
:selectedShop="selectedShopAnswer"
|
||||||
:selectedProviderNumberFromParent="selectedProvider?.providerNumber"
|
:selectedProviderNumberFromParent="selectedProvider?.providerNumber"
|
||||||
:shopProviderDataFromParent="shopProviderData"
|
:shopProviderDataFromParent="shopProviderData"
|
||||||
|
|
@ -633,19 +633,18 @@ export default {
|
||||||
this.handleZipCodeChange(newValue);
|
this.handleZipCodeChange(newValue);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
showInshopComponent() {
|
showShopLocationComponent() {
|
||||||
// If we get no inshop or mobile data, then show the shoplocation component so the user is not
|
// If we get no inshop or mobile data, then show the shoplocation component so the user is not
|
||||||
// looking at a half blank screen with no way to try another zip/location.
|
// looking at a half blank screen with no way to try another zip/location.
|
||||||
if (
|
if (
|
||||||
(this.inshopTimeSlotsData === undefined &&
|
(this.selectableDatesInshop === undefined &&
|
||||||
this.mobileTimeSlotsData === undefined) ||
|
this.selectableDatesMobile === undefined) ||
|
||||||
(this.inshopTimeSlotsData.days.length === 0 &&
|
(this.selectableDatesInshop?.days?.length === 0 &&
|
||||||
this.mobileTimeSlotsData.days.length === 0) ||
|
this.selectableDatesMobile?.days?.length === 0) ||
|
||||||
(this.appointmentType && this.appointmentType !== AppointmentTypeStrings.MOBILE)
|
(this.appointmentType && this.appointmentType !== AppointmentTypeStrings.MOBILE)
|
||||||
) {
|
) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
isMobileSelected() {
|
isMobileSelected() {
|
||||||
|
|
@ -1327,8 +1326,8 @@ export default {
|
||||||
if (isMobileSelected === undefined) {
|
if (isMobileSelected === undefined) {
|
||||||
isMobileSelected = this.appointmentType === AppointmentTypeStrings.MOBILE;
|
isMobileSelected = this.appointmentType === AppointmentTypeStrings.MOBILE;
|
||||||
}
|
}
|
||||||
let storedDate = store.getters.order.schedule.date;
|
let storedDate = store.getters.order.schedule?.date;
|
||||||
if (isMobileSelected) storedDate += "-mobile";
|
if (isMobileSelected && storedDate) storedDate += "-mobile";
|
||||||
return storedDate;
|
return storedDate;
|
||||||
},
|
},
|
||||||
getSelectedTimeSlotInfo() {
|
getSelectedTimeSlotInfo() {
|
||||||
|
|
@ -1844,7 +1843,6 @@ export default {
|
||||||
this.appointmentType = null;
|
this.appointmentType = null;
|
||||||
}
|
}
|
||||||
this.setSelectedDateToFirstAvailable(); // v-if on appointmentTypeQuestion ensures dates have been loaded by now
|
this.setSelectedDateToFirstAvailable(); // v-if on appointmentTypeQuestion ensures dates have been loaded by now
|
||||||
this.setDisplayWaitList(); // v-if on appointmentTypeQuestion ensures dates have been loaded by now
|
|
||||||
},
|
},
|
||||||
setSelectedDateToFirstAvailable() {
|
setSelectedDateToFirstAvailable() {
|
||||||
this.selectedDate = this.getFirstAvailableDate();
|
this.selectedDate = this.getFirstAvailableDate();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue