CASH-1226 - Passed mobile provider number when appointment type is mobile

This commit is contained in:
Minojhini Valaiyapathi 2025-07-24 08:24:24 -04:00
parent 0b58e0762a
commit 42c479177e

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