Merge pull request #3047 from Safelite/feature/CASH-1790-refactor-fixes

Feature/cash 1790 refactor fixes
This commit is contained in:
AdamCaouetteSafelite 2026-02-04 14:59:20 -05:00 committed by GitHub
commit d7defe9b76
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -98,11 +98,11 @@
linkWidgetName="ServiceZipLinkWidget" linkWidgetName="ServiceZipLinkWidget"
modalWidgetName="ServiceZipModalWidget" /> modalWidgetName="ServiceZipModalWidget" />
</div> </div>
<div class="row your-shop-location" v-if="showInshopComponent"> <div class="row your-shop-location" v-if="showShopLocationComponent">
<div class="col-12 col-md-10 col-lg-8 col-xl-7"> <div class="col-12 col-md-10 col-lg-8 col-xl-7">
<div> <div>
<shopLocation <shopLocation
v-if="showInshopComponent" v-if="showShopLocationComponent"
:selectedShop="selectedShopAnswer" :selectedShop="selectedShopAnswer"
:selectedProviderNumberFromParent="selectedProvider?.providerNumber" :selectedProviderNumberFromParent="selectedProvider?.providerNumber"
:shopProviderDataFromParent="shopProviderData" :shopProviderDataFromParent="shopProviderData"
@ -633,19 +633,18 @@ export default {
this.handleZipCodeChange(newValue); this.handleZipCodeChange(newValue);
}, },
}, },
showInshopComponent() { showShopLocationComponent() {
// If we get no inshop or mobile data, then show the shoplocation component so the user is not // If we get no inshop or mobile data, then show the shoplocation component so the user is not
// looking at a half blank screen with no way to try another zip/location. // looking at a half blank screen with no way to try another zip/location.
if ( if (
(this.inshopTimeSlotsData === undefined && (this.selectableDatesInshop === undefined &&
this.mobileTimeSlotsData === undefined) || this.selectableDatesMobile === undefined) ||
(this.inshopTimeSlotsData.days.length === 0 && (this.selectableDatesInshop?.days?.length === 0 &&
this.mobileTimeSlotsData.days.length === 0) || this.selectableDatesMobile?.days?.length === 0) ||
(this.appointmentType && this.appointmentType !== AppointmentTypeStrings.MOBILE) (this.appointmentType && this.appointmentType !== AppointmentTypeStrings.MOBILE)
) { ) {
return true; return true;
} }
return false; return false;
}, },
isMobileSelected() { isMobileSelected() {
@ -1844,7 +1843,6 @@ export default {
this.appointmentType = null; this.appointmentType = null;
} }
this.setSelectedDateToFirstAvailable(); // v-if on appointmentTypeQuestion ensures dates have been loaded by now this.setSelectedDateToFirstAvailable(); // v-if on appointmentTypeQuestion ensures dates have been loaded by now
this.setDisplayWaitList(); // v-if on appointmentTypeQuestion ensures dates have been loaded by now
}, },
setSelectedDateToFirstAvailable() { setSelectedDateToFirstAvailable() {
this.selectedDate = this.getFirstAvailableDate(); this.selectedDate = this.getFirstAvailableDate();