clear mobile data if invalid zip entered
This commit is contained in:
parent
0c3515cef1
commit
e1a8f8a00c
3 changed files with 14 additions and 2 deletions
|
|
@ -29,7 +29,9 @@ export default {
|
|||
}
|
||||
},
|
||||
async beforeMount() {
|
||||
await this.createMapWithMarkersForAddresses(this.markers);
|
||||
if (this.markers && this.markers.length > 0) {
|
||||
await this.createMapWithMarkersForAddresses(this.markers);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getMap(center) {
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
:schedulingInshopAvailabilityRating="inShopAvailabilityRating"
|
||||
@appointmentTypeChanged="appointmentTypeChangedFromServiceLocation"
|
||||
@cityUpdated="cityUpdatedFromServiceLocation"
|
||||
@clearMobileData="clearMobileDataFromServiceLocation"
|
||||
@inShopZipUpdated="inShopZipUpdatedFromServiceLocation"
|
||||
@mobileZipUpdated="mobileZipUpdatedFromServiceLocation"
|
||||
@providerChanged="providerChangedFromServiceLocation" />
|
||||
|
|
@ -469,6 +470,14 @@ export default {
|
|||
cityUpdatedFromServiceLocation(newCity) {
|
||||
this.selectedServiceLocationCity = newCity;
|
||||
},
|
||||
clearMobileDataFromServiceLocation() {
|
||||
if (this.selectedServiceLocation) {
|
||||
this.selectedServiceLocation.mobileProviderNumber = null;
|
||||
}
|
||||
this.mobileDatesData = [];
|
||||
this.mobileProviderNumber = null;
|
||||
this.selectedMobileZipCode = null;
|
||||
},
|
||||
dateSelectedFromPicker(date) {
|
||||
this.selectedDate = date;
|
||||
this.showDatePickerError = false;
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ export default {
|
|||
serviceZipQuestion
|
||||
},
|
||||
mixins: [baseFormMixin],
|
||||
emits: ['appointment-type-changed', 'city-updated', 'in-shop-zip-updated', 'mobile-zip-updated', 'provider-changed'],
|
||||
emits: ['appointment-type-changed', 'city-updated', 'clear-mobile-data', 'in-shop-zip-updated', 'mobile-zip-updated', 'provider-changed'],
|
||||
props: {
|
||||
schedulingInshopAvailabilityRating: {
|
||||
type: String,
|
||||
|
|
@ -460,6 +460,7 @@ export default {
|
|||
};
|
||||
this.$emit('mobile-zip-updated', updateMobileZipServiceLocationObj);
|
||||
} else {
|
||||
this.$emit('clear-mobile-data');
|
||||
showIssLoadingModal(false);
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue