Merge pull request #3097 from Safelite/feature/CASH-2458
CASH-2458: Data events update for MultiLocationModal
This commit is contained in:
commit
5da1b68b34
2 changed files with 16 additions and 17 deletions
|
|
@ -80,7 +80,6 @@ export default {
|
|||
confirmedAppointment: false,
|
||||
multiLocationRadioButton: multiLocationRadioButton,
|
||||
selectedValue: null,
|
||||
experimentSettings: "",
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -124,8 +123,20 @@ export default {
|
|||
setIsModalOpen(isOpen) {
|
||||
this.isModalOpen = isOpen;
|
||||
},
|
||||
captureExperimentSettings(settingsString) {
|
||||
this.experimentSettings = settingsString;
|
||||
selectedSlotEventValue() {
|
||||
const daysUntilAppointment =
|
||||
(new Date(this.selectedAppointment.date) - new Date()) / (1000 * 60 * 60 * 24);
|
||||
const isAM = this.selectedAppointment.timeSlot.startTime < "12:00:00";
|
||||
return (
|
||||
"AM: " +
|
||||
isAM +
|
||||
" | " +
|
||||
"PM: " +
|
||||
!isAM +
|
||||
" | " +
|
||||
"Days: " +
|
||||
Math.ceil(daysUntilAppointment)
|
||||
);
|
||||
},
|
||||
pushEvent() {
|
||||
let gaAction = this.confirmedAppointment ? this.GaActions.YES : this.GaActions.NO;
|
||||
|
|
@ -143,7 +154,7 @@ export default {
|
|||
this.mobileAppointmentOption.date,
|
||||
true,
|
||||
null,
|
||||
this.experimentSettings
|
||||
this.selectedSlotEventValue()
|
||||
);
|
||||
} else if (
|
||||
this.selectedValue?.toLowerCase() === "inshop" &&
|
||||
|
|
@ -157,7 +168,7 @@ export default {
|
|||
this.inshopAppointmentOption.date,
|
||||
true,
|
||||
null,
|
||||
this.experimentSettings
|
||||
this.selectedSlotEventValue()
|
||||
);
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -2075,15 +2075,6 @@ export default {
|
|||
let maxDayRangeToShowAnyTimeslot = experimentMixin.methods.getSettingValue(
|
||||
experimentSettings.SHOW_NO_AVAILABILE_DAYS_MULTI_LOCATION
|
||||
);
|
||||
let experimentSettingsString =
|
||||
"ShowPm:" +
|
||||
maxDayRangeToShowPmTimeslot +
|
||||
"|" +
|
||||
"NoPm:" +
|
||||
maxDayRangeToShowNoPmTimeslot +
|
||||
"|" +
|
||||
"NoAvail:" +
|
||||
maxDayRangeToShowAnyTimeslot;
|
||||
let promotedMobileAppointment = null;
|
||||
let promotedInshopAppointment = null;
|
||||
const todaysDate = getTodayDate();
|
||||
|
|
@ -2205,9 +2196,6 @@ export default {
|
|||
promotedInshopAppointment
|
||||
);
|
||||
this.$refs.multiLocationModal.openModal();
|
||||
this.$refs.multiLocationModal.captureExperimentSettings(
|
||||
experimentSettingsString
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue