Merge pull request #2683 from Safelite/feature/CASH-1226

CASH-1226 - Passed mobile provider number when appointment type is mo…
This commit is contained in:
mvalaiyapathi 2025-07-24 08:32:14 -04:00 committed by GitHub
commit 852b4765c2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1601,10 +1601,20 @@ 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];
}
@ -1636,6 +1646,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