Merge branch 'develop' into defect/digital/SSR-1177.2

This commit is contained in:
Josh Dassinger 2024-04-30 09:17:30 -05:00
commit e271e67666
2 changed files with 39 additions and 41 deletions

View file

@ -123,7 +123,10 @@ export default {
openModal() {
const modal = Modal.getOrCreateInstance(document.getElementById(this.modalId));
modal?.show();
this.isOpen = true;
setTimeout(() => {
this.isOpen = true;
}, 10);
this.$emit('isModalOpened', true);
},
closeModal() {

View file

@ -5,9 +5,6 @@
@submit="onSubmit"
@invalidSubmit="onInvalidSubmit">
<div class="container-fluid fade-on-route-transition">
<div class="row justify-content-center">
<div class="col-md-6 px-0 px-md-2"></div>
</div>
<div class="row justify-content-center">
<div class="col-md-6 col-xl-4">
<siteHeader cmsWidgetName="SiteHeaderWidget" />
@ -57,7 +54,7 @@
</div>
</div>
<div class="row justify-content-center appointment-type">
<div class="col-md-6">
<div class="col-md-6 col-xl-4">
<appointmentTypeQuestion
v-show="isAppointmentTypeDisplayed"
ref="appointmentTypeQuestion"
@ -144,11 +141,11 @@ import serviceZipModalQuestion from '@/layouts/service-location/service-zip-moda
// DEFINE VALIDATION RULES
defineRule('mobile-location-required', (value) => {
if (
value.addressQuestions.streetAddress === '' ||
value.addressQuestions.city === '' ||
value.addressQuestions.state === '' ||
value.addressQuestions.zipCode === '' ||
value.isVehicleProtected == null
value.addressQuestions.streetAddress === ''
|| value.addressQuestions.city === ''
|| value.addressQuestions.state === ''
|| value.addressQuestions.zipCode === ''
|| value.isVehicleProtected == null
) {
return errorMessages.MOBILE_LOCATION_REQUIRED;
}
@ -176,8 +173,8 @@ export default {
const cmsContentPromise = fetchCmsContentForPage(to.query.issPage);
const serviceZipCode =
useMainStore().order.serviceLocation.zipCode ||
useMainStore().order.customer.address.zipCode;
useMainStore().order.serviceLocation.zipCode
|| useMainStore().order.customer.address.zipCode;
const zipCodeData = getZipCodeData(serviceZipCode);
const mobileFeePartPromise = getPricedMobileFeePart(serviceZipCode);
@ -219,9 +216,7 @@ export default {
resultMap.mobileFeePart,
resultMap.shopQuestionInitialData?.mobileProviderNumber
);
vm.$refs.shopQuestion.initializeComponent(
resultMap.shopQuestionInitialData
);
vm.$refs.shopQuestion.initializeComponent(resultMap.shopQuestionInitialData);
});
},
setup() {
@ -303,10 +298,10 @@ export default {
if (newValue.zipCode !== this.zipCode) {
if (
!(
this.selectedAppointmentType ===
AppointmentTypeStrings.MOBILE ||
this.selectedAppointmentType ===
AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP
this.selectedAppointmentType
=== AppointmentTypeStrings.MOBILE
|| this.selectedAppointmentType
=== AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP
)
) {
this.selectedAppointmentType = null;
@ -318,8 +313,8 @@ export default {
isServiceableMobile() {
if (this.isRecalibrationServiceableMobile !== null) {
return (
this.isGlassServiceableMobile &&
this.isRecalibrationServiceableMobile
this.isGlassServiceableMobile
&& this.isRecalibrationServiceableMobile
);
}
return this.isGlassServiceableMobile;
@ -327,8 +322,8 @@ export default {
isServiceableInshop() {
if (this.isRecalibrationServiceableInshop !== null) {
return (
this.isGlassServiceableInshop &&
this.isRecalibrationServiceableInshop
this.isGlassServiceableInshop
&& this.isRecalibrationServiceableInshop
);
}
@ -336,8 +331,8 @@ export default {
},
isShopQuestionDisplayed() {
return (
this.selectedAppointmentType === 'Inshop' ||
this.selectedAppointmentType === 'Dropoff'
this.selectedAppointmentType === 'Inshop'
|| this.selectedAppointmentType === 'Dropoff'
);
},
isAppointmentTypeDisplayed() {
@ -345,18 +340,18 @@ export default {
},
isMobileLocationDisplayed() {
return (
this.selectedAppointmentType ===
AppointmentTypeStrings.MOBILE ||
this.selectedAppointmentType ===
AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP
this.selectedAppointmentType
=== AppointmentTypeStrings.MOBILE
|| this.selectedAppointmentType
=== AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP
);
},
requiresInshopRecalibration() {
// Specifically check for isRecalibrationServiceableMobile === false, not null or true.
return (
this.isServiceableInshop &&
this.isGlassServiceableMobile &&
this.isRecalibrationServiceableMobile === false
this.isServiceableInshop
&& this.isGlassServiceableMobile
&& this.isRecalibrationServiceableMobile === false
);
},
displayMilitaryZipAlert() {
@ -370,9 +365,9 @@ export default {
},
displayServiceableInshopOnly() {
return (
!this.displayRecalibrationWarning &&
this.isServiceableInshop &&
!this.isServiceableMobile
!this.displayRecalibrationWarning
&& this.isServiceableInshop
&& !this.isServiceableMobile
);
},
displayServiceableMobileOnly() {
@ -388,8 +383,8 @@ export default {
methods: {
arePagePrerequisitesValid() {
return (
useMainStore().lineItems.supportingItems !== null &&
useMainStore().order.serviceLocation.zipCode !== null
useMainStore().lineItems.supportingItems !== null
&& useMainStore().order.serviceLocation.zipCode !== null
);
},
async reloadShopData(zipCode) {
@ -447,14 +442,14 @@ export default {
},
getServiceStateFromStore() {
return (
useMainStore().order.serviceLocation.state ||
useMainStore().order.customer.address.state
useMainStore().order.serviceLocation.state
|| useMainStore().order.customer.address.state
);
},
getServiceZipCodeFromStore() {
return (
useMainStore().order.serviceLocation.zipCode ||
useMainStore().order.customer.address.zipCode
useMainStore().order.serviceLocation.zipCode
|| useMainStore().order.customer.address.zipCode
);
},
getIsVehicleProtectedFromStore() {