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;
|
min-width: 2.5rem;
|
||||||
width: 2.5rem;
|
width: 2.5rem;
|
||||||
height: 2.5rem;
|
height: 2.5rem;
|
||||||
|
border: 2px solid transparent;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
&.small {
|
&.small {
|
||||||
|
|
|
||||||
|
|
@ -240,7 +240,6 @@ export default {
|
||||||
this.internalModel.addressQuestions.zipCode === "" ||
|
this.internalModel.addressQuestions.zipCode === "" ||
|
||||||
this.internalModel.addressQuestions.zipCode.length !== 5
|
this.internalModel.addressQuestions.zipCode.length !== 5
|
||||||
) {
|
) {
|
||||||
this.setMobileLocationInvalid(true);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const zipCodeData = await this.getZipCodeData(
|
const zipCodeData = await this.getZipCodeData(
|
||||||
|
|
@ -251,12 +250,10 @@ export default {
|
||||||
if (!zipCodeData.isValid) {
|
if (!zipCodeData.isValid) {
|
||||||
this.displayMismatchStateAndZipAlert = false;
|
this.displayMismatchStateAndZipAlert = false;
|
||||||
this.displayInvalidZipAlert = true;
|
this.displayInvalidZipAlert = true;
|
||||||
this.setMobileLocationInvalid(true);
|
|
||||||
return;
|
return;
|
||||||
} else if (zipCodeData.state != this.internalModel.addressQuestions.state) {
|
} else if (zipCodeData.state != this.internalModel.addressQuestions.state) {
|
||||||
this.displayInvalidZipAlert = false;
|
this.displayInvalidZipAlert = false;
|
||||||
this.displayMismatchStateAndZipAlert = true;
|
this.displayMismatchStateAndZipAlert = true;
|
||||||
this.setMobileLocationInvalid(true);
|
|
||||||
return;
|
return;
|
||||||
} else if (
|
} else if (
|
||||||
this.internalModel.addressQuestions.zipCode !==
|
this.internalModel.addressQuestions.zipCode !==
|
||||||
|
|
@ -299,7 +296,6 @@ export default {
|
||||||
}
|
}
|
||||||
// update the page level model
|
// update the page level model
|
||||||
this.$emit("setMobileLocation", this.internalModel);
|
this.$emit("setMobileLocation", this.internalModel);
|
||||||
this.setMobileLocationInvalid(false);
|
|
||||||
},
|
},
|
||||||
toggleMobileLocation() {
|
toggleMobileLocation() {
|
||||||
this.isMobileLocationOpened = !this.isMobileLocationOpened;
|
this.isMobileLocationOpened = !this.isMobileLocationOpened;
|
||||||
|
|
|
||||||
|
|
@ -355,6 +355,7 @@ describe("service-location.vue", () => {
|
||||||
zipCode: "61606",
|
zipCode: "61606",
|
||||||
},
|
},
|
||||||
isVehicleProtected: null,
|
isVehicleProtected: null,
|
||||||
|
isMobileSelected: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
|
|
@ -468,6 +469,7 @@ describe("service-location.vue", () => {
|
||||||
zipCode: "43054",
|
zipCode: "43054",
|
||||||
},
|
},
|
||||||
isVehicleProtected: true,
|
isVehicleProtected: true,
|
||||||
|
isMobileSelected: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
//wrapper.vm.closeModalAction = jest.fn();
|
//wrapper.vm.closeModalAction = jest.fn();
|
||||||
|
|
|
||||||
|
|
@ -175,12 +175,12 @@ const MOBILE_FEE_PART_TYPE = "MOBILE FEE";
|
||||||
// DEFINE VALIDATION RULES
|
// DEFINE VALIDATION RULES
|
||||||
defineRule("mobile-location-required", (value) => {
|
defineRule("mobile-location-required", (value) => {
|
||||||
if (
|
if (
|
||||||
|
value.isMobileSelected &&
|
||||||
(!value.addressQuestions.streetAddress ||
|
(!value.addressQuestions.streetAddress ||
|
||||||
!value.addressQuestions.city ||
|
!value.addressQuestions.city ||
|
||||||
!value.addressQuestions.state ||
|
!value.addressQuestions.state ||
|
||||||
!value.addressQuestions.zipCode ||
|
!value.addressQuestions.zipCode ||
|
||||||
!value.isVehicleProtected) &&
|
!value.isVehicleProtected)
|
||||||
value.isMobileSelected
|
|
||||||
) {
|
) {
|
||||||
return errorMessages.MOBILE_LOCATION_REQUIRED;
|
return errorMessages.MOBILE_LOCATION_REQUIRED;
|
||||||
}
|
}
|
||||||
|
|
@ -305,6 +305,9 @@ export default {
|
||||||
zipCode: this.zipCode,
|
zipCode: this.zipCode,
|
||||||
},
|
},
|
||||||
isVehicleProtected: this.isVehicleProtected,
|
isVehicleProtected: this.isVehicleProtected,
|
||||||
|
isMobileSelected:
|
||||||
|
this.selectedAppointmentType == AppointmentTypeStrings.MOBILE &&
|
||||||
|
!this.getIsMobileLocationOpened(),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -523,6 +526,7 @@ export default {
|
||||||
}
|
}
|
||||||
if (this.isServiceableMobile) {
|
if (this.isServiceableMobile) {
|
||||||
this.setMobileLocation(newValue);
|
this.setMobileLocation(newValue);
|
||||||
|
this.setMobileLocationInValid(false);
|
||||||
} else {
|
} else {
|
||||||
await getZipCodeData(newZipCode).then((zipCodeData) => {
|
await getZipCodeData(newZipCode).then((zipCodeData) => {
|
||||||
this.serviceZipCodeQuestion = {
|
this.serviceZipCodeQuestion = {
|
||||||
|
|
@ -753,11 +757,16 @@ export default {
|
||||||
},
|
},
|
||||||
displayMobileAddressQuestion(openMobileLocation) {
|
displayMobileAddressQuestion(openMobileLocation) {
|
||||||
var mobileLocationQuestionsRef = this.$refs.mobileLocationQuestions;
|
var mobileLocationQuestionsRef = this.$refs.mobileLocationQuestions;
|
||||||
var isMobileAddressComplete = mobileLocationQuestionsRef.isMobileAddressComplete;
|
var isMobileAddressComplete = mobileLocationQuestionsRef?.isMobileAddressComplete;
|
||||||
if (isMobileAddressComplete) {
|
if (isMobileAddressComplete?.()) {
|
||||||
|
mobileLocationQuestionsRef.isMobileLocationOpened = false;
|
||||||
|
} else {
|
||||||
mobileLocationQuestionsRef.isMobileLocationOpened = openMobileLocation;
|
mobileLocationQuestionsRef.isMobileLocationOpened = openMobileLocation;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
getIsMobileLocationOpened() {
|
||||||
|
return this.$refs.mobileLocationQuestions?.isMobileLocationOpened;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
zipCode: {
|
zipCode: {
|
||||||
|
|
@ -769,10 +778,8 @@ export default {
|
||||||
this.selectedProvider = new Provider(
|
this.selectedProvider = new Provider(
|
||||||
this.shopProviderData.mobileProviderNumber
|
this.shopProviderData.mobileProviderNumber
|
||||||
);
|
);
|
||||||
this.displayMobileAddressQuestion(true);
|
|
||||||
} else {
|
} else {
|
||||||
this.selectedProvider = new Provider();
|
this.selectedProvider = new Provider();
|
||||||
this.displayMobileAddressQuestion(false);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -192,7 +192,12 @@ export default {
|
||||||
vm.selectedWindshieldOptions.selectedWindshieldReplaceOptions.push(
|
vm.selectedWindshieldOptions.selectedWindshieldReplaceOptions.push(
|
||||||
damageLocationsSelected.SINGLE
|
damageLocationsSelected.SINGLE
|
||||||
);
|
);
|
||||||
return vm.forwardButtonAction();
|
if (
|
||||||
|
store.getters.externalParameterState.isExternalParameter &&
|
||||||
|
store.getters.externalParameterDamage.damageType !== "other"
|
||||||
|
) {
|
||||||
|
return vm.forwardButtonAction();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
baseMixin.methods.ResetExternalParamsAndHideModal();
|
baseMixin.methods.ResetExternalParamsAndHideModal();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3621,25 +3621,25 @@ export function mapTaxedLineItemsToStoreFormat(availableLineItems, storeLineItem
|
||||||
export function getArrayOfAllLineItemsAndChildParts(lineItems) {
|
export function getArrayOfAllLineItemsAndChildParts(lineItems) {
|
||||||
let consolidatedLineItemsArray = [];
|
let consolidatedLineItemsArray = [];
|
||||||
|
|
||||||
if (lineItems.glassParts != null)
|
if (lineItems?.glassParts != null)
|
||||||
consolidatedLineItemsArray = [
|
consolidatedLineItemsArray = [
|
||||||
...consolidatedLineItemsArray,
|
...consolidatedLineItemsArray,
|
||||||
...getFlattenedArrayOfLineItemsWithChildParts(lineItems.glassParts),
|
...getFlattenedArrayOfLineItemsWithChildParts(lineItems.glassParts),
|
||||||
];
|
];
|
||||||
|
|
||||||
if (lineItems.supportingItems != null)
|
if (lineItems?.supportingItems != null)
|
||||||
consolidatedLineItemsArray = [
|
consolidatedLineItemsArray = [
|
||||||
...consolidatedLineItemsArray,
|
...consolidatedLineItemsArray,
|
||||||
...getFlattenedArrayOfLineItemsWithChildParts(lineItems.supportingItems),
|
...getFlattenedArrayOfLineItemsWithChildParts(lineItems.supportingItems),
|
||||||
];
|
];
|
||||||
|
|
||||||
if (lineItems.vaps != null)
|
if (lineItems?.vaps != null)
|
||||||
consolidatedLineItemsArray = [
|
consolidatedLineItemsArray = [
|
||||||
...consolidatedLineItemsArray,
|
...consolidatedLineItemsArray,
|
||||||
...getFlattenedArrayOfLineItemsWithChildParts(lineItems.vaps),
|
...getFlattenedArrayOfLineItemsWithChildParts(lineItems.vaps),
|
||||||
];
|
];
|
||||||
|
|
||||||
if (lineItems.promos != null)
|
if (lineItems?.promos != null)
|
||||||
consolidatedLineItemsArray = [
|
consolidatedLineItemsArray = [
|
||||||
...consolidatedLineItemsArray,
|
...consolidatedLineItemsArray,
|
||||||
...getFlattenedArrayOfLineItemsWithChildParts(lineItems.promos),
|
...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 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.
|
// if date not in past, then call schedule service to verify appointment is still available.
|
||||||
async function resetScheduleIfUnavailable(context, order, pageNameToLog) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue