Merge branch 'release/2025.05.22' into feature/Digital/CASH-709
This commit is contained in:
commit
56b963297e
6 changed files with 35 additions and 16 deletions
|
|
@ -1001,6 +1001,7 @@ export default {
|
|||
min-width: 2.5rem;
|
||||
width: 2.5rem;
|
||||
height: 2.5rem;
|
||||
border: 2px solid transparent;
|
||||
|
||||
span {
|
||||
&.small {
|
||||
|
|
|
|||
|
|
@ -240,7 +240,6 @@ export default {
|
|||
this.internalModel.addressQuestions.zipCode === "" ||
|
||||
this.internalModel.addressQuestions.zipCode.length !== 5
|
||||
) {
|
||||
this.setMobileLocationInvalid(true);
|
||||
return;
|
||||
}
|
||||
const zipCodeData = await this.getZipCodeData(
|
||||
|
|
@ -251,12 +250,10 @@ export default {
|
|||
if (!zipCodeData.isValid) {
|
||||
this.displayMismatchStateAndZipAlert = false;
|
||||
this.displayInvalidZipAlert = true;
|
||||
this.setMobileLocationInvalid(true);
|
||||
return;
|
||||
} else if (zipCodeData.state != this.internalModel.addressQuestions.state) {
|
||||
this.displayInvalidZipAlert = false;
|
||||
this.displayMismatchStateAndZipAlert = true;
|
||||
this.setMobileLocationInvalid(true);
|
||||
return;
|
||||
} else if (
|
||||
this.internalModel.addressQuestions.zipCode !==
|
||||
|
|
@ -299,7 +296,6 @@ export default {
|
|||
}
|
||||
// update the page level model
|
||||
this.$emit("setMobileLocation", this.internalModel);
|
||||
this.setMobileLocationInvalid(false);
|
||||
},
|
||||
toggleMobileLocation() {
|
||||
this.isMobileLocationOpened = !this.isMobileLocationOpened;
|
||||
|
|
|
|||
|
|
@ -355,6 +355,7 @@ describe("service-location.vue", () => {
|
|||
zipCode: "61606",
|
||||
},
|
||||
isVehicleProtected: null,
|
||||
isMobileSelected: false,
|
||||
};
|
||||
|
||||
// Act
|
||||
|
|
@ -468,6 +469,7 @@ describe("service-location.vue", () => {
|
|||
zipCode: "43054",
|
||||
},
|
||||
isVehicleProtected: true,
|
||||
isMobileSelected: false,
|
||||
};
|
||||
|
||||
//wrapper.vm.closeModalAction = jest.fn();
|
||||
|
|
|
|||
|
|
@ -175,12 +175,12 @@ const MOBILE_FEE_PART_TYPE = "MOBILE FEE";
|
|||
// DEFINE VALIDATION RULES
|
||||
defineRule("mobile-location-required", (value) => {
|
||||
if (
|
||||
value.isMobileSelected &&
|
||||
(!value.addressQuestions.streetAddress ||
|
||||
!value.addressQuestions.city ||
|
||||
!value.addressQuestions.state ||
|
||||
!value.addressQuestions.zipCode ||
|
||||
!value.isVehicleProtected) &&
|
||||
value.isMobileSelected
|
||||
!value.isVehicleProtected)
|
||||
) {
|
||||
return errorMessages.MOBILE_LOCATION_REQUIRED;
|
||||
}
|
||||
|
|
@ -305,6 +305,9 @@ export default {
|
|||
zipCode: this.zipCode,
|
||||
},
|
||||
isVehicleProtected: this.isVehicleProtected,
|
||||
isMobileSelected:
|
||||
this.selectedAppointmentType == AppointmentTypeStrings.MOBILE &&
|
||||
!this.getIsMobileLocationOpened(),
|
||||
};
|
||||
},
|
||||
},
|
||||
|
|
@ -523,6 +526,7 @@ export default {
|
|||
}
|
||||
if (this.isServiceableMobile) {
|
||||
this.setMobileLocation(newValue);
|
||||
this.setMobileLocationInValid(false);
|
||||
} else {
|
||||
await getZipCodeData(newZipCode).then((zipCodeData) => {
|
||||
this.serviceZipCodeQuestion = {
|
||||
|
|
@ -753,11 +757,16 @@ export default {
|
|||
},
|
||||
displayMobileAddressQuestion(openMobileLocation) {
|
||||
var mobileLocationQuestionsRef = this.$refs.mobileLocationQuestions;
|
||||
var isMobileAddressComplete = mobileLocationQuestionsRef.isMobileAddressComplete;
|
||||
if (isMobileAddressComplete) {
|
||||
var isMobileAddressComplete = mobileLocationQuestionsRef?.isMobileAddressComplete;
|
||||
if (isMobileAddressComplete?.()) {
|
||||
mobileLocationQuestionsRef.isMobileLocationOpened = false;
|
||||
} else {
|
||||
mobileLocationQuestionsRef.isMobileLocationOpened = openMobileLocation;
|
||||
}
|
||||
},
|
||||
getIsMobileLocationOpened() {
|
||||
return this.$refs.mobileLocationQuestions?.isMobileLocationOpened;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
zipCode: {
|
||||
|
|
@ -769,10 +778,8 @@ export default {
|
|||
this.selectedProvider = new Provider(
|
||||
this.shopProviderData.mobileProviderNumber
|
||||
);
|
||||
this.displayMobileAddressQuestion(true);
|
||||
} else {
|
||||
this.selectedProvider = new Provider();
|
||||
this.displayMobileAddressQuestion(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -192,7 +192,12 @@ export default {
|
|||
vm.selectedWindshieldOptions.selectedWindshieldReplaceOptions.push(
|
||||
damageLocationsSelected.SINGLE
|
||||
);
|
||||
return vm.forwardButtonAction();
|
||||
if (
|
||||
store.getters.externalParameterState.isExternalParameter &&
|
||||
store.getters.externalParameterDamage.damageType !== "other"
|
||||
) {
|
||||
return vm.forwardButtonAction();
|
||||
}
|
||||
}
|
||||
baseMixin.methods.ResetExternalParamsAndHideModal();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3621,25 +3621,25 @@ export function mapTaxedLineItemsToStoreFormat(availableLineItems, storeLineItem
|
|||
export function getArrayOfAllLineItemsAndChildParts(lineItems) {
|
||||
let consolidatedLineItemsArray = [];
|
||||
|
||||
if (lineItems.glassParts != null)
|
||||
if (lineItems?.glassParts != null)
|
||||
consolidatedLineItemsArray = [
|
||||
...consolidatedLineItemsArray,
|
||||
...getFlattenedArrayOfLineItemsWithChildParts(lineItems.glassParts),
|
||||
];
|
||||
|
||||
if (lineItems.supportingItems != null)
|
||||
if (lineItems?.supportingItems != null)
|
||||
consolidatedLineItemsArray = [
|
||||
...consolidatedLineItemsArray,
|
||||
...getFlattenedArrayOfLineItemsWithChildParts(lineItems.supportingItems),
|
||||
];
|
||||
|
||||
if (lineItems.vaps != null)
|
||||
if (lineItems?.vaps != null)
|
||||
consolidatedLineItemsArray = [
|
||||
...consolidatedLineItemsArray,
|
||||
...getFlattenedArrayOfLineItemsWithChildParts(lineItems.vaps),
|
||||
];
|
||||
|
||||
if (lineItems.promos != null)
|
||||
if (lineItems?.promos != null)
|
||||
consolidatedLineItemsArray = [
|
||||
...consolidatedLineItemsArray,
|
||||
...getFlattenedArrayOfLineItemsWithChildParts(lineItems.promos),
|
||||
|
|
@ -3789,7 +3789,15 @@ function supportingItemsEqual(supportingItemsA, supportingItemsB) {
|
|||
// if so, make sure it's not in the past. if in the past, clear schedule info in store.
|
||||
// if date not in past, then call schedule service to verify appointment is still available.
|
||||
async function resetScheduleIfUnavailable(context, order, pageNameToLog) {
|
||||
if (!order.schedule?.date) {
|
||||
// lineItems empty can happen when a customer goes all the way through scheduling as cash but then
|
||||
// switches to insurance AND also switches vehicles during policy lookup. If you call shop-time-slots
|
||||
// without parts, you get 500 errors so skip the call.
|
||||
const lineItems = getArrayOfAllLineItemsAndChildParts(order.lineItems);
|
||||
|
||||
if (!order.schedule?.date || lineItems.length === 0) {
|
||||
console.log(new Date() + " no schedule date or lineItems. skip resetSchedule logic.");
|
||||
console.log(new Date() + " schedule.schedule.date" + JSON.stringify(order.schedule));
|
||||
console.log(new Date() + " lineItems" + JSON.stringify(order.lineItems));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue