Merge branch 'release/2025.07.31' into nation/CASH-1225
This commit is contained in:
commit
30a12ca7ca
3 changed files with 38 additions and 15 deletions
|
|
@ -1103,7 +1103,6 @@ export default {
|
|||
this.resetWaitlist();
|
||||
this.preSelectedDate = null;
|
||||
this.shopProviderData = shopQuestionPopUpData.shopProviderData;
|
||||
this.setServiceabilityDetails(shopQuestionPopUpData.serviceabilityDetails);
|
||||
const selectedProvider = this.shopProviderData.shopProviders.find((shopProvider) => {
|
||||
return shopProvider.providerNumber === shopQuestionPopUpData.selectedProviderNumber;
|
||||
});
|
||||
|
|
@ -1591,17 +1590,26 @@ export default {
|
|||
if (newProvider) {
|
||||
this.selectedProvider = newProvider;
|
||||
this.initializeDatePicker();
|
||||
} else if (this.appointmentType === this.appointmentTypeStrings.MOBILE) {
|
||||
this.selectedProvider = {
|
||||
providerNumber: this.shopProviderData.mobileProviderNumber.toString(),
|
||||
address: {
|
||||
streetAddress: null,
|
||||
city: null,
|
||||
state: null,
|
||||
zipCode: null,
|
||||
zipCodeCtu: null,
|
||||
},
|
||||
};
|
||||
} else if (
|
||||
// use closest shopProvider if none exists
|
||||
!this.selectedProvider?.address?.streetAddress &&
|
||||
this.shopProviderData?.shopProviders
|
||||
this.shopProviderData?.shopProviders?.length
|
||||
) {
|
||||
this.selectedProvider = this.shopProviderData.shopProviders[0];
|
||||
}
|
||||
},
|
||||
handleZipCodeChange(newZipCode) {
|
||||
this.resetMobileLocation();
|
||||
this.appointmentTypeFromAppointmentTypeQuestion = null;
|
||||
|
||||
getShopProviderData(newZipCode.zipCode).then((result) => {
|
||||
this.shopProviderData = result.data;
|
||||
|
|
@ -1627,6 +1635,7 @@ export default {
|
|||
this.updateFooterButtonText();
|
||||
if (newAppointmentType === AppointmentTypeStrings.MOBILE) {
|
||||
this.appointmentType = AppointmentTypeStrings.MOBILE;
|
||||
this.updateSelectedProvider();
|
||||
} else if (newAppointmentType) {
|
||||
if (this.selectedTimeSlotInfo?.timeSlot?.routeCode) {
|
||||
// update appointmentType based on routeCode to determine if it should be dropoff or inshop
|
||||
|
|
@ -1643,6 +1652,7 @@ export default {
|
|||
this.appointmentType = null;
|
||||
}
|
||||
this.selectedDate = this.getSelectedDate();
|
||||
this.setDisplayWaitList();
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@
|
|||
:answers="answersForDropOffQuestion"
|
||||
isRequired
|
||||
insertOrLabelBeforeFinalOption
|
||||
groupName="chooseDropOffOrInshop">
|
||||
groupName="chooseDropOffOrInshop"
|
||||
validationRules="time-slot-required">
|
||||
<div>
|
||||
<alert
|
||||
v-if="shouldDisplayDropOffAlert"
|
||||
|
|
@ -40,7 +41,7 @@
|
|||
v-if="supplementalInformationBlock"
|
||||
v-html="supplementalInformationBlock" />
|
||||
<div
|
||||
v-if="hasWaitListExperiment && displayWaitListFeature"
|
||||
v-if="hasWaitListExperiment && displayWaitListFeature && selectedDate"
|
||||
class="mt-5 bg-light rounded waitlist">
|
||||
<textBlock
|
||||
cmsWidgetName="WaitListLabelWidget"
|
||||
|
|
@ -53,7 +54,10 @@
|
|||
v-model="waitListRequested"
|
||||
@click="waitListChecked" />
|
||||
</div>
|
||||
<div v-if="waitListRequested" class="rounded waitlist-success" ref="waitlistSuccessMessage">
|
||||
<div
|
||||
v-if="waitListRequested && displayWaitList"
|
||||
class="rounded waitlist-success"
|
||||
ref="waitlistSuccessMessage">
|
||||
<img :src="waitListSuccessImage" class="success-image" />
|
||||
<span v-html="waitListSuccessText" class="success-text"></span>
|
||||
</div>
|
||||
|
|
@ -183,6 +187,7 @@ export default {
|
|||
let appointmentTypeCmsWidgetName;
|
||||
|
||||
if (
|
||||
this.selectedDate == null ||
|
||||
this.appointmentType === AppointmentTypeStrings.IN_SHOP_OR_DROP_OFF ||
|
||||
this.appointmentType === AppointmentTypeStrings.IN_SHOP ||
|
||||
this.appointmentType === AppointmentTypeStrings.DROP_OFF
|
||||
|
|
@ -440,6 +445,8 @@ export default {
|
|||
);
|
||||
}
|
||||
|
||||
this.resetSelectedTimeSlotIfDateChange(timeSlotsForSelectedDate);
|
||||
|
||||
return availableTimeSlots;
|
||||
},
|
||||
getPremiumAppointmentTimeSlot(timeSlotData) {
|
||||
|
|
@ -535,6 +542,20 @@ export default {
|
|||
successMessageElement.scrollIntoView({ behavior: "smooth" });
|
||||
}
|
||||
},
|
||||
resetSelectedTimeSlotIfDateChange(timeSlotsForSelectedDate) {
|
||||
if (this.selectedRouteCode) {
|
||||
const selectedRouteCodeString = this.selectedRouteCode.replace(
|
||||
PREMIUM_TIME_SLOT_ID_FLAG,
|
||||
""
|
||||
);
|
||||
const matchingTimeSlot = timeSlotsForSelectedDate.find((slot) => {
|
||||
return slot.id === selectedRouteCodeString;
|
||||
});
|
||||
if (!matchingTimeSlot) {
|
||||
this.selectedRouteCode = null;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
waitListRequested(newVal) {
|
||||
|
|
|
|||
|
|
@ -310,16 +310,8 @@ export default {
|
|||
const selectedProvider = this.shopProviders.find(
|
||||
(provider) => provider.providerNumber == this.localSelectedProviderNumber
|
||||
);
|
||||
const serviceZipCode = selectedProvider.address.zipCode;
|
||||
|
||||
// retrieve serviceability details
|
||||
const serviceabilityDetails = await getServiceabilityDetails(
|
||||
serviceZipCode,
|
||||
null,
|
||||
"service-location"
|
||||
);
|
||||
const shopQuestionPopUpData = {
|
||||
serviceabilityDetails: serviceabilityDetails.data,
|
||||
zipCodeData: this.zipCodeData,
|
||||
shopProviderData: this.localShopProviderData,
|
||||
selectedProviderNumber: this.localSelectedProviderNumber,
|
||||
|
|
|
|||
Loading…
Reference in a new issue