updates for mobile first
feel like i removed something
This commit is contained in:
parent
bc0a509c66
commit
d068ff4446
5 changed files with 185 additions and 67 deletions
|
|
@ -11,22 +11,29 @@ const GaEvents = Object.freeze({
|
||||||
|
|
||||||
const GaCategories = Object.freeze({
|
const GaCategories = Object.freeze({
|
||||||
API_RESPONSE: 'Api_Response',
|
API_RESPONSE: 'Api_Response',
|
||||||
|
CONFIRMATION_CLICKED: "confirmation clicked",
|
||||||
|
CONFIRMATION_CLICKED_INSHOP: "inshop confirmation clicked",
|
||||||
|
CONFIRMATION_CLICKED_MOBILE: "mobile confirmation clicked",
|
||||||
EVOX: 'Evox'
|
EVOX: 'Evox'
|
||||||
});
|
});
|
||||||
|
|
||||||
const GaActions = Object.freeze({
|
const GaActions = Object.freeze({
|
||||||
RESULT: 'Result',
|
|
||||||
CLICKED: 'Clicked',
|
CLICKED: 'Clicked',
|
||||||
|
NO: "no",
|
||||||
|
RESULT: 'Result',
|
||||||
|
SUBMITTED: 'Submitted',
|
||||||
VIF: 'vif',
|
VIF: 'vif',
|
||||||
SUBMITTED: 'Submitted'
|
YES: "yes",
|
||||||
});
|
});
|
||||||
|
|
||||||
const GaLabels = Object.freeze({
|
const GaLabels = Object.freeze({
|
||||||
SUCCESS: 'Success',
|
ADDRESS_LOOKUP: 'Address_Look_up',
|
||||||
ERROR: 'Error',
|
ERROR: 'Error',
|
||||||
LICENSE_PLATE_LOOKUP: 'License_Plate_Look_Up',
|
LICENSE_PLATE_LOOKUP: 'License_Plate_Look_Up',
|
||||||
|
NO: "no",
|
||||||
|
SUCCESS: 'Success',
|
||||||
VIN_LOOKUP: 'Vin_Look_Up',
|
VIN_LOOKUP: 'Vin_Look_Up',
|
||||||
ADDRESS_LOOKUP: 'Address_Look_up'
|
YES: "yes",
|
||||||
});
|
});
|
||||||
|
|
||||||
const ValueToLogTypes = Object.freeze({
|
const ValueToLogTypes = Object.freeze({
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,9 @@
|
||||||
</div>
|
</div>
|
||||||
<suggestTimeslotModal
|
<suggestTimeslotModal
|
||||||
:ref="SUGGEST_TIMESLOT_MODAL_REF_NAME"
|
:ref="SUGGEST_TIMESLOT_MODAL_REF_NAME"
|
||||||
cmsWidgetName="SuggestTimeslotModal" />
|
cmsWidgetName="SuggestTimeslotModal"
|
||||||
|
@confirmAppointmentClicked="autoSelectTimeslotConfirmed"
|
||||||
|
@seeMoreOptionsClicked="seeMoreOptions"/>
|
||||||
</Form>
|
</Form>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
|
@ -76,7 +78,7 @@ import siteFooter from '@/iss-components/site-footer/site-footer.vue';
|
||||||
import suggestTimeslotModal from '@/layouts/schedule-page/suggest-timeslot-modal/suggest-timeslot-modal.vue';
|
import suggestTimeslotModal from '@/layouts/schedule-page/suggest-timeslot-modal/suggest-timeslot-modal.vue';
|
||||||
|
|
||||||
// Supporting files
|
// Supporting files
|
||||||
import { experimentSettings } from '@/constants/experiments';
|
import { experimentSettings, experimentUniverses } from '@/constants/experiments';
|
||||||
import {
|
import {
|
||||||
AppointmentTypeStrings,
|
AppointmentTypeStrings,
|
||||||
GET_MOBILE_TIME_SLOTS,
|
GET_MOBILE_TIME_SLOTS,
|
||||||
|
|
@ -96,6 +98,7 @@ import settleAllPromises from '@/helpers/layout-helper';
|
||||||
import showIssLoadingModal from '@/helpers/loading-modal-helper.js';
|
import showIssLoadingModal from '@/helpers/loading-modal-helper.js';
|
||||||
import {
|
import {
|
||||||
getPricedMobileFeePart,
|
getPricedMobileFeePart,
|
||||||
|
getMobileZipCodeData,
|
||||||
getZipCodeData,
|
getZipCodeData,
|
||||||
mapTimeSlot
|
mapTimeSlot
|
||||||
} from '@/helpers/service-location-helper';
|
} from '@/helpers/service-location-helper';
|
||||||
|
|
@ -342,10 +345,6 @@ export default {
|
||||||
vm.setCmsContent(resultMap.cmsContent);
|
vm.setCmsContent(resultMap.cmsContent);
|
||||||
vm.$refs.serviceLocation.initializeComponent(serviceLocationData);
|
vm.$refs.serviceLocation.initializeComponent(serviceLocationData);
|
||||||
await vm.setData(resultMap.premiumFeeWithPrice, initialServiceLocationObj);
|
await vm.setData(resultMap.premiumFeeWithPrice, initialServiceLocationObj);
|
||||||
console.log('Schedule page loaded with all API calls settled');
|
|
||||||
console.log('Checking mobile first experience eligibility...');
|
|
||||||
console.log(resultMap);
|
|
||||||
console.log('Mobile first experience eligibility object:', mobileFirstObject);
|
|
||||||
await vm.checkMobileFirstExperience(mobileFirstObject);
|
await vm.checkMobileFirstExperience(mobileFirstObject);
|
||||||
showIssLoadingModal(false);
|
showIssLoadingModal(false);
|
||||||
});
|
});
|
||||||
|
|
@ -454,18 +453,54 @@ export default {
|
||||||
arePagePrerequisitesValid() {
|
arePagePrerequisitesValid() {
|
||||||
return useMainStore().order.serviceLocation.zipCode !== null;
|
return useMainStore().order.serviceLocation.zipCode !== null;
|
||||||
},
|
},
|
||||||
|
async autoSelectTimeslotConfirmed(emittedValue) {
|
||||||
|
if (this.mainStore.isNoComp || this.mainStore.isITAC) {
|
||||||
|
console.log('User is No Comp or ITAC, skipping mobile fee update on auto select timeslot confirmed');
|
||||||
|
// this.mainStore.updateMobileFee(this.mobileFeePart);
|
||||||
|
}
|
||||||
|
|
||||||
|
const providerToUse = {
|
||||||
|
providerNumber: emittedValue.mobileProviderNumber,
|
||||||
|
address: {
|
||||||
|
streetAddress: null,
|
||||||
|
city: null,
|
||||||
|
state: null,
|
||||||
|
zipCode: null,
|
||||||
|
zipCodeCtu: null
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
this.mainStore.updateServiceLocation({
|
||||||
|
state: emittedValue.zipCodeData.state,
|
||||||
|
zipCode: emittedValue.zipCodeData.zipCode,
|
||||||
|
zipCodeCtu: emittedValue.zipCodeData.zipCodeCtu,
|
||||||
|
appointmentType: AppointmentTypeStrings.MOBILE,
|
||||||
|
provider: providerToUse
|
||||||
|
});
|
||||||
|
|
||||||
|
const timeSlotToUse = {
|
||||||
|
date: emittedValue.date,
|
||||||
|
routeCode: emittedValue.timeSlot.id,
|
||||||
|
startTime: emittedValue.timeSlot.startTime,
|
||||||
|
endTime: emittedValue.timeSlot.endTime,
|
||||||
|
jobMaxMinutes: emittedValue.estimatedServiceMinutesMax,
|
||||||
|
jobMinMinutes: emittedValue.estimatedServiceMinutesMin,
|
||||||
|
};
|
||||||
|
|
||||||
|
this.mainStore.saveSchedule(timeSlotToUse);
|
||||||
|
this.$router.navigate(
|
||||||
|
this.navigationScenarios.CLICKED_FORWARD,
|
||||||
|
this.$route
|
||||||
|
);
|
||||||
|
},
|
||||||
async checkMobileFirstExperience(mobileFirstObject = {}) {
|
async checkMobileFirstExperience(mobileFirstObject = {}) {
|
||||||
const showMobileFirst = this.getSettingValue(experimentSettings.ISS_MOBILE_FIRST_SHOW_FIRST_MOBILE_APPOINTMENT);
|
const showMobileFirst = this.getSettingValue(experimentSettings.ISS_MOBILE_FIRST_SHOW_FIRST_MOBILE_APPOINTMENT);
|
||||||
console.log('Mobile first experience enabled:', showMobileFirst);
|
|
||||||
if (showMobileFirst) {
|
if (showMobileFirst) {
|
||||||
const pmMobileDaysLimit = this.getSettingValue(experimentSettings.ISS_MOBILE_FIRST_MAX_PM_MOBILE_DAYS);
|
const pmMobileDaysLimit = this.getSettingValue(experimentSettings.ISS_MOBILE_FIRST_MAX_PM_MOBILE_DAYS);
|
||||||
const mobileDaysLimit = this.getSettingValue(experimentSettings.ISS_MOBILE_FIRST_MAX_MOBILE_DAYS);
|
const mobileDaysLimit = this.getSettingValue(experimentSettings.ISS_MOBILE_FIRST_MAX_MOBILE_DAYS);
|
||||||
console.log('Checking mobile first experience eligibility...');
|
|
||||||
console.log('Mobile first experience eligibility settings - PM Mobile Days Limit:', pmMobileDaysLimit, 'Mobile Days Limit:', mobileDaysLimit);
|
|
||||||
const hasSelectedDate = !!this.getSelectedDate();
|
const hasSelectedDate = !!this.getSelectedDate();
|
||||||
const isServicableMobile = mobileFirstObject.serviceabilityDetails?.isGlassServiceableMobile;
|
const isServicableMobile = mobileFirstObject.serviceabilityDetails?.isGlassServiceableMobile;
|
||||||
if (!hasSelectedDate && isServicableMobile && mobileFirstObject.mobileProviderNumber && mobileFirstObject.zipCode) {
|
if (!hasSelectedDate && isServicableMobile && mobileFirstObject.mobileProviderNumber && mobileFirstObject.zipCode) {
|
||||||
console.log('Get Mobile Dates, Select first one and call modal... Gonna be fantastical!');
|
|
||||||
const todayDateObject = new Date();
|
const todayDateObject = new Date();
|
||||||
const todayDateString = convertDateToDateString(todayDateObject);
|
const todayDateString = convertDateToDateString(todayDateObject);
|
||||||
const calendarViewDirection = 'future';
|
const calendarViewDirection = 'future';
|
||||||
|
|
@ -506,10 +541,11 @@ export default {
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log('Mobile first experience initial data...');
|
|
||||||
console.log(initialData);
|
|
||||||
this.mobileDatesData = initialData;
|
this.mobileDatesData = initialData;
|
||||||
|
|
||||||
|
const estimatedServiceMinutesMax = initialData.initialShopTimeSlotsResponse?.estimatedServiceMinutesMaximum || 120;
|
||||||
|
const estimatedServiceMinutesMin = initialData.initialShopTimeSlotsResponse?.estimatedServiceMinutesMinimum || 90;
|
||||||
|
|
||||||
const retTimeSlotsResponse = [];
|
const retTimeSlotsResponse = [];
|
||||||
initialData.initialShopTimeSlotsResponse.days.forEach((selectableDate) => {
|
initialData.initialShopTimeSlotsResponse.days.forEach((selectableDate) => {
|
||||||
const dateObjectToPush = {
|
const dateObjectToPush = {
|
||||||
|
|
@ -543,9 +579,6 @@ export default {
|
||||||
retTimeSlotsResponse.push(dateObjectToPush);
|
retTimeSlotsResponse.push(dateObjectToPush);
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log('Mobile first experience mapped time slots response...');
|
|
||||||
console.log(retTimeSlotsResponse);
|
|
||||||
|
|
||||||
let dateDifferenceForPmMobile = null;
|
let dateDifferenceForPmMobile = null;
|
||||||
const firstPmMobileDateWithTimeSlots = retTimeSlotsResponse.find((date) => {
|
const firstPmMobileDateWithTimeSlots = retTimeSlotsResponse.find((date) => {
|
||||||
const hasPmMobileTimeSlots = date.afternoonTimeSlots?.length > 0;
|
const hasPmMobileTimeSlots = date.afternoonTimeSlots?.length > 0;
|
||||||
|
|
@ -570,26 +603,30 @@ export default {
|
||||||
return hasPmMobileTimeSlots;
|
return hasPmMobileTimeSlots;
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log('First PM mobile date with time slots:', firstPmMobileDateWithTimeSlots);
|
const zipCodeData = await getMobileZipCodeData(mobileFirstObject.zipCode);
|
||||||
console.log('Date difference for PM mobile:', dateDifferenceForPmMobile);
|
if ((firstPmMobileDateWithTimeSlots || firstMobileDateWithTimeSlots) && zipCodeData?.isValid) {
|
||||||
console.log('First mobile date with time slots:', firstMobileDateWithTimeSlots);
|
const timeSlotForAutoSelectionMobile = {
|
||||||
console.log('Date difference for mobile:', dateDifferenceForMobile);
|
date: firstPmMobileDateWithTimeSlots ? firstPmMobileDateWithTimeSlots.date : firstMobileDateWithTimeSlots.date,
|
||||||
|
estimatedServiceMinutesMax,
|
||||||
|
estimatedServiceMinutesMin,
|
||||||
|
mobileProviderNumber: mobileFirstObject.mobileProviderNumber,
|
||||||
|
timeSlot: firstPmMobileDateWithTimeSlots ? firstPmMobileDateWithTimeSlots.afternoonTimeSlots[0]
|
||||||
|
: (firstMobileDateWithTimeSlots.morningTimeSlots[0] || firstMobileDateWithTimeSlots.afternoonTimeSlots[0]),
|
||||||
|
zipCodeData
|
||||||
|
};
|
||||||
|
|
||||||
if (firstPmMobileDateWithTimeSlots || firstMobileDateWithTimeSlots) {
|
const dateObjectToUse = new Date(`${timeSlotForAutoSelectionMobile.date}T${timeSlotForAutoSelectionMobile.timeSlot.startTime}:00`);
|
||||||
if (firstPmMobileDateWithTimeSlots) {
|
timeSlotForAutoSelectionMobile.dateObject = dateObjectToUse;
|
||||||
console.log('Found afternoon timeslot within PM mobile dayslimit:', pmMobileDaysLimit);
|
timeSlotForAutoSelectionMobile.dayOfWeek = dateObjectToUse.toLocaleDateString('en-US', { weekday: 'long' });
|
||||||
console.log(firstPmMobileDateWithTimeSlots.afternoonTimeSlots[0]);
|
|
||||||
|
const experiment = this.getExperimentByName(experimentUniverses.ISS_MOBILE_FIRST_APPOINTMENTS);
|
||||||
|
if (experiment && !experiment.isExposed) {
|
||||||
|
this.mainStore.logMobileFirstExperimentExposure();
|
||||||
} else {
|
} else {
|
||||||
if (firstMobileDateWithTimeSlots) {
|
console.log('Mobile experiment exposed already....');
|
||||||
console.log('No afternoon timeslot within PM mobile dayslimit. Checking for any mobile timeslot within mobile dayslimit:', mobileDaysLimit);
|
|
||||||
console.log(firstMobileDateWithTimeSlots.morningTimeSlots.length > 0
|
|
||||||
? firstMobileDateWithTimeSlots.morningTimeSlots[0]
|
|
||||||
: firstMobileDateWithTimeSlots.afternoonTimeSlots[0]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(this.$refs[SUGGEST_TIMESLOT_MODAL_REF_NAME]);
|
this.$refs[SUGGEST_TIMESLOT_MODAL_REF_NAME].openModal(timeSlotForAutoSelectionMobile);
|
||||||
this.$refs[SUGGEST_TIMESLOT_MODAL_REF_NAME].openModal();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -648,7 +685,6 @@ export default {
|
||||||
this.selectedMobileZipCode = null;
|
this.selectedMobileZipCode = null;
|
||||||
},
|
},
|
||||||
dateSelectedFromPicker(date) {
|
dateSelectedFromPicker(date) {
|
||||||
console.log('Schedule selected date from picker', date);
|
|
||||||
this.selectedDate = date;
|
this.selectedDate = date;
|
||||||
this.showDatePickerError = false;
|
this.showDatePickerError = false;
|
||||||
},
|
},
|
||||||
|
|
@ -874,7 +910,6 @@ export default {
|
||||||
this.selectableDatesData = data.initialShopTimeSlotsResponse;
|
this.selectableDatesData = data.initialShopTimeSlotsResponse;
|
||||||
this.$refs.datePicker.initializeComponent(data);
|
this.$refs.datePicker.initializeComponent(data);
|
||||||
this.isDatePickerRefreshing = false;
|
this.isDatePickerRefreshing = false;
|
||||||
console.log('Date picker refreshed with new provider/zip code data');
|
|
||||||
showIssLoadingModal(false);
|
showIssLoadingModal(false);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
@ -883,6 +918,9 @@ export default {
|
||||||
this.selectedTimeSlotInfo = null;
|
this.selectedTimeSlotInfo = null;
|
||||||
this.showDatePickerError = false;
|
this.showDatePickerError = false;
|
||||||
},
|
},
|
||||||
|
async seeMoreOptions(emittedValue) {
|
||||||
|
console.log(emittedValue);
|
||||||
|
},
|
||||||
timeSlotSelectedFromPicker(timeSlot) {
|
timeSlotSelectedFromPicker(timeSlot) {
|
||||||
this.selectedTimeSlotInfo = timeSlot;
|
this.selectedTimeSlotInfo = timeSlot;
|
||||||
this.showDatePickerError = false;
|
this.showDatePickerError = false;
|
||||||
|
|
|
||||||
|
|
@ -2,40 +2,30 @@
|
||||||
<div class="suggest-timeslot-modal-container">
|
<div class="suggest-timeslot-modal-container">
|
||||||
<modal
|
<modal
|
||||||
ref="suggestTimeslotModal"
|
ref="suggestTimeslotModal"
|
||||||
:footerButtonText="modalCloseButtonText"
|
:onModalClosedCallback="onModalClosed">
|
||||||
@footerButtonEvent="footerButtonClick">
|
|
||||||
<div>
|
<div>
|
||||||
<div class="header">GOOD NEWS!</div>
|
<div class="header">{{ modalHeaderText }}</div>
|
||||||
<div class="subheader">We can come to you for free!</div>
|
<div class="subheader">{{ modalHeaderSubText }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="message">
|
<div class="message"
|
||||||
We can <span class="emphasize">replace</span> your glass on <span class="emphasize">Monday</span> — fast, easy, and at your location.
|
v-html="modalBodyText">
|
||||||
</div>
|
</div>
|
||||||
<div class="appointment-info">
|
<div class="appointment-info"
|
||||||
<div>
|
v-html="modalAppointmentInformationText">
|
||||||
<span class="emphasize">Date:</span>
|
|
||||||
<span>Monday, March 16, 2026</span>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<span class="emphasize">Appointment Window:</span>
|
|
||||||
<span>12:00 PM - 5:00 PM</span>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<span class="emphasize">Estimated Length:</span>
|
|
||||||
<span>1.5 - 2 hours</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer-container">
|
<div class="footer-container">
|
||||||
<div>
|
<div>
|
||||||
<button type="button" aria-live="polite" aria-label="Confirm Appointment" class="btn btn-danger confirm-appointment">
|
<button type="button" aria-live="polite" aria-label="Confirm Appointment" class="btn btn-danger confirm-appointment"
|
||||||
Confirm Appointment
|
@click="confirmAppointmentClicked">
|
||||||
|
{{ modalCloseButtonText }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button type="button" aria-live="polite" aria-label="See more options" class="btn btn-link see-more-options">
|
<button type="button" aria-live="polite" aria-label="See more options" class="btn btn-link see-more-options"
|
||||||
See more options
|
@click="seeMoreOptionsClicked">
|
||||||
|
{{ modalFooterSubText }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -45,12 +35,24 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import modal from '@/digital-components/modal/modal.vue';
|
import modal from '@/digital-components/modal/modal.vue';
|
||||||
|
import {
|
||||||
|
convertDateToTwoDigitDay,
|
||||||
|
getDisplayTextForDurationLength,
|
||||||
|
militaryToTwelveHourTime
|
||||||
|
} from '@/helpers/date-helper';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'suggest-timeslot-modal',
|
name: 'suggest-timeslot-modal',
|
||||||
components: {
|
components: {
|
||||||
modal
|
modal
|
||||||
},
|
},
|
||||||
|
emits: ['confirm-appointment-clicked', 'see-more-options-clicked'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
confirmedAppointment: false,
|
||||||
|
timeSlotForAutoSelectionMobile: {}
|
||||||
|
};
|
||||||
|
},
|
||||||
props: {
|
props: {
|
||||||
cmsWidgetName: {
|
cmsWidgetName: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|
@ -58,25 +60,89 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
modalHeaderText() {
|
customAppointmentEstimate() {
|
||||||
return 'Header here...'; // this.getCmsContent(this.cmsWidgetName, 'HeaderText');
|
return getDisplayTextForDurationLength(this.timeSlotForAutoSelectionMobile.estimatedServiceMinutesMin, this.timeSlotForAutoSelectionMobile.estimatedServiceMinutesMax)
|
||||||
|
},
|
||||||
|
customAppointmentWindow() {
|
||||||
|
return `${militaryToTwelveHourTime(this.timeSlotForAutoSelectionMobile?.timeSlot?.startTime)} - ${militaryToTwelveHourTime(this.timeSlotForAutoSelectionMobile?.timeSlot?.endTime)}`;
|
||||||
|
},
|
||||||
|
customDayOfWeek() {
|
||||||
|
return this.timeSlotForAutoSelectionMobile.dayOfWeek ? this.timeSlotForAutoSelectionMobile.dayOfWeek : '';
|
||||||
|
},
|
||||||
|
customDayOfWeekMonthDayYear() {
|
||||||
|
if (!this.timeSlotForAutoSelectionMobile?.date) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
const dayOfWeekToUse = this.customDayOfWeek;
|
||||||
|
const year = this.timeSlotForAutoSelectionMobile.dateObject.getFullYear();
|
||||||
|
const month = this.timeSlotForAutoSelectionMobile.dateObject.toLocaleString('en-US', { month: 'long' });
|
||||||
|
const day = convertDateToTwoDigitDay(this.timeSlotForAutoSelectionMobile.dateObject);
|
||||||
|
return `${dayOfWeekToUse}, ${month} ${day}, ${year}`;
|
||||||
|
},
|
||||||
|
modalAppointmentInformationText() {
|
||||||
|
return this.getCmsContent(this.cmsWidgetName, 'BodyText2')
|
||||||
|
.replaceAll('{custom:dowMonthDayYear}', this.customDayOfWeekMonthDayYear)
|
||||||
|
.replaceAll('{custom:appointmentEstimate}', this.customAppointmentEstimate)
|
||||||
|
.replaceAll('{custom:appointmentWindow}', this.customAppointmentWindow);
|
||||||
},
|
},
|
||||||
modalBodyText() {
|
modalBodyText() {
|
||||||
return 'Body here...'; // this.getCmsContent(this.cmsWidgetName, 'BodyText');
|
return this.getCmsContent(this.cmsWidgetName, 'BodyText').replaceAll('{custom:dayOfWeekLong}', this.customDayOfWeek);
|
||||||
},
|
},
|
||||||
modalCloseButtonText() {
|
modalCloseButtonText() {
|
||||||
return 'Confirm Appointment'; // this.getCmsContent(this.cmsWidgetName, 'FooterText');
|
return this.getCmsContent(this.cmsWidgetName, 'FooterText');
|
||||||
}
|
},
|
||||||
|
modalFooterSubText() {
|
||||||
|
return 'See more options';
|
||||||
|
},
|
||||||
|
modalHeaderSubText() {
|
||||||
|
return this.getCmsContent(this.cmsWidgetName, 'SubheaderText');
|
||||||
|
},
|
||||||
|
modalHeaderText() {
|
||||||
|
return this.getCmsContent(this.cmsWidgetName, 'HeaderText');
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
openModal() {
|
confirmAppointmentClicked() {
|
||||||
|
this.confirmedAppointment = true;
|
||||||
|
this.$emit('confirm-appointment-clicked', this.timeSlotForAutoSelectionMobile);
|
||||||
|
this.$refs.suggestTimeslotModal.closeModal();
|
||||||
|
},
|
||||||
|
onModalClosed() {
|
||||||
|
this.pushEvent();
|
||||||
|
this.confirmedAppointment = false;
|
||||||
|
this.timeSlotForAutoSelectionMobile = {};
|
||||||
|
|
||||||
|
// this.$emit("close-mobile-first-modal");
|
||||||
|
// this.confirmedAppointment = false;
|
||||||
|
},
|
||||||
|
openModal(timeSlotForAutoSelectionMobile) {
|
||||||
|
this.timeSlotForAutoSelectionMobile = timeSlotForAutoSelectionMobile;
|
||||||
this.$refs.suggestTimeslotModal.openModal();
|
this.$refs.suggestTimeslotModal.openModal();
|
||||||
},
|
},
|
||||||
|
pushEvent() {
|
||||||
|
const gaAction = this.confirmedAppointment ? this.GaActions.YES : this.GaActions.NO;
|
||||||
|
if (this.timeSlotForAutoSelectionMobile && this.timeSlotForAutoSelectionMobile.timeSlot) {
|
||||||
|
this.pushEventToGA(
|
||||||
|
this.GaCategories.CONFIRMATION_CLICKED,
|
||||||
|
gaAction,
|
||||||
|
this.timeSlotForAutoSelectionMobile.timeSlot.startTime +
|
||||||
|
"-" +
|
||||||
|
this.timeSlotForAutoSelectionMobile.timeSlot.endTime +
|
||||||
|
" " +
|
||||||
|
this.timeSlotForAutoSelectionMobile.date,
|
||||||
|
true
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
seeMoreOptionsClicked() {
|
||||||
|
this.$emit('see-more-options-clicked');
|
||||||
|
this.$refs.suggestTimeslotModal.closeModal();
|
||||||
|
},
|
||||||
footerButtonClick() {
|
footerButtonClick() {
|
||||||
this.$refs.suggestTimeslotModal.closeModal();
|
this.$refs.suggestTimeslotModal.closeModal();
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,10 @@ export default {
|
||||||
hasSetting(settingName) {
|
hasSetting(settingName) {
|
||||||
return Object.hasOwn(useMainStore().experimentSettings, settingName);
|
return Object.hasOwn(useMainStore().experimentSettings, settingName);
|
||||||
},
|
},
|
||||||
|
getExperimentByName(experimentName) {
|
||||||
|
const experiment = useMainStore().applicationUser.experiments.find((e) => e.universeName === experimentName);
|
||||||
|
return experiment ? experiment : null;
|
||||||
|
},
|
||||||
getSettingValue(settingName) {
|
getSettingValue(settingName) {
|
||||||
return this.hasSetting(settingName)
|
return this.hasSetting(settingName)
|
||||||
? useMainStore().experimentSettings[settingName]
|
? useMainStore().experimentSettings[settingName]
|
||||||
|
|
|
||||||
|
|
@ -2587,6 +2587,9 @@ export const useMainStore = defineStore({
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
logMobileFirstExperimentExposure() {
|
||||||
|
this.logExperimentIfExists(issPageValues.SCHEDULE_PAGE, experimentUniverses.ISS_MOBILE_FIRST_APPOINTMENTS);
|
||||||
|
},
|
||||||
logWelcomePageExperiments(issPage) {
|
logWelcomePageExperiments(issPage) {
|
||||||
this.logExperimentIfExists(issPage, experimentUniverses.ISS_FEATURETOGGLE_AREFEES_HIDDEN);
|
this.logExperimentIfExists(issPage, experimentUniverses.ISS_FEATURETOGGLE_AREFEES_HIDDEN);
|
||||||
this.logExperimentIfExists(issPage, experimentUniverses.ISS_FEATURETOGGLE_AREFEES_OVERRIDDEN);
|
this.logExperimentIfExists(issPage, experimentUniverses.ISS_FEATURETOGGLE_AREFEES_OVERRIDDEN);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue