Merge branch 'release/2025.07.31' into feature/CASH-845-stage-6

This commit is contained in:
AdamCaouetteSafelite 2025-07-18 13:53:20 -04:00
commit e552d37031
2 changed files with 65 additions and 39 deletions

View file

@ -222,7 +222,7 @@ export default {
}, },
premiumAppointmentButtonText() { premiumAppointmentButtonText() {
return this.getCmsContent( return this.getCmsContent(
this.dropOffOrPickATimeQuestionCmsWidgetName, this.mobilePremiumCmsWidgetName,
cmsWidgetFieldMappings.TIME_SLOT_BUTTON cmsWidgetFieldMappings.TIME_SLOT_BUTTON
); );
}, },
@ -544,7 +544,8 @@ export default {
}, },
selectedDate: { selectedDate: {
handler() { handler() {
this.selectedRouteCode = null; this.selectedAnswerForDropOffOrInshop = null;
this.selectedAnswerForTimeSlots = null;
this.autoSelectTimeSlotIfOnlyOneIsAvailable(); this.autoSelectTimeSlotIfOnlyOneIsAvailable();
}, },
}, },

View file

@ -31,6 +31,10 @@
:isRequired="false" :isRequired="false"
:validationRules="''" /> :validationRules="''" />
</form> </form>
<div v-show="isLoading" class="loader-wrapper">
<loader loaderColor="blue" loaderPosition="center" />
</div>
<div v-show="!isLoading">
<alert <alert
ref="alertInvalidZip" ref="alertInvalidZip"
v-if="displayInvalidZipAlert" v-if="displayInvalidZipAlert"
@ -70,6 +74,7 @@
:aria-label="showMoreShopsLinkText" /> :aria-label="showMoreShopsLinkText" />
</div> </div>
</div> </div>
</div>
</modal> </modal>
</template> </template>
@ -87,6 +92,7 @@ import { defineRule } from "vee-validate";
import { required } from "@/helpers/validation-rules"; import { required } from "@/helpers/validation-rules";
import { errorMessages } from "@/constants/error-messages"; import { errorMessages } from "@/constants/error-messages";
import baseMixin from "@/mixins/base-mixin.js"; import baseMixin from "@/mixins/base-mixin.js";
import loader from "@/ux-components/loader/loader";
import { AppointmentTypeStrings } from "@/constants/schedule-constants"; import { AppointmentTypeStrings } from "@/constants/schedule-constants";
@ -109,6 +115,7 @@ export default {
localShopProviderData: this.shopProviderDataFromParent, localShopProviderData: this.shopProviderDataFromParent,
localSelectedProviderNumber: null, localSelectedProviderNumber: null,
zipCodeData: null, zipCodeData: null,
isLoading: false,
}; };
}, },
props: { props: {
@ -160,6 +167,7 @@ export default {
}, },
isModalFooterButtonDisabled() { isModalFooterButtonDisabled() {
return ( return (
this.isLoading ||
this.displayInvalidZipAlert || this.displayInvalidZipAlert ||
this.displayNoShopsAlert || this.displayNoShopsAlert ||
!this.localSelectedProviderNumber !this.localSelectedProviderNumber
@ -250,6 +258,13 @@ export default {
}, },
async onSearchZip(event) { async onSearchZip(event) {
event.preventDefault(); event.preventDefault();
if (!this.localZipCode) {
this.zipCodeData = {
isValid: false,
};
return;
}
this.isLoading = true;
this.zipCodeData = await this.getZipCodeData(this.localZipCode, "service-location"); this.zipCodeData = await this.getZipCodeData(this.localZipCode, "service-location");
// Add zipCode to zipCodeData as it does not come back from endpoint // Add zipCode to zipCodeData as it does not come back from endpoint
this.zipCodeData.zipCode = this.localZipCode; this.zipCodeData.zipCode = this.localZipCode;
@ -271,8 +286,11 @@ export default {
this.localShopProviderData = result.data; this.localShopProviderData = result.data;
this.numberOfShopsToDisplay = 3; this.numberOfShopsToDisplay = 3;
this.updateShopsForZip(); this.updateShopsForZip();
this.isLoading = false;
}); });
} }
} else {
this.isLoading = false;
} }
}, },
updateShopsForZip() { updateShopsForZip() {
@ -317,6 +335,7 @@ export default {
serviceZipQuestion, serviceZipQuestion,
buttonQuestion, buttonQuestion,
alert, alert,
loader,
}, },
}; };
</script> </script>
@ -444,4 +463,10 @@ export default {
display: block; display: block;
width: 100%; width: 100%;
} }
.loader-wrapper {
display: flex;
justify-content: center;
align-items: center;
max-width: 100%;
}
</style> </style>