-
-
+
+
+
{
+ return isDropOffRouteCode(timeSlot.id);
+ })
+ .map((timeSlot) => {
+ let buttonLabelValue;
+ if (timeSlot.id.includes(RouteCodeFlags.OVERNIGHT_DROP_OFF)) {
+ buttonLabelValue = this.overnightDropoffButtonText;
+ } else if (this.isSameDay) {
+ buttonLabelValue = this.sameDayDropoffButtonText;
+ } else {
+ buttonLabelValue = this.dropoffButtonText;
+ }
+ return {
+ value: timeSlot.id,
+ buttonLabel: buttonLabelValue,
+ };
+ });
+ // Only add the pick a time button if inShop timeslots are available
+ if (
+ this.getAvailableTimeSlotsForInshop(this.timeSlotsForSelectedDate.timeSlots)
+ .length !== 0
+ ) {
+ dropOffQuestionAnswers.push({
+ value: PICK_A_TIME_BUTTON_VALUE,
+ buttonLabel: this.pickATimeButtonLabelText,
+ });
+ }
+ return dropOffQuestionAnswers;
+ },
hasWaitListExperiment() {
return experimentMixin.methods.hasSettingEqualTo(
experimentSettings.DISPLAY_WAITLIST,
@@ -357,17 +348,44 @@ export default {
isMobileAppointment() {
return this.appointmentType === AppointmentTypeStrings.MOBILE;
},
- isDropOffAppointment() {
- return this.appointmentType === AppointmentTypeStrings.DROP_OFF;
+ isInshopOrDropOffAppointment() {
+ return this.appointmentType === AppointmentTypeStrings.IN_SHOP_OR_DROP_OFF;
+ },
+ shouldDisplayDropOffAlert() {
+ return isDropOffRouteCode(this.selectedAnswerForDropOffOrInshop);
+ },
+ dropOffTimeSlotAlertCMSWidgetName() {
+ if (this.selectedAnswerForDropOffOrInshop.includes(RouteCodeFlags.OVERNIGHT_DROP_OFF)) {
+ return "OvernightDropOffTimeSlotAlert";
+ } else if (this.isSameDay) {
+ return "SameDayDropOffTimeSlotAlert";
+ } else {
+ return "DropOffTimeSlotAlert";
+ }
+ },
+ isDropOffAppointmentAvailable() {
+ return (
+ this.answersForDropOffQuestion !== null &&
+ this.answersForDropOffQuestion.length !== 0 &&
+ this.answersForDropOffQuestion[0].value !== PICK_A_TIME_BUTTON_VALUE
+ );
+ },
+ shouldDisplayTimeSlotQuestion() {
+ return (
+ this.selectedAnswerForDropOffOrInshop == PICK_A_TIME_BUTTON_VALUE ||
+ !this.isDropOffAppointmentAvailable
+ );
},
},
methods: {
+ initializeComponent() {
+ this.setSelectedRouteCodeFromParent();
+ },
async setSelectedTimeSlot() {
this.$emit(
"update:modelValue",
this.getSelectedTimeSlotInfoObject(this.selectedRouteCode)
);
- this.$emit("TimeSlotSelected");
},
getRelevantDropOffCmsWidgetNameForSelectedTimeSlot(
selectedRouteCode,
@@ -382,31 +400,17 @@ export default {
}
},
getAvailableTimeSlotsForInshop(timeSlotsForSelectedDate) {
- return timeSlotsForSelectedDate.map((timeSlot) => {
- const readableTime = militaryToTwelveHourTime(timeSlot.startTime);
- return {
- value: timeSlot.id,
- buttonLabel: readableTime,
- };
- });
- },
- getAvailableTimeSlotsForDropOff(timeSlotsForSelectedDate) {
- const availableTimeSlots = timeSlotsForSelectedDate.map((timeSlot) => {
- let buttonLabelValue;
- if (timeSlot.id.includes(RouteCodeFlags.OVERNIGHT_DROP_OFF)) {
- buttonLabelValue = this.overnightDropoffButtonText;
- } else if (this.isSameDay) {
- buttonLabelValue = this.sameDayDropoffButtonText;
- } else {
- buttonLabelValue = this.dropoffButtonText;
- }
- return {
- value: timeSlot.id,
- buttonLabel: buttonLabelValue,
- };
- });
-
- return availableTimeSlots;
+ return timeSlotsForSelectedDate
+ .filter((timeSlot) => {
+ return !isDropOffRouteCode(timeSlot.id);
+ })
+ .map((timeSlot) => {
+ const readableTime = militaryToTwelveHourTime(timeSlot.startTime);
+ return {
+ value: timeSlot.id,
+ buttonLabel: readableTime,
+ };
+ });
},
getAvailableTimeSlotsForMobile(timeSlotsForSelectedDate) {
const availableTimeSlots = timeSlotsForSelectedDate.map((timeSlot) => {
@@ -443,29 +447,34 @@ export default {
},
};
},
- getSelectedRouteCode() {
- let selectedRouteCode;
- if (!this.modelValue?.timeSlot) {
- selectedRouteCode = null;
+ setSelectedRouteCodeFromParent() {
+ if (!this.modelValue?.timeSlot?.routeCode) {
+ return;
}
-
+ const routeCodeFromParent = this.modelValue.timeSlot.routeCode;
if (this.modelValue?.isPremiumAppointment) {
- selectedRouteCode = this.addPremiumFlagToInput(
- this.modelValue?.timeSlot?.routeCode
- );
+ // Mobile Only
+ this.selectedAnswerForTimeSlots = this.addPremiumFlagToInput(routeCodeFromParent);
} else {
- selectedRouteCode = this.modelValue?.timeSlot?.routeCode;
+ if (isDropOffRouteCode(routeCodeFromParent)) {
+ this.selectedAnswerForDropOffOrInshop = routeCodeFromParent;
+ } else {
+ this.selectedAnswerForDropOffOrInshop = PICK_A_TIME_BUTTON_VALUE;
+ this.selectedAnswerForTimeSlots = routeCodeFromParent;
+ }
}
-
- return selectedRouteCode;
},
getWaitListRequestedFromStore() {
return store.getters.order.customer?.waitListRequested;
},
autoSelectTimeSlotIfOnlyOneIsAvailable() {
- const numberOfOptions = this.availableTimeSlots?.length;
+ const numberOfOptions = this.timeSlotsForSelectedDate.timeSlots?.length;
if (numberOfOptions === 1) {
- this.selectedRouteCode = this.availableTimeSlots[0].value;
+ if (this.availableTimeSlots.length > 0) {
+ this.selectedAnswerForTimeSlots = this.availableTimeSlots[0].value;
+ } else {
+ this.selectedAnswerForDropOffOrInshop = this.answersForDropOffQuestion[0].value;
+ }
}
},
addPremiumFlagToInput(routeCode) {
@@ -479,7 +488,6 @@ export default {
if (routeCodeIncludesPremium) {
routeCode = this.removePremiumFlagFromInput(routeCode);
}
-
const timeSlot = this.timeSlotsForSelectedDate?.timeSlots?.find(
(slot) => slot.id == routeCode
);
@@ -540,24 +548,37 @@ export default {
this.autoSelectTimeSlotIfOnlyOneIsAvailable();
},
},
- selectedRouteCode(newVal) {
- if (newVal) {
+ 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: {
- // Removed modal
textBlock,
buttonQuestion,
checkboxQuestion,
+ alert,
},
};
diff --git a/src/layouts/service-location/appointment-type-question/appointment-type-question.spec.js b/src/layouts/service-location/appointment-type-question/appointment-type-question.spec.js
index 23435a8f7..102584b79 100644
--- a/src/layouts/service-location/appointment-type-question/appointment-type-question.spec.js
+++ b/src/layouts/service-location/appointment-type-question/appointment-type-question.spec.js
@@ -59,7 +59,7 @@ afterEach(() => {
});
describe("appointment-type-question.vue", () => {
- it("Should display all options if in-shop, mobile, and dropoff are available", async () => {
+ it("Should display all options if in-shop and mobile are available", async () => {
// Arrange/Act
const { wrapper } = setupMocks({
mixins: [mockMixin],
@@ -67,7 +67,6 @@ describe("appointment-type-question.vue", () => {
cmsWidgetName: cmsWidgetName,
isServiceableInshop: true,
isServiceableMobile: true,
- isServiceableDropoff: true,
},
mountOptions: {
attachTo: document.body,
@@ -90,13 +89,6 @@ describe("appointment-type-question.vue", () => {
SubWidgetName: "",
Text: "In-shop",
},
- {
- AnswerImageUrl: "",
- Name: "Dropoff",
- SubText: "",
- SubWidgetName: "",
- Text: "Drop-off",
- },
]);
});
@@ -108,7 +100,6 @@ describe("appointment-type-question.vue", () => {
cmsWidgetName: cmsWidgetName,
isServiceableInshop: true,
isServiceableMobile: false,
- isServiceableDropoff: false,
},
mountOptions: {
attachTo: document.body,
@@ -127,74 +118,6 @@ describe("appointment-type-question.vue", () => {
]);
});
- it("Should display only the In-Shop and Drop-Off answers when mobile service is not available", async () => {
- // Arrange/Act
- const { wrapper } = setupMocks({
- mixins: [mockMixin],
- props: {
- cmsWidgetName: cmsWidgetName,
- isServiceableInshop: true,
- isServiceableMobile: false,
- isServiceableDropoff: true,
- },
- mountOptions: {
- attachTo: document.body,
- },
- });
-
- // Assert
- expect(wrapper.vm.answersToDisplay).toEqual([
- {
- AnswerImageUrl: "",
- Name: "Inshop",
- SubText: "",
- SubWidgetName: "",
- Text: "In-shop",
- },
- {
- AnswerImageUrl: "",
- Name: "Dropoff",
- SubText: "",
- SubWidgetName: "",
- Text: "Drop-off",
- },
- ]);
- });
-
- it("Should display only the In-Shop and Drop-Off answers when mobile service is not available", async () => {
- // Arrange/Act
- const { wrapper } = setupMocks({
- mixins: [mockMixin],
- props: {
- cmsWidgetName: cmsWidgetName,
- isServiceableInshop: true,
- isServiceableMobile: false,
- isServiceableDropoff: true,
- },
- mountOptions: {
- attachTo: document.body,
- },
- });
-
- // Assert
- expect(wrapper.vm.answersToDisplay).toEqual([
- {
- AnswerImageUrl: "",
- Name: "Inshop",
- SubText: "",
- SubWidgetName: "",
- Text: "In-shop",
- },
- {
- AnswerImageUrl: "",
- Name: "Dropoff",
- SubText: "",
- SubWidgetName: "",
- Text: "Drop-off",
- },
- ]);
- });
-
it("Should display only the Mobile answer when only mobile service is available", async () => {
// Arrange/Act
const { wrapper } = setupMocks({
@@ -203,7 +126,6 @@ describe("appointment-type-question.vue", () => {
cmsWidgetName: cmsWidgetName,
isServiceableInshop: false,
isServiceableMobile: true,
- isServiceableDropoff: false,
},
mountOptions: {
attachTo: document.body,
@@ -221,46 +143,6 @@ describe("appointment-type-question.vue", () => {
},
]);
});
- it("Should not display Drop off answer when it is repair order", async () => {
- // Arrange/Act
-
- store.getters = {
- damage: {
- isRepair: true,
- },
- };
-
- const { wrapper } = setupMocks({
- mixins: [mockMixin],
- props: {
- cmsWidgetName: cmsWidgetName,
- isServiceableInshop: true,
- isServiceableMobile: true,
- isServiceableDropoff: true,
- },
- mountOptions: {
- attachTo: document.body,
- },
- });
-
- // Assert
- expect(wrapper.vm.answersToDisplay).toEqual([
- {
- AnswerImageUrl: "",
- Name: "Mobile",
- SubText: "",
- SubWidgetName: "",
- Text: "Mobile",
- },
- {
- AnswerImageUrl: "",
- Name: "Inshop",
- SubText: "",
- SubWidgetName: "",
- Text: "In-shop",
- },
- ]);
- });
it("Should display no answers if neither in-shop nor mobile service are available", async () => {
// Arrange/Act
@@ -270,7 +152,6 @@ describe("appointment-type-question.vue", () => {
cmsWidgetName: cmsWidgetName,
isServiceableInshop: false,
isServiceableMobile: false,
- isServiceableDropoff: false,
},
mountOptions: {
attachTo: document.body,
diff --git a/src/layouts/service-location/appointment-type-question/appointment-type-question.vue b/src/layouts/service-location/appointment-type-question/appointment-type-question.vue
index 4e28e0926..5189a15a4 100644
--- a/src/layouts/service-location/appointment-type-question/appointment-type-question.vue
+++ b/src/layouts/service-location/appointment-type-question/appointment-type-question.vue
@@ -33,7 +33,6 @@ export default {
cmsWidgetName: String,
isServiceableMobile: Boolean,
isServiceableInshop: Boolean,
- isServiceableDropoff: Boolean,
mobileFeeApplies: Boolean,
labelBold: {
type: Boolean,
@@ -52,16 +51,13 @@ export default {
answersToDisplay() {
const shouldShowMobile = this.isServiceableMobile;
const shouldShowInshop = this.isServiceableInshop;
- const shouldShowDropoff =
- this.isServiceableDropoff && !this.$store.getters.damage.isRepair;
const zipCode = this.zipCode;
var answers = this.answersFromCms
? this.answersFromCms.filter((answer) => {
return (
(answer.Name == AppointmentTypeStrings.IN_SHOP && shouldShowInshop) ||
- (answer.Name == AppointmentTypeStrings.MOBILE && shouldShowMobile) ||
- (answer.Name == AppointmentTypeStrings.DROP_OFF && shouldShowDropoff)
+ (answer.Name == AppointmentTypeStrings.MOBILE && shouldShowMobile)
);
})
: [];
@@ -87,9 +83,7 @@ export default {
return this.isServiceableMobile && !this.isServiceableInshop;
},
isInshopOnly() {
- return (
- this.isServiceableInshop && !this.isServiceableMobile && !this.isServiceableDropoff
- );
+ return this.isServiceableInshop && !this.isServiceableMobile;
},
},
watch: {
diff --git a/src/layouts/service-location/service-location-june-2025.vue b/src/layouts/service-location/service-location-june-2025.vue
new file mode 100644
index 000000000..8dac38faf
--- /dev/null
+++ b/src/layouts/service-location/service-location-june-2025.vue
@@ -0,0 +1,848 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/layouts/service-location/service-location.spec.js b/src/layouts/service-location/service-location.spec.js
index 551e15ae0..68e9e9481 100644
--- a/src/layouts/service-location/service-location.spec.js
+++ b/src/layouts/service-location/service-location.spec.js
@@ -219,7 +219,13 @@ describe("service-location.vue", () => {
// Arrange
const { wrapper } = setupMocks({});
- wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ /* ******NOTE: if we ever want to revert back to the old way of service location using shopQuestion instead of shopQuestionPopup uncomment all 30 of the lines in this file that read - wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn(); - , and commment all of the blocks of code referencing shopQuestionPopup directly under them. Also remove reference to shopQuestionPopup in the setupMocks function*/
+
+ //wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ const shopQuestionPopupComponent = wrapper.findComponent({ ref: "shopQuestionPopup" });
+ if (shopQuestionPopupComponent.exists()) {
+ shopQuestionPopupComponent.vm.initializeComponent = jest.fn();
+ }
const mobileFeePart = {
partNumber: "MOBILE FEE",
@@ -387,7 +393,13 @@ describe("service-location.vue", () => {
const { wrapper } = setupMocks({});
- wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ //wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ const shopQuestionPopupComponent = wrapper.findComponent({
+ ref: "shopQuestionPopup",
+ });
+ if (shopQuestionPopupComponent.exists()) {
+ shopQuestionPopupComponent.vm.initializeComponent = jest.fn();
+ }
// Act
await serviceLocation.beforeRouteEnter.call(
@@ -414,7 +426,13 @@ describe("service-location.vue", () => {
const { wrapper } = setupMocks({});
- wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ //wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ const shopQuestionPopupComponent = wrapper.findComponent({
+ ref: "shopQuestionPopup",
+ });
+ if (shopQuestionPopupComponent.exists()) {
+ shopQuestionPopupComponent.vm.initializeComponent = jest.fn();
+ }
// Act
await serviceLocation.beforeRouteEnter.call(
@@ -441,7 +459,13 @@ describe("service-location.vue", () => {
const { wrapper } = setupMocks({});
- wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ //wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ const shopQuestionPopupComponent = wrapper.findComponent({
+ ref: "shopQuestionPopup",
+ });
+ if (shopQuestionPopupComponent.exists()) {
+ shopQuestionPopupComponent.vm.initializeComponent = jest.fn();
+ }
// Act
await serviceLocation.beforeRouteEnter.call(
@@ -468,7 +492,13 @@ describe("service-location.vue", () => {
const { wrapper } = setupMocks({});
- wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ //wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ const shopQuestionPopupComponent = wrapper.findComponent({
+ ref: "shopQuestionPopup",
+ });
+ if (shopQuestionPopupComponent.exists()) {
+ shopQuestionPopupComponent.vm.initializeComponent = jest.fn();
+ }
// Act
await serviceLocation.beforeRouteEnter.call(
@@ -495,7 +525,13 @@ describe("service-location.vue", () => {
const { wrapper } = setupMocks({});
- wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ //wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ const shopQuestionPopupComponent = wrapper.findComponent({
+ ref: "shopQuestionPopup",
+ });
+ if (shopQuestionPopupComponent.exists()) {
+ shopQuestionPopupComponent.vm.initializeComponent = jest.fn();
+ }
// Act
await serviceLocation.beforeRouteEnter.call(
@@ -523,7 +559,13 @@ describe("service-location.vue", () => {
const { wrapper } = setupMocks({});
- wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ //wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ const shopQuestionPopupComponent = wrapper.findComponent({
+ ref: "shopQuestionPopup",
+ });
+ if (shopQuestionPopupComponent.exists()) {
+ shopQuestionPopupComponent.vm.initializeComponent = jest.fn();
+ }
// Act
await serviceLocation.beforeRouteEnter.call(
@@ -551,7 +593,13 @@ describe("service-location.vue", () => {
const { wrapper } = setupMocks({});
- wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ //wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ const shopQuestionPopupComponent = wrapper.findComponent({
+ ref: "shopQuestionPopup",
+ });
+ if (shopQuestionPopupComponent.exists()) {
+ shopQuestionPopupComponent.vm.initializeComponent = jest.fn();
+ }
// Act
await serviceLocation.beforeRouteEnter.call(
@@ -579,7 +627,13 @@ describe("service-location.vue", () => {
const { wrapper } = setupMocks({});
- wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ //wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ const shopQuestionPopupComponent = wrapper.findComponent({
+ ref: "shopQuestionPopup",
+ });
+ if (shopQuestionPopupComponent.exists()) {
+ shopQuestionPopupComponent.vm.initializeComponent = jest.fn();
+ }
// Act
await serviceLocation.beforeRouteEnter.call(
@@ -607,7 +661,13 @@ describe("service-location.vue", () => {
const { wrapper } = setupMocks({});
- wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ //wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ const shopQuestionPopupComponent = wrapper.findComponent({
+ ref: "shopQuestionPopup",
+ });
+ if (shopQuestionPopupComponent.exists()) {
+ shopQuestionPopupComponent.vm.initializeComponent = jest.fn();
+ }
// Act
await serviceLocation.beforeRouteEnter.call(
@@ -635,7 +695,13 @@ describe("service-location.vue", () => {
const { wrapper } = setupMocks({});
- wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ //wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ const shopQuestionPopupComponent = wrapper.findComponent({
+ ref: "shopQuestionPopup",
+ });
+ if (shopQuestionPopupComponent.exists()) {
+ shopQuestionPopupComponent.vm.initializeComponent = jest.fn();
+ }
// Act
await serviceLocation.beforeRouteEnter.call(
@@ -663,7 +729,13 @@ describe("service-location.vue", () => {
const { wrapper } = setupMocks({});
- wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ //wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ const shopQuestionPopupComponent = wrapper.findComponent({
+ ref: "shopQuestionPopup",
+ });
+ if (shopQuestionPopupComponent.exists()) {
+ shopQuestionPopupComponent.vm.initializeComponent = jest.fn();
+ }
// Act
await serviceLocation.beforeRouteEnter.call(
@@ -691,7 +763,13 @@ describe("service-location.vue", () => {
const { wrapper } = setupMocks({});
- wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ //wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ const shopQuestionPopupComponent = wrapper.findComponent({
+ ref: "shopQuestionPopup",
+ });
+ if (shopQuestionPopupComponent.exists()) {
+ shopQuestionPopupComponent.vm.initializeComponent = jest.fn();
+ }
// Act
await serviceLocation.beforeRouteEnter.call(
@@ -719,7 +797,13 @@ describe("service-location.vue", () => {
const { wrapper } = setupMocks({});
- wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ //wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ const shopQuestionPopupComponent = wrapper.findComponent({
+ ref: "shopQuestionPopup",
+ });
+ if (shopQuestionPopupComponent.exists()) {
+ shopQuestionPopupComponent.vm.initializeComponent = jest.fn();
+ }
// Act
await serviceLocation.beforeRouteEnter.call(
@@ -747,7 +831,13 @@ describe("service-location.vue", () => {
const { wrapper } = setupMocks({});
- wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ //wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ const shopQuestionPopupComponent = wrapper.findComponent({
+ ref: "shopQuestionPopup",
+ });
+ if (shopQuestionPopupComponent.exists()) {
+ shopQuestionPopupComponent.vm.initializeComponent = jest.fn();
+ }
// Act
await serviceLocation.beforeRouteEnter.call(
@@ -775,7 +865,13 @@ describe("service-location.vue", () => {
const { wrapper } = setupMocks({});
- wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ //wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ const shopQuestionPopupComponent = wrapper.findComponent({
+ ref: "shopQuestionPopup",
+ });
+ if (shopQuestionPopupComponent.exists()) {
+ shopQuestionPopupComponent.vm.initializeComponent = jest.fn();
+ }
// Act
await serviceLocation.beforeRouteEnter.call(
@@ -806,7 +902,13 @@ describe("service-location.vue", () => {
const { wrapper } = setupMocks({});
- wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ //wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ const shopQuestionPopupComponent = wrapper.findComponent({
+ ref: "shopQuestionPopup",
+ });
+ if (shopQuestionPopupComponent.exists()) {
+ shopQuestionPopupComponent.vm.initializeComponent = jest.fn();
+ }
// Act
await serviceLocation.beforeRouteEnter.call(
@@ -833,7 +935,13 @@ describe("service-location.vue", () => {
const { wrapper } = setupMocks({});
- wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ //wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ const shopQuestionPopupComponent = wrapper.findComponent({
+ ref: "shopQuestionPopup",
+ });
+ if (shopQuestionPopupComponent.exists()) {
+ shopQuestionPopupComponent.vm.initializeComponent = jest.fn();
+ }
// Act
await serviceLocation.beforeRouteEnter.call(
@@ -860,7 +968,13 @@ describe("service-location.vue", () => {
const { wrapper } = setupMocks({});
- wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ //wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ const shopQuestionPopupComponent = wrapper.findComponent({
+ ref: "shopQuestionPopup",
+ });
+ if (shopQuestionPopupComponent.exists()) {
+ shopQuestionPopupComponent.vm.initializeComponent = jest.fn();
+ }
// Act
await serviceLocation.beforeRouteEnter.call(
@@ -888,7 +1002,13 @@ describe("service-location.vue", () => {
const { wrapper } = setupMocks({});
- wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ //wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ const shopQuestionPopupComponent = wrapper.findComponent({
+ ref: "shopQuestionPopup",
+ });
+ if (shopQuestionPopupComponent.exists()) {
+ shopQuestionPopupComponent.vm.initializeComponent = jest.fn();
+ }
// Act
await serviceLocation.beforeRouteEnter.call(
@@ -916,7 +1036,13 @@ describe("service-location.vue", () => {
const { wrapper } = setupMocks({});
- wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ //wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ const shopQuestionPopupComponent = wrapper.findComponent({
+ ref: "shopQuestionPopup",
+ });
+ if (shopQuestionPopupComponent.exists()) {
+ shopQuestionPopupComponent.vm.initializeComponent = jest.fn();
+ }
// Act
await serviceLocation.beforeRouteEnter.call(
@@ -944,7 +1070,13 @@ describe("service-location.vue", () => {
const { wrapper } = setupMocks({});
- wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ //wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ const shopQuestionPopupComponent = wrapper.findComponent({
+ ref: "shopQuestionPopup",
+ });
+ if (shopQuestionPopupComponent.exists()) {
+ shopQuestionPopupComponent.vm.initializeComponent = jest.fn();
+ }
// Act
await serviceLocation.beforeRouteEnter.call(
@@ -974,7 +1106,13 @@ describe("service-location.vue", () => {
const { wrapper } = setupMocks({});
- wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ //wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ const shopQuestionPopupComponent = wrapper.findComponent({
+ ref: "shopQuestionPopup",
+ });
+ if (shopQuestionPopupComponent.exists()) {
+ shopQuestionPopupComponent.vm.initializeComponent = jest.fn();
+ }
// Act
await serviceLocation.beforeRouteEnter.call(
@@ -1002,7 +1140,13 @@ describe("service-location.vue", () => {
const { wrapper } = setupMocks({});
- wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ //wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ const shopQuestionPopupComponent = wrapper.findComponent({
+ ref: "shopQuestionPopup",
+ });
+ if (shopQuestionPopupComponent.exists()) {
+ shopQuestionPopupComponent.vm.initializeComponent = jest.fn();
+ }
// Act
await serviceLocation.beforeRouteEnter.call(
@@ -1030,7 +1174,13 @@ describe("service-location.vue", () => {
const { wrapper } = setupMocks({});
- wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ //wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ const shopQuestionPopupComponent = wrapper.findComponent({
+ ref: "shopQuestionPopup",
+ });
+ if (shopQuestionPopupComponent.exists()) {
+ shopQuestionPopupComponent.vm.initializeComponent = jest.fn();
+ }
// Act
await serviceLocation.beforeRouteEnter.call(
@@ -1058,7 +1208,13 @@ describe("service-location.vue", () => {
const { wrapper } = setupMocks({});
- wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ //wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ const shopQuestionPopupComponent = wrapper.findComponent({
+ ref: "shopQuestionPopup",
+ });
+ if (shopQuestionPopupComponent.exists()) {
+ shopQuestionPopupComponent.vm.initializeComponent = jest.fn();
+ }
// Act
await serviceLocation.beforeRouteEnter.call(
@@ -1086,7 +1242,13 @@ describe("service-location.vue", () => {
const { wrapper } = setupMocks({});
- wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ //wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ const shopQuestionPopupComponent = wrapper.findComponent({
+ ref: "shopQuestionPopup",
+ });
+ if (shopQuestionPopupComponent.exists()) {
+ shopQuestionPopupComponent.vm.initializeComponent = jest.fn();
+ }
// Act
await serviceLocation.beforeRouteEnter.call(
@@ -1114,7 +1276,13 @@ describe("service-location.vue", () => {
const { wrapper } = setupMocks({});
- wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ //wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ const shopQuestionPopupComponent = wrapper.findComponent({
+ ref: "shopQuestionPopup",
+ });
+ if (shopQuestionPopupComponent.exists()) {
+ shopQuestionPopupComponent.vm.initializeComponent = jest.fn();
+ }
// Act
await serviceLocation.beforeRouteEnter.call(
@@ -1142,7 +1310,13 @@ describe("service-location.vue", () => {
const { wrapper } = setupMocks({});
- wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ //wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ const shopQuestionPopupComponent = wrapper.findComponent({
+ ref: "shopQuestionPopup",
+ });
+ if (shopQuestionPopupComponent.exists()) {
+ shopQuestionPopupComponent.vm.initializeComponent = jest.fn();
+ }
// Act
await serviceLocation.beforeRouteEnter.call(
@@ -1172,7 +1346,13 @@ describe("service-location.vue", () => {
const { wrapper } = setupMocks({});
- wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ //wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn();
+ const shopQuestionPopupComponent = wrapper.findComponent({
+ ref: "shopQuestionPopup",
+ });
+ if (shopQuestionPopupComponent.exists()) {
+ shopQuestionPopupComponent.vm.initializeComponent = jest.fn();
+ }
// Act
await serviceLocation.beforeRouteEnter.call(
@@ -1199,5 +1379,12 @@ function setupMocks({ mountOptionsMockData = {} }) {
const mountOptions = getMountOptions(mountOptionsMockData);
const wrapper = shallowMount(serviceLocation, mountOptions);
wrapper.vm.setCmsContent = baseMixin.methods.setCmsContent;
+ if (!wrapper.vm.shopProviderData) {
+ wrapper.vm.shopProviderData = { shopProviders: [] };
+ }
+ const shopQuestionPopupComponent = wrapper.findComponent({ ref: "shopQuestionPopup" });
+ if (shopQuestionPopupComponent.exists()) {
+ shopQuestionPopupComponent.vm.initializeComponent = jest.fn();
+ }
return { wrapper, apiPromise };
}
diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue
index da39e4590..4c0339981 100644
--- a/src/layouts/service-location/service-location.vue
+++ b/src/layouts/service-location/service-location.vue
@@ -93,14 +93,24 @@
typeStyle="caption"
class="ps-4 pe-4 mt-4" />
-
+ cmsWidgetName="YourSafeliteShopWidget" />
@@ -122,6 +132,10 @@ import alert from "@/ux-components/alert/alert";
import serviceZipModalQuestion from "@/layouts/service-location/service-zip-modal-question/service-zip-modal-question";
import appointmentTypeQuestion from "@/layouts/service-location/appointment-type-question/appointment-type-question";
import shopQuestion from "@/layouts/service-location/shop-question/shop-question";
+import shopQuestionPopup from "@/layouts/service-location/shop-question/shop-question-popup";
+import buttonQuestion from "@/digital-components/button-question/button-question.vue";
+import shopListButton from "@/layouts/service-location/shop-question/shop-list-button/shop-list-button";
+import { getAvailabilityRating } from "@/layouts/service-location/helpers/service-location-helper/service-location-helper";
import funnelHeader from "@/fmg-components/funnel-header/funnel-header";
import navbar from "@/fmg-components/nav-bar/nav-bar";
@@ -208,6 +222,7 @@ export default {
shopProviderData: null,
navigatingForward: false,
isMobileAddressValid: true,
+ shopListButton: shopListButton,
};
},
async beforeRouteEnter(to, from, next) {
@@ -417,6 +432,57 @@ export default {
isForwardActionDisabled() {
return this.displayNoShopsAlert || !this.isMobileAddressValid;
},
+ additionalButtonData() {
+ const startDate = new Date();
+ const endDate = new Date();
+ endDate.setDate(startDate.getDate() + 6);
+
+ const formattedStartDate = startDate.toISOString().split("T")[0];
+ const formattedEndDate = endDate.toISOString().split("T")[0];
+
+ return {
+ availabilityRatingCallback: getAvailabilityRating,
+ startDate: formattedStartDate,
+ endDate: formattedEndDate,
+ shopAppointmentType: this.selectedAppointmentType,
+ };
+ },
+ selectedShopAnswer() {
+ const toTitleCase = (str) => {
+ if (!str) return "";
+ return str.replace(/\w\S*/g, function (txt) {
+ return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
+ });
+ };
+
+ if (this.selectedProvider && this.selectedProvider.address) {
+ const provider = this.shopProviderData?.shopProviders?.find(
+ (p) => p.providerNumber === this.selectedProvider?.providerNumber
+ );
+ const streetAddress = toTitleCase(this.selectedProvider.address.streetAddress);
+ const city = toTitleCase(this.selectedProvider.address.city);
+ const state = this.selectedProvider.address.state;
+ const zipCode = this.selectedProvider.address.zipCode;
+ const distanceInMiles = provider ? Math.round(provider.distanceInMiles * 2) / 2 : 0;
+
+ return [
+ {
+ buttonLabel: `${city}`,
+ buttonLabelSubCopy: `${distanceInMiles} mi`,
+ buttonBodyCopy: `${streetAddress}, ${city}, ${state} ${zipCode}`,
+ additionalButtonData: this.additionalButtonData,
+ value: this.selectedProvider.providerNumber,
+ },
+ ];
+ }
+ return [];
+ },
+ questionText() {
+ return this.getCmsContent("YourSafeliteShopWidget", "QuestionText");
+ },
+ appointmentTypeStrings() {
+ return AppointmentTypeStrings;
+ },
},
methods: {
arePagePrerequisitesValid() {
@@ -665,8 +731,6 @@ export default {
this.selectedProvider.address.zipCode = null;
this.selectedProvider.address.zipCodeCtu = null;
} else {
- // if we have a provider.zipCodeCtu that's different than the servicelocation.zipCodeCtu then they
- // may have selected a shop in a different ctu. change the servicelocation zip/ctu if different
if (this.zipCodeCtu != this.selectedProvider.address.zipCodeCtu) {
ctu = this.selectedProvider.address.zipCodeCtu;
}
@@ -752,6 +816,45 @@ export default {
startTime: "08:00",
};
},
+ onShopSelected(providerObject) {
+ const current = this.shopProviderData?.shopProviders?.find(
+ (p) => p.providerNumber === this.selectedProvider?.providerNumber
+ );
+ if (current) {
+ this.selectedProvider = current;
+ }
+
+ let provider = this.shopProviderData?.shopProviders?.find(
+ (p) => p.providerNumber === providerObject?.providerNumber
+ );
+ this.selectedProvider = provider;
+ if (providerObject && providerObject.address) {
+ this.zipCode = providerObject.searchedZip;
+ this.state = providerObject.searchedState;
+ }
+ },
+ setZipcodeCtu(zipcodeCtu) {
+ this.zipCodeCtu = zipcodeCtu;
+ },
+ onShopModelUpdated(newModel) {
+ if (newModel.zipCode) {
+ this.zipCode = newModel.zipCode;
+ }
+ if (newModel.zipCodeCtu) {
+ this.zipCodeCtu = newModel.zipCodeCtu;
+ }
+ if (newModel.state) {
+ this.state = newModel.state;
+ }
+ if (this.shopProviderData && newModel.selectedProviderNumber) {
+ const provider = this.shopProviderData.shopProviders.find(
+ (p) => p.providerNumber === newModel.selectedProviderNumber
+ );
+ if (provider) {
+ this.selectedProvider = provider;
+ }
+ }
+ },
},
watch: {
zipCode: {
@@ -764,7 +867,7 @@ export default {
this.shopProviderData.mobileProviderNumber
);
} else {
- this.selectedProvider = new Provider();
+ this.isMobileAddressValid = true;
}
});
}
@@ -777,7 +880,7 @@ export default {
this.shopProviderData.mobileProviderNumber
);
} else {
- this.selectedProvider = new Provider();
+ this.selectedProvider = this.shopProviderData.shopProviders[0];
}
},
},
@@ -792,7 +895,8 @@ export default {
Form,
loadingModal,
contentGroupModal,
- shopQuestion,
+ shopQuestionPopup,
+ buttonQuestion,
textBlock,
},
};
@@ -814,4 +918,8 @@ export default {
color: $black;
}
}
+.shop-question-button .list-button-content {
+ background: $blue-100 !important;
+ box-shadow: 0 0 0 1px $primary !important;
+}
diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-question/service-zip-question.vue b/src/layouts/service-location/service-zip-modal-question/service-zip-question/service-zip-question.vue
index 9841c5b16..8fe355923 100644
--- a/src/layouts/service-location/service-zip-modal-question/service-zip-question/service-zip-question.vue
+++ b/src/layouts/service-location/service-zip-modal-question/service-zip-question/service-zip-question.vue
@@ -7,9 +7,11 @@
questionAlignment="center"
cornerStyle="rounded"
mask="#####"
+ :includeSearchIcon="includeSearchIcon"
+ @search-icon-click="$emit('search-icon-click')"
:displayQuestionText="false"
- isRequired
- validationRules="zip-required|zip-format" />
+ :isRequired="isRequired"
+ :validationRules="computedValidationRules" />
+
+
diff --git a/src/layouts/service-location/shop-question/shop-question.vue b/src/layouts/service-location/shop-question/shop-question.vue
index a6c5e71c8..79bda1ef7 100644
--- a/src/layouts/service-location/shop-question/shop-question.vue
+++ b/src/layouts/service-location/shop-question/shop-question.vue
@@ -277,23 +277,24 @@ export default {
margin-top: 0.5rem;
}
}
-}
-.drop-off-alert {
- background: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_13957_112512)'%3E%3Cpath d='M5.99865 0C4.81147 4.82643e-07 3.65095 0.352111 2.66392 1.01179C1.67688 1.67146 0.907678 2.60907 0.45361 3.70599C-0.000459241 4.80291 -0.11899 6.00986 0.113013 7.17415C0.345015 8.33845 0.917126 9.40778 1.75697 10.2469C2.59682 11.086 3.66666 11.6571 4.83117 11.8881C5.99567 12.119 7.20251 11.9994 8.29902 11.5443C9.39553 11.0893 10.3324 10.3192 10.9912 9.33159C11.65 8.34396 12.0011 7.18313 12 5.99594C11.9971 4.40566 11.3638 2.88142 10.2388 1.75742C9.11375 0.633431 7.58894 0.00143011 5.99865 0V0ZM5.99865 11.2478C4.96135 11.2473 3.94748 10.9392 3.08518 10.3627C2.22288 9.7861 1.55085 8.96685 1.15401 8.00846C0.75718 7.05006 0.653353 5.99554 0.855656 4.97815C1.05796 3.96077 1.55731 3.02618 2.29061 2.29251C3.0239 1.55884 3.95823 1.059 4.97551 0.856176C5.99279 0.653349 7.04737 0.756633 8.00597 1.15297C8.96457 1.54931 9.78416 2.22092 10.3612 3.08293C10.9382 3.94493 11.2467 4.95864 11.2478 5.99594C11.2478 7.38835 10.6949 8.72377 9.71053 9.70861C8.7262 10.6934 7.39106 11.2471 5.99865 11.2478V11.2478Z' fill='%2306577C'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M6.22736 8.84695C6.30613 8.76818 6.35038 8.66135 6.35038 8.54996V5.30996C6.35038 5.19857 6.30613 5.09174 6.22736 5.01298C6.1486 4.93421 6.04177 4.88996 5.93038 4.88996C5.81899 4.88996 5.71216 4.93421 5.63339 5.01298C5.55463 5.09174 5.51038 5.19857 5.51038 5.30996V8.54996C5.51038 8.66135 5.55463 8.76818 5.63339 8.84695C5.71216 8.92571 5.81899 8.96996 5.93038 8.96996C6.04177 8.96996 6.1486 8.92571 6.22736 8.84695ZM5.69704 3.97918C5.76611 4.02533 5.84731 4.04996 5.93038 4.04996C5.98558 4.05012 6.04026 4.03936 6.09129 4.01831C6.14232 3.99726 6.18868 3.96633 6.22771 3.9273C6.26675 3.88827 6.29768 3.8419 6.31873 3.79088C6.33978 3.73985 6.35053 3.68516 6.35038 3.62996C6.35038 3.54689 6.32574 3.46569 6.27959 3.39662C6.23344 3.32755 6.16785 3.27372 6.0911 3.24193C6.01436 3.21014 5.92991 3.20183 5.84844 3.21803C5.76697 3.23424 5.69213 3.27424 5.63339 3.33298C5.57465 3.39171 5.53465 3.46655 5.51845 3.54802C5.50224 3.6295 5.51056 3.71394 5.54235 3.79069C5.57414 3.86743 5.62797 3.93303 5.69704 3.97918Z' fill='%2306577C'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_13957_112512'%3E%3Crect width='12' height='12' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A");
- background-repeat: no-repeat;
- background-size: 0.75rem;
- background-position: 0.5rem 0.75rem;
- border-radius: 0.5rem;
- display: flex;
- flex-direction: row;
- padding: 0.5rem 0.5rem 0.5rem 1.5rem;
- gap: 0.25rem;
+ .drop-off-alert {
+ background: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_13957_112512)'%3E%3Cpath d='M5.99865 0C4.81147 4.82643e-07 3.65095 0.352111 2.66392 1.01179C1.67688 1.67146 0.907678 2.60907 0.45361 3.70599C-0.000459241 4.80291 -0.11899 6.00986 0.113013 7.17415C0.345015 8.33845 0.917126 9.40778 1.75697 10.2469C2.59682 11.086 3.66666 11.6571 4.83117 11.8881C5.99567 12.119 7.20251 11.9994 8.29902 11.5443C9.39553 11.0893 10.3324 10.3192 10.9912 9.33159C11.65 8.34396 12.0011 7.18313 12 5.99594C11.9971 4.40566 11.3638 2.88142 10.2388 1.75742C9.11375 0.633431 7.58894 0.00143011 5.99865 0V0ZM5.99865 11.2478C4.96135 11.2473 3.94748 10.9392 3.08518 10.3627C2.22288 9.7861 1.55085 8.96685 1.15401 8.00846C0.75718 7.05006 0.653353 5.99554 0.855656 4.97815C1.05796 3.96077 1.55731 3.02618 2.29061 2.29251C3.0239 1.55884 3.95823 1.059 4.97551 0.856176C5.99279 0.653349 7.04737 0.756633 8.00597 1.15297C8.96457 1.54931 9.78416 2.22092 10.3612 3.08293C10.9382 3.94493 11.2467 4.95864 11.2478 5.99594C11.2478 7.38835 10.6949 8.72377 9.71053 9.70861C8.7262 10.6934 7.39106 11.2471 5.99865 11.2478V11.2478Z' fill='%2306577C'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M6.22736 8.84695C6.30613 8.76818 6.35038 8.66135 6.35038 8.54996V5.30996C6.35038 5.19857 6.30613 5.09174 6.22736 5.01298C6.1486 4.93421 6.04177 4.88996 5.93038 4.88996C5.81899 4.88996 5.71216 4.93421 5.63339 5.01298C5.55463 5.09174 5.51038 5.19857 5.51038 5.30996V8.54996C5.51038 8.66135 5.55463 8.76818 5.63339 8.84695C5.71216 8.92571 5.81899 8.96996 5.93038 8.96996C6.04177 8.96996 6.1486 8.92571 6.22736 8.84695ZM5.69704 3.97918C5.76611 4.02533 5.84731 4.04996 5.93038 4.04996C5.98558 4.05012 6.04026 4.03936 6.09129 4.01831C6.14232 3.99726 6.18868 3.96633 6.22771 3.9273C6.26675 3.88827 6.29768 3.8419 6.31873 3.79088C6.33978 3.73985 6.35053 3.68516 6.35038 3.62996C6.35038 3.54689 6.32574 3.46569 6.27959 3.39662C6.23344 3.32755 6.16785 3.27372 6.0911 3.24193C6.01436 3.21014 5.92991 3.20183 5.84844 3.21803C5.76697 3.23424 5.69213 3.27424 5.63339 3.33298C5.57465 3.39171 5.53465 3.46655 5.51845 3.54802C5.50224 3.6295 5.51056 3.71394 5.54235 3.79069C5.57414 3.86743 5.62797 3.93303 5.69704 3.97918Z' fill='%2306577C'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_13957_112512'%3E%3Crect width='12' height='12' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A");
+ background-repeat: no-repeat;
+ background-size: 0.75rem;
+ background-position: 0.5rem 0.75rem;
+ border-radius: 0.5rem;
+ display: flex;
+ flex-direction: row;
+ padding: 0.5rem 0.5rem 0.5rem 1.5rem;
+ gap: 0.25rem;
+ background-color: #e4f1f7;
- .alert-heading {
- text-align: left;
- font-size: 0.75rem;
- line-height: 1.25rem;
+ .alert-heading {
+ text-align: left;
+ font-size: 0.75rem;
+ line-height: 1.25rem;
+ }
}
}
diff --git a/src/mixins/analytics-mixin.js b/src/mixins/analytics-mixin.js
index 90513e764..72ede2538 100644
--- a/src/mixins/analytics-mixin.js
+++ b/src/mixins/analytics-mixin.js
@@ -132,7 +132,6 @@ export default {
async logDigitalConsumer() {
const currentPageName = getPageNameFromRouter();
const universes = store.getters.applicationUser.experiments;
- console.log(JSON.stringify(universes));
let hasDynamoLogging = experimentMixin.methods.hasSettingEqualTo(
experimentSettings.DYNAMO_LOGGING,
@@ -150,15 +149,15 @@ export default {
const conceptVariation = variationNames.length > 0 ? variationNames[0] : "";
+ const isConceptExposed = universes.find(
+ (item) => item.universeName === experimentUniverses.CONCEPT_FUNNEL
+ )?.isExposed;
+
const submittedOrder = baseMixin.methods.getSubmittedOrder();
const hasSubmittedOrder = baseMixin.methods.hasSubmittedOrder();
const hasSubmittedOrderAtConfirmationPage =
hasSubmittedOrder && currentPageName?.toLowerCase() == routeData.CONFIRMATION.name;
- const refSequenceNum = hasSubmittedOrderAtConfirmationPage
- ? submittedOrder.referralSequenceNumber
- : store.getters.order.referralSequenceNumber;
-
var payload = {
actionName: `Browser page:${currentPageName}`,
referralSequenceNumber: hasSubmittedOrderAtConfirmationPage
@@ -174,6 +173,7 @@ export default {
? submittedOrder.workOrderNumber
: store.getters.order.workOrderNumber,
conceptVariation: conceptVariation,
+ isConceptExposed: isConceptExposed,
};
await baseMixin.methods.dispatchStoreAction(
diff --git a/src/router/constants/routes.js b/src/router/constants/routes.js
index 7e9a3a793..5632fe357 100644
--- a/src/router/constants/routes.js
+++ b/src/router/constants/routes.js
@@ -56,6 +56,7 @@ export const routeData = {
path: "/insurance-company",
},
SERVICE_LOCATION: {
+ // keep even though this page has been removed from the regular flow bc Heritage still points to it
name: "service-location",
path: "/service-location",
},
diff --git a/src/router/constants/routing-table.js b/src/router/constants/routing-table.js
index 4a07bcfaf..02a0d9384 100644
--- a/src/router/constants/routing-table.js
+++ b/src/router/constants/routing-table.js
@@ -421,7 +421,7 @@ const routingTable = function () {
},
{
scenario: navigationScenarios.CLICKED_FORWARD_WITH_CASH,
- destinationPageData: routeData.SERVICE_LOCATION,
+ destinationPageData: routeData.SCHEDULE,
},
{
scenario: navigationScenarios.CLICKED_FORWARD_WITH_INSURANCE,
@@ -449,8 +449,26 @@ const routingTable = function () {
},
],
},
+ // TODO: REMOVE THIS COMMENT AND BELOW, ONCE CASH-803 (SERVICE-LOCATION AND SCHEDULE PAGE COMBINATION) HAS BEEN VETTED
+ // {
+ // pageName: routeData.SERVICE_LOCATION.name,
+ // maps: [
+ // {
+ // scenario: navigationScenarios.CLICKED_BACK,
+ // destinationPageData: routeData.QUOTE,
+ // },
+ // {
+ // scenario: navigationScenarios.CLICKED_FORWARD,
+ // destinationPageData: routeData.SCHEDULE,
+ // },
+ // {
+ // scenario: navigationScenarios.CLICKED_FORWARD_WITH_MOBILE_SERVICE,
+ // destinationPageData: routeData.MOBILE_DETAILS,
+ // },
+ // ],
+ // },
{
- pageName: routeData.SERVICE_LOCATION.name,
+ pageName: routeData.SCHEDULE.name,
maps: [
{
scenario: navigationScenarios.CLICKED_BACK,
@@ -458,37 +476,24 @@ const routingTable = function () {
},
{
scenario: navigationScenarios.CLICKED_FORWARD,
- destinationPageData: routeData.SCHEDULE,
+ destinationPageData: routeData.CUSTOMER_DETAILS,
},
+ // {
+ // scenario: navigationScenarios.CLICKED_CHANGE_LOCATION,
+ // destinationPageData: routeData.SERVICE_LOCATION,
+ // },
{
scenario: navigationScenarios.CLICKED_FORWARD_WITH_MOBILE_SERVICE,
destinationPageData: routeData.MOBILE_DETAILS,
},
],
},
- {
- pageName: routeData.SCHEDULE.name,
- maps: [
- {
- scenario: navigationScenarios.CLICKED_BACK,
- destinationPageData: routeData.SERVICE_LOCATION,
- },
- {
- scenario: navigationScenarios.CLICKED_FORWARD,
- destinationPageData: routeData.CUSTOMER_DETAILS,
- },
- {
- scenario: navigationScenarios.CLICKED_CHANGE_LOCATION,
- destinationPageData: routeData.SERVICE_LOCATION,
- },
- ],
- },
{
pageName: routeData.MOBILE_DETAILS.name,
maps: [
{
scenario: navigationScenarios.CLICKED_BACK,
- destinationPageData: routeData.SERVICE_LOCATION,
+ destinationPageData: routeData.SCHEDULE,
},
{
scenario: navigationScenarios.CLICKED_FORWARD,
diff --git a/src/router/methods/route-logic/service-location.js b/src/router/methods/route-logic/service-location.js
new file mode 100644
index 000000000..ecaebe149
--- /dev/null
+++ b/src/router/methods/route-logic/service-location.js
@@ -0,0 +1,8 @@
+import { routeData } from "@/router/constants/routes";
+
+export async function serviceLocationBeforeEnter(to, from) {
+ return {
+ name: routeData.SCHEDULE.name,
+ replace: true,
+ };
+}
diff --git a/src/router/methods/routes.js b/src/router/methods/routes.js
index 01f4f8a58..97af04068 100644
--- a/src/router/methods/routes.js
+++ b/src/router/methods/routes.js
@@ -12,6 +12,7 @@ import { errorBeforeEnter } from "@/router/methods/route-logic/error";
import { restartBeforeEnter } from "@/router/methods/route-logic/restart";
import { paymentMethodBeforeEnter } from "@/router/methods/route-logic/payment-method";
import { paymentBeforeEnter } from "@/router/methods/route-logic/payment";
+import { serviceLocationBeforeEnter } from "@/router/methods/route-logic/service-location";
export const routes = [
// Non-virtual pages.
@@ -29,7 +30,7 @@ export const routes = [
createRoute(routeData.CAPABILITY_QUESTIONS),
createRoute(routeData.QUOTE, quoteBeforeEnter),
createRoute(routeData.INSURANCE_COMPANY, insuranceCompanyBeforeEnter),
- createRoute(routeData.SERVICE_LOCATION),
+ createRoute(routeData.SERVICE_LOCATION, serviceLocationBeforeEnter),
createRoute(routeData.SCHEDULE),
createRoute(routeData.CUSTOMER_DETAILS),
createRoute(routeData.PAYMENT_METHOD, paymentMethodBeforeEnter),
diff --git a/src/store/index.js b/src/store/index.js
index 83d8d99af..4a428c9e2 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -1570,6 +1570,7 @@ export const actions = {
workOrderId,
workOrderNumber,
conceptVariation,
+ isConceptExposed,
}
) {
var payload = {
@@ -1582,6 +1583,7 @@ export const actions = {
workOrderId: workOrderId ?? "",
workOrderNumber: workOrderNumber ?? "",
conceptVariation: conceptVariation,
+ isConceptExposed: isConceptExposed,
};
return globalMethods.callHttpClient({
@@ -2099,7 +2101,7 @@ export const actions = {
return globalMethods.callHttpClient(options);
},
- getMobileTimeSlots(context, { payload: { startDate, endDate }, pageNameToLog }) {
+ getMobileTimeSlots(context, { payload: { startDate, endDate, zipCode }, pageNameToLog }) {
const order = context.state.order;
const vehicle = context.state.order.vehicle;
const payment = context.state.order.payment;
@@ -2137,7 +2139,7 @@ export const actions = {
style: vehicle.style,
vin: vehicle.vin ?? "",
},
- zipCode: order.serviceLocation.zipCode,
+ zipCode: zipCode ?? order.serviceLocation.zipCode,
};
let hasCalled = timeSlotCallFlags.mobile;
diff --git a/src/styles/ux-variables.scss b/src/styles/ux-variables.scss
index 732d1165e..bec02081f 100644
--- a/src/styles/ux-variables.scss
+++ b/src/styles/ux-variables.scss
@@ -7,6 +7,7 @@ $black-100: #0a0a0a;
// Blues
$blue-100: #e4f1f7; // Used in theme
+$blue-150: #e5f1fa;
$blue-200: #c1dfee;
$blue-300: #9fcee6;
$blue-400: #69adcf; // Used in theme
@@ -59,6 +60,7 @@ $gray: #b0b3b3; // Default Gray
$gray-500: #8e9292; // Used in theme
$gray-550: #727676; // Used in theme
$gray-600: #4d5151; // Used in theme
+$gray-650: #525656;
$gray-700: #303333; // Used in theme
$gray-800: #222424; // Used in theme
$gray-900: #181a1a; // Used in theme
@@ -128,6 +130,9 @@ $font-family-base: $font-family-sans-serif;
$font-family-code: $font-family-monospace;
$font-size-base: 1rem; // Assumes the browser default, typically `16px`
+$font-size-12: $font-size-base * 0.75; // 12px
+$font-size-20: $font-size-base * 1.25; // 20px
+
//Custom Font size (extra small)
$font-size-xsm: $font-size-base * 0.75;
$font-sizes: (