CSR-416 Revert

This commit is contained in:
Katie 2022-05-12 15:53:49 -04:00
parent 50d837b798
commit 7fae07a59e
2 changed files with 13 additions and 11 deletions

View file

@ -58,6 +58,8 @@ export async function navigateAfterSaveToHeritageFunnel(currentRoute) {
const currentComponent = currentRoute.matched[0].components; const currentComponent = currentRoute.matched[0].components;
currentComponent.default.methods.resetDependentState(); currentComponent.default.methods.resetDependentState();
setupOrderBeforeSave();
// Create the order (or save existing order) when navigating to Heritage Funnel. // Create the order (or save existing order) when navigating to Heritage Funnel.
await saveOrder(); await saveOrder();
@ -142,4 +144,14 @@ function isVinRelatedPage(toRoute) {
fmgPageValue === fmgPageValues.ADDRESS_LOOKUP || fmgPageValue === fmgPageValues.ADDRESS_LOOKUP ||
fmgPageValue === fmgPageValues.ADDRESS_VEHICLES || fmgPageValue === fmgPageValues.ADDRESS_VEHICLES ||
fmgPageValue === fmgPageValues.ESTIMATE; fmgPageValue === fmgPageValues.ESTIMATE;
}
function setupOrderBeforeSave() {
const serviceLocation = store.getters.order.serviceLocation;
if (!serviceLocation.zipCode && serviceLocation.zipCode == store.getters.vehicle.registration.zipCode) {
baseMixin.methods.dispatchStoreAction(
storeActions.UPDATE_SERVICE_LOCATION_WITH_VEHICLE_REGISTRATION
);
}
} }

View file

@ -264,8 +264,6 @@ export default {
this.displayVinLookupByHomeAddressNotAllowedAlert = false; this.displayVinLookupByHomeAddressNotAllowedAlert = false;
}, },
navigateForward(carEntered, carsFound) { navigateForward(carEntered, carsFound) {
this.setupServiceLocationIfNecessary();
if (carsFound.length == 1) { if (carsFound.length == 1) {
// if a different vehicle is found than the one entered and the selected glass // if a different vehicle is found than the one entered and the selected glass
// is not available for that vehicle // is not available for that vehicle
@ -336,15 +334,7 @@ export default {
store.commit(storeMutations.UPDATE_SERVICE_LOCATION_ZIP_CODE, this.serviceZipCode); store.commit(storeMutations.UPDATE_SERVICE_LOCATION_ZIP_CODE, this.serviceZipCode);
store.commit(storeMutations.UPDATE_CUSTOMER_EMAIL_ADDRESS, this.customerQuestions.emailAddress); store.commit(storeMutations.UPDATE_CUSTOMER_EMAIL_ADDRESS, this.customerQuestions.emailAddress);
}, },
setupServiceLocationIfNecessary() {
const serviceLocation = store.getters.order.serviceLocation;
if (!serviceLocation.zipCode && serviceLocation.zipCode == store.getters.vehicle.registration.zipCode) {
baseMixin.methods.dispatchStoreAction(
storeActions.UPDATE_SERVICE_LOCATION_WITH_VEHICLE_REGISTRATION
);
}
}
}, },
computed: { computed: {
AlertNonServiceableZipHeader(){ AlertNonServiceableZipHeader(){