diff --git a/src/common-components/textbox-question/textbox-question.vue b/src/common-components/textbox-question/textbox-question.vue index d85b92b6b..b8fe82631 100644 --- a/src/common-components/textbox-question/textbox-question.vue +++ b/src/common-components/textbox-question/textbox-question.vue @@ -1,25 +1,28 @@ @@ -56,7 +59,7 @@ export default { setup(props) { const fieldOptions = { type: "text", - value: props.modelValue, + value: props.modelValue, }; const { @@ -64,15 +67,17 @@ export default { handleBlur, handleChange, meta, - validate + validate, + errors, } = useField(props.inputId, props.validationRules, fieldOptions); - return { + return { errorMessage, handleBlur, handleChange, validate, - meta, + meta, + errors, }; }, computed: { @@ -86,7 +91,7 @@ export default { set: function(newValue) { this.$emit("update:modelValue", newValue); } - }, + }, labelText: { get: function () { let labelText = this.questionText; @@ -98,7 +103,7 @@ export default { return labelText; } - } + } }, watch: { value(newValue) { diff --git a/src/helpers/heritage-integration/navigation-helper.js b/src/helpers/heritage-integration/navigation-helper.js index b636ac79b..badbd089f 100644 --- a/src/helpers/heritage-integration/navigation-helper.js +++ b/src/helpers/heritage-integration/navigation-helper.js @@ -46,7 +46,7 @@ export async function getPageToRouteExistingOrderTo(toRoute = {}, existingHerita //return 'vehicle-damage'; //(uncomment) return "vin-lookup"; //This may be temporary } else { - return 'vehicle-damage'; + return 'vin-lookup'; //return "estimate" (uncomment) } } diff --git a/src/layouts/vin-lookup/vin-lookup.vue b/src/layouts/vin-lookup/vin-lookup.vue index f0721b66c..0d3692721 100644 --- a/src/layouts/vin-lookup/vin-lookup.vue +++ b/src/layouts/vin-lookup/vin-lookup.vue @@ -31,59 +31,59 @@ - + { vm.setCmsContent(resultMap.cmsContent); - vm.noServiceZipWidget = { - headline: resultMap.cmsContent.NoServiceZipWidget.HeadlineText, - copy: resultMap.cmsContent.NoServiceZipWidget.BodyText, + vm.matchedDifferentVehicleWidget = { + headline: resultMap.cmsContent.MatchedDifferentVehicle.HeadlineText, + copy: resultMap.cmsContent.MatchedDifferentVehicle.BodyText }; vm.noMatchAlertWidget = { headline: resultMap.cmsContent.NoMatchAlertWidget.HeadlineText, copy: resultMap.cmsContent.NoMatchAlertWidget.BodyText }; - vm.MatchedDifferentVehicle = { - headline: resultMap.cmsContent.MatchedDifferentVehicle.HeadlineText, - copy: resultMap.cmsContent.MatchedDifferentVehicle.BodyText + vm.noServiceZipWidget = { + headline: resultMap.cmsContent.NoServiceZipWidget.HeadlineText, + copy: resultMap.cmsContent.NoServiceZipWidget.BodyText }; - vm.PerfectMatchNewVinAlert = { + vm.vinFoundWidget = { + headline: resultMap.cmsContent.VinFoundWidget.HeadlineText, + copy: resultMap.cmsContent.VinFoundWidget.BodyText + }; + vm.vinFoundReadOnlyWidget = { + headline: resultMap.cmsContent.VinFoundReadOnlyWidget.HeadlineText, + copy: resultMap.cmsContent.VinFoundReadOnlyWidget.BodyText + }; + vm.foundWindshieldAlertWidget = { + headline: resultMap.cmsContent.FoundWindshieldAlert.HeadlineText, + copy: resultMap.cmsContent.FoundWindshieldAlert.BodyText + }; + vm.vinNotFoundWidget = { + headline: resultMap.cmsContent.VinNotFound.HeadlineText, + copy: resultMap.cmsContent.VinNotFound.BodyText + }; + vm.perfectMatchNewVinAlertWidget = { headline: resultMap.cmsContent.PerfectMatchNewVinAlert.HeadlineText, copy: resultMap.cmsContent.PerfectMatchNewVinAlert.BodyText }; @@ -164,15 +183,14 @@ export default { }, data() { return { - MatchedDifferentVehicle: false, - NoMatchAlertWidget: false, - PerfectMatchNewVinAlert: false, - NoServiceZipWidget: false, - VinFoundWidget: false, - VinFoundReadOnlyWidget: false, - FoundWindshieldAlert: false, - newServiceZipRequired: false, - VinNotFound: false, + matchedDifferentVehicle: false, + noMatchAlert: false, + noServiceZip: false, + vinFound: false, + vinFoundReadOnly: false, + foundWindshieldAlert: false, + vinNotFound: false, + perfectMatchNewVinAlert: false, vin: '', zip: '', email: '', @@ -193,24 +211,18 @@ export default { this.$router.navigate(this.navigationScenarios.CLICKED_BACK, this.$route); }, async forwardButtonAction() { - const zipValidation = this.serviceZip ? await this.validateZip(this.serviceZip) : await this.validateZip(this.zip); + const zipValidation = await this.validateZip(this.zip); + console.log(zipValidation); if (!zipValidation.data.isServiceable) { - //this.$refs.funnelFooter.removeLoader(); - this.newServiceZipRequired = true; + this.$refs.funnelFooter.removeLoader(); + this.noServiceZip = true; return; } - const vinLookup = await this.lookupVin(this.licensePlate, zipValidation.data.state).catch(() => { + const vinLookup = await this.lookupVin(this.vin).catch(() => { this.$refs.funnelFooter.removeLoader(); this.vinNotValid = true; return; }); - if (vinLookup.data.vehicle.carId !== store.getters.vehicle.carId) { - this.$refs.funnelFooter.updateButtonText(`Continue with ${vinLookup.data.vin} ${vinLookup.data.vehicle.year} ${vinLookup.data.vehicle.make} ${vinLookup.data.vehicle.model}`); - //this.$refs.funnelFooter.removeLoader(); - this.vinDoesNotMatchCarId = true; - return; - } - const partsData = await baseMixin.methods.dispatchNonBlockingStoreAction( this.storeActions.GET_PARTS_OR_QUESTIONS, { @@ -240,10 +252,10 @@ export default { { zip } ); }, - lookupVin(plate, state) { + lookupVin(vin) { return baseMixin.methods.dispatchNonBlockingStoreAction( - storeActions.LOOKUP_VIN_BY_PLATE, - { licensePlate: plate, licenseState: state } + storeActions.LOOKUP_VEHICLE_BY_VIN, + { vin } ); }, updateStore() { @@ -260,9 +272,6 @@ export default { store.commit(storeMutations.UPDATE_VEHICLE_IMAGE_URL, null); store.commit(storeMutations.UPDATE_VEHICLE_IMAGE_VIF_NUMBER, null); store.commit(storeMutations.UPDATE_VEHICLE_IMAGE_COLOR, null); - store.commit(storeMutations.UPDATE_REGISTRATION_LICENSE_PLATE, null); - store.commit(storeMutations.UPDATE_REGISTRATION_STATE, null); - store.commit(storeMutations.UPDATE_REGISTRATION_ZIP_CODE, null); store.commit(storeMutations.UPDATE_SERVICE_LOCATION_ZIP, null); store.commit(storeMutations.UPDATE_CUSTOMER_EMAIL_ADDRESS, null); },