Merge branch 'develop' into feature/CSR-520

This commit is contained in:
CarlNation 2022-05-06 09:12:54 -04:00
commit 063135966f
21 changed files with 1294 additions and 1146 deletions

View file

@ -121,4 +121,7 @@ stages:
__VUE_APP_GOOGLE_PLACES_API_KEY__: $(__VUE_APP_GOOGLE_PLACES_API_KEY__) __VUE_APP_GOOGLE_PLACES_API_KEY__: $(__VUE_APP_GOOGLE_PLACES_API_KEY__)
__VUE_APP_HERITAGE_FUNNEL__: $(__VUE_APP_HERITAGE_FUNNEL__) __VUE_APP_HERITAGE_FUNNEL__: $(__VUE_APP_HERITAGE_FUNNEL__)
__VUE_APP_CURRENT_ENVIRONMENT__: $(__VUE_APP_CURRENT_ENVIRONMENT__) __VUE_APP_CURRENT_ENVIRONMENT__: $(__VUE_APP_CURRENT_ENVIRONMENT__)
indexDeployVariables:
__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__: $(__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__)
__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__: $(__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__)
cfDistributionId: $(cfDistributionId) cfDistributionId: $(cfDistributionId)

1257
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,9 @@
<template> <template>
<router-view></router-view> <router-view v-slot="{ Component }">
<transition :duration="{ enter: 800, leave: 300 }" name="route-fade" mode="out-in">
<component :is="Component" />
</transition>
</router-view>
</template> </template>
<style lang="scss"> <style lang="scss">

View file

@ -162,7 +162,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.button-question-overflow { .button-question-overflow {
height: calc(100vh - 266px); height: calc(100vh - 274px);
.overflow-scroll { .overflow-scroll {
// Height will be determined by overall height of content above list // Height will be determined by overall height of content above list

View file

@ -57,8 +57,13 @@ export default {
const fieldOptions = { const fieldOptions = {
type: "text", type: "text",
value: props.modelValue, value: props.modelValue,
potentialInitialValue: props.modelValue,
}; };
if (props.modelValue && props.modelValue.length > 0) {
fieldOptions['initialValue'] = fieldOptions.potentialInitialValue;
}
const { const {
errorMessage, errorMessage,
handleBlur, handleBlur,
@ -98,10 +103,10 @@ export default {
words.forEach(function (word) { words.forEach(function (word) {
const position = 1; const position = 1;
word = [word.toString().slice(0, position), noBreakChar, word.toString().slice(position)].join(''); word = [word.toString().slice(0, position), noBreakChar, word.toString().slice(position)].join('');
questionText += `${word} `; questionText += `${word} `;
}); });
questionText = questionText.trimEnd(); questionText = questionText.trimEnd();
} else { } else {
questionText = this.questionText.toString(); questionText = this.questionText.toString();
} }

View file

@ -8,51 +8,52 @@
<div class="container-fluid shadow rounded-3 p-2 position-relative make-tall px-5"> <div class="container-fluid shadow rounded-3 p-2 position-relative make-tall px-5">
<funnelHeader cmsWidgetName="FunnelHeaderWidget" ref="funnelHeader" /> <funnelHeader cmsWidgetName="FunnelHeaderWidget" ref="funnelHeader" />
<vehicleBanner ref="vehicleBanner" :displayGenericVehicleImage=false /> <vehicleBanner ref="vehicleBanner" :displayGenericVehicleImage=false />
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" ref="funnelSubHeader" /> <funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" ref="funnelSubHeader" />
<customerQuestions ref="customerQuestions" v-model="customerQuestions" /> <div class="fade-on-route-transition sub-container make-tall">
<alert ref="alertVinNotFound" v-show="displayVinNotFoundAlert" <customerQuestions ref="customerQuestions" v-model="customerQuestions" />
class="my-3" <alert ref="alertVinNotFound" v-show="displayVinNotFoundAlert"
cmsWidgetName="AlertVinNotFoundWidget" class="my-3"
alertClass="alert-danger" cmsWidgetName="AlertVinNotFoundWidget"
v-bind:isDismissible="false" alertClass="alert-danger"
/> v-bind:isDismissible="false"
<alert ref="alertMatchedDifferentVehicle" v-show="displayMatchedDifferentVehicleAlert" />
class="my-3" <alert ref="alertMatchedDifferentVehicle" v-show="displayMatchedDifferentVehicleAlert"
:manualHeadline="AlertMatchedDifferentVehicleHeader" class="my-3"
:manualCopy="AlertMatchedDifferentVehicleBody" :manualHeadline="AlertMatchedDifferentVehicleHeader"
alertClass="alert-warning" :manualCopy="AlertMatchedDifferentVehicleBody"
v-bind:isDismissible="false" alertClass="alert-warning"
/> v-bind:isDismissible="false"
<alert ref="alertNonServiceableZip" v-show="displayNonServiceableZipAlert" />
class="my-3" <alert ref="alertNonServiceableZip" v-show="displayNonServiceableZipAlert"
alertClass="alert-danger" class="my-3"
:manualHeadline="AlertNonServiceableZipHeader" alertClass="alert-danger"
:manualCopy="AlertNonServiceableZipBody" :manualHeadline="AlertNonServiceableZipHeader"
v-bind:isDismissible="false" :manualCopy="AlertNonServiceableZipBody"
/> v-bind:isDismissible="false"
<alert ref="alertVinLookupsByHomeAddressNotAllowed" v-show="displayVinLookupByHomeAddressNotAllowedAlert" />
class="my-3" <alert ref="alertVinLookupsByHomeAddressNotAllowed" v-show="displayVinLookupByHomeAddressNotAllowedAlert"
cmsWidgetName="AlertVinLookupsByHomeAddressNotAllowedWidget" class="my-3"
alertClass="alert-danger" cmsWidgetName="AlertVinLookupsByHomeAddressNotAllowedWidget"
v-bind:isDismissible="false" alertClass="alert-danger"
/> v-bind:isDismissible="false"
<transition name="fade" mode="out-in"> />
<div class="service-zip-field" v-if="showServiceZipField" aria-live="polite"> <transition name="fade" mode="out-in">
<div class="row my-4"> <div class="service-zip-field" v-if="showServiceZipField" aria-live="polite">
<div class="col"> <div class="row my-4">
<textboxQuestion cmsWidgetName="ServiceZipQuestionWidget" v-model="serviceZip" ref="serviceZip" inputId="7add1b26df344f2caf1678de5797803f" aria-haspopup="" mask="#####" disableAutoFill validationRules="service-zip-required|service-zip-format" /> <div class="col">
<textboxQuestion cmsWidgetName="ServiceZipQuestionWidget" v-model="serviceZip" ref="serviceZip" inputId="7add1b26df344f2caf1678de5797803f" aria-haspopup="" mask="#####" disableAutoFill validationRules="service-zip-required|service-zip-format" />
</div>
</div> </div>
</div> </div>
</div> </transition>
</transition> <funnel-footer
<funnel-footer cmsWidgetName="FunnelFooterWidget"
cmsWidgetName="FunnelFooterWidget" ref="funnelFooter"
ref="funnelFooter" :isDisabled="!meta.valid"
:isDisabled="!meta.valid" @ForwardClicked="forwardButtonAction"
@ForwardClicked="forwardButtonAction" :isForwardActionDisabled="!meta.valid"
:isForwardActionDisabled="!meta.valid" />
/> </div>
</div> </div>
</Form> </Form>
</template> </template>

View file

@ -9,25 +9,25 @@
<funnelHeader cmsWidgetName="FunnelHeaderWidget" /> <funnelHeader cmsWidgetName="FunnelHeaderWidget" />
<vehicleBanner cmsWidgetName="VehicleBannerWidget" /> <vehicleBanner cmsWidgetName="VehicleBannerWidget" />
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" /> <funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" />
<buttonQuestion <div class="fade-on-route-transition sub-container make-tall">
cmsWidgetName="VinLookupMethod" <buttonQuestion
class="button-question-overflow" cmsWidgetName="VinLookupMethod"
:questionText="questionText" :questionText="questionText"
:answers="answersFromCms" :answers="answersFromCms"
groupName="vinLookupMethodOption" groupName="vinLookupMethodOption"
buttonType="listButton" buttonType="listButton"
v-model="selectedValues" v-model="selectedValues"
isRequired isRequired
validationRules="option-required" validationRules="option-required"
/> />
<funnel-footer
<funnel-footer cmsWidgetName="FunnelFooterWidget"
cmsWidgetName="FunnelFooterWidget" :isForwardActionDisabled="!meta.valid"
:isForwardActionDisabled="!meta.valid" @isDisabled="!meta.valid"
@isDisabled="!meta.valid" @back-clicked="backButtonAction"
@back-clicked="backButtonAction" @ForwardClicked="forwardButtonAction"
@ForwardClicked="forwardButtonAction" />
/> </div>
</div> </div>
</Form> </Form>
</template> </template>

View file

@ -14,91 +14,78 @@
:displayGenericVehicleImage="false" :displayGenericVehicleImage="false"
/> />
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" /> <funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" />
<div class="row my-2"> <div class="fade-on-route-transition sub-container make-tall">
<div class="col"> <div class="row my-2">
<textboxQuestion <div class="col">
cmsWidgetName="LicensePlateNumber" <textboxQuestion
v-model="licensePlate" cmsWidgetName="LicensePlateNumber"
isRequired v-model="licensePlate"
inputId="license_plate" isRequired
validationRules="license-plate-required" inputId="license_plate"
/> validationRules="license-plate-required"
/>
</div>
</div> </div>
</div> <div class="row my-2">
<div class="row my-2"> <div class="col">
<div class="col"> <textboxQuestion
<textboxQuestion cmsWidgetName="RegistrationZip"
cmsWidgetName="RegistrationZip" v-model="registrationZip"
v-model="registrationZip" inputId="zip"
inputId="zip" mask="#####"
mask="#####" validationRules="zip-required"
validationRules="zip-required" />
/> </div>
<textboxQuestion
cmsWidgetName="RegistrationZip"
v-model="registrationZip"
isRequired
inputId="zip"
mask="#####"
validationRules="zip-required"
/>
</div> </div>
</div> <div class="row my-2">
<div class="row my-2"> <div class="col">
<div class="col"> <textboxQuestion
<textboxQuestion cmsWidgetName="EmailAddress"
cmsWidgetName="EmailAddress" v-model="email"
v-model="email" inputId="email"
inputId="email" validationRules="email-address-required|email-address-format"
validationRules="email-address-required|email-address-format" />
/> </div>
<textboxQuestion
cmsWidgetName="EmailAddress"
v-model="email"
isRequired
inputId="email"
validationRules="email-address-required|email-address-format"
/>
</div> </div>
</div> <alert
<alert class="my-3"
class="my-3" :manualHeadline="NoServiceZipHeader"
:manualHeadline="NoServiceZipHeader" :manualCopy="NoServiceZipBody"
:manualCopy="NoServiceZipBody" v-if="!isRegistrationZipServicable && isVinValid && !isCarIdDifferent"
v-if="!isRegistrationZipServicable && isVinValid && !isCarIdDifferent" alertClass="alert-danger"
alertClass="alert-danger" />
/> <div class="row my-2">
<div class="row my-2"> <div class="col">
<div class="col"> <textboxQuestion
<textboxQuestion v-if="!isRegistrationZipServicable"
v-if="!isRegistrationZipServicable" cmsWidgetName="ServiceZip"
cmsWidgetName="ServiceZip" v-model="serviceZip"
v-model="serviceZip" inputId="serviceZip"
inputId="serviceZip" validationRules="zip-required"
validationRules="zip-required" />
/> </div>
</div> </div>
<alert
class="my-3"
cmsWidgetName="NoMatchAlertWidget"
v-if="!isVinValid"
alertClass="alert-danger"
/>
<alert
class="my-3"
:manualHeadline="MatchedDifferentVehicleAlertHeader"
:manualCopy="MatchedDifferentVehicleAlertBody"
v-if="isCarIdDifferent"
alertClass="alert-warning"
/>
<funnelFooter
ref="funnelFooter"
cmsWidgetName="FunnelFooterWidget"
:isForwardActionDisabled="!meta.valid"
@back-clicked="backButtonAction"
@ForwardClicked="forwardButtonAction"
/>
</div> </div>
<alert
class="my-3"
cmsWidgetName="NoMatchAlertWidget"
v-if="!isVinValid"
alertClass="alert-danger"
/>
<alert
class="my-3"
:manualHeadline="MatchedDifferentVehicleAlertHeader"
:manualCopy="MatchedDifferentVehicleAlertBody"
v-if="isCarIdDifferent"
alertClass="alert-warning"
/>
<funnelFooter
ref="funnelFooter"
cmsWidgetName="FunnelFooterWidget"
:isForwardActionDisabled="!meta.valid"
@back-clicked="backButtonAction"
@ForwardClicked="forwardButtonAction"
/>
</div> </div>
</Form> </Form>
</template> </template>
@ -113,37 +100,55 @@ import alert from "@/ux-components/alert/alert";
import textboxQuestion from "@/common-components/textbox-question/textbox-question"; import textboxQuestion from "@/common-components/textbox-question/textbox-question";
// Supporting files // Supporting files
import { fetchCmsContentForPage } from "@/helpers/cms-content-helper"; import {
import { settleAllPromises } from "@/helpers/layout-helper"; fetchCmsContentForPage
} from "@/helpers/cms-content-helper";
import {
settleAllPromises
} from "@/helpers/layout-helper";
import store from "@/store"; import store from "@/store";
import baseMixin from "@/mixins/base-mixin.js"; import baseMixin from "@/mixins/base-mixin.js";
import { storeActions } from "@/constants/store-actions";
import { storeMutations } from "@/constants/store-mutations";
import { errorMessages } from "@/constants/error-messages";
import { import {
getDamageString, storeActions
isGlassAvailableForCarId, } from "@/constants/store-actions";
import {
storeMutations
} from "@/constants/store-mutations";
import {
errorMessages
} from "@/constants/error-messages";
import {
getDamageString,
isGlassAvailableForCarId,
} from "@/helpers/damage-helper"; } from "@/helpers/damage-helper";
import { required, regex } from "@/helpers/validation-rules"; import {
import { Form, defineRule } from "vee-validate"; required,
import { navigateAfterSaveToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper"; regex
} from "@/helpers/validation-rules";
import {
Form,
defineRule
} from "vee-validate";
import {
navigateAfterSaveToHeritageFunnel
} from "@/helpers/heritage-integration/navigation-helper";
// DEFINE VALIDATION RULES // DEFINE VALIDATION RULES
defineRule( defineRule(
"license-plate-required", "license-plate-required",
required(errorMessages.LICENSE_PLATE_REQUIRED) required(errorMessages.LICENSE_PLATE_REQUIRED)
); );
defineRule("zip-required", required(errorMessages.ZIP_REQUIRED)); defineRule("zip-required", required(errorMessages.ZIP_REQUIRED));
defineRule( defineRule(
"email-address-required", "email-address-required",
required(errorMessages.EMAIL_ADDRESS_REQUIRED) required(errorMessages.EMAIL_ADDRESS_REQUIRED)
); );
defineRule( defineRule(
"email-address-format", "email-address-format",
regex( regex(
/^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9_\-.]+).([a-zA-Z]{2,})$/, /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9_\-.]+).([a-zA-Z]{2,})$/,
errorMessages.EMAIL_ADDRESS_FORMAT errorMessages.EMAIL_ADDRESS_FORMAT
) )
); );
export default { export default {
@ -167,9 +172,6 @@ export default {
vm.setCmsContent(resultMap.cmsContent); vm.setCmsContent(resultMap.cmsContent);
}); });
}, },
props: {
validationRules: String,
},
data() { data() {
return { return {
isRegistrationZipServicable: true, isRegistrationZipServicable: true,
@ -187,218 +189,216 @@ export default {
mounted() { mounted() {
this.attachCustomEvents(); this.attachCustomEvents();
}, },
computed: { computed: {
MatchedDifferentVehicleAlertHeader() { MatchedDifferentVehicleAlertHeader() {
let text = this.getCmsContent( let text = this.getCmsContent(
"MatchedDifferentVehicleAlertWidget", "MatchedDifferentVehicleAlertWidget",
"HeadlineText" "HeadlineText"
).replaceAll("{custom:damage}", getDamageString()); ).replaceAll("{custom:damage}", getDamageString());
return text; return text;
}, },
MatchedDifferentVehicleAlertBody() { MatchedDifferentVehicleAlertBody() {
let text = this.getCmsContent( let text = this.getCmsContent(
"MatchedDifferentVehicleAlertWidget", "MatchedDifferentVehicleAlertWidget",
"BodyText" "BodyText"
) )
.replaceAll("{custom:damage}", getDamageString()) .replaceAll("{custom:damage}", getDamageString())
.replaceAll( .replaceAll(
"{custom:plateLookupYear}", "{custom:plateLookupYear}",
this.customAlertData?.vehicleInfo?.year this.customAlertData?.vehicleInfo?.year
) )
.replaceAll( .replaceAll(
"{custom:plateLookupMake}", "{custom:plateLookupMake}",
this.customAlertData?.vehicleInfo?.make this.customAlertData?.vehicleInfo?.make
) )
.replaceAll( .replaceAll(
"{custom:plateLookupModel}", "{custom:plateLookupModel}",
this.customAlertData?.vehicleInfo?.model this.customAlertData?.vehicleInfo?.model
); );
return text; return text;
}, },
NoServiceZipHeader() { NoServiceZipHeader() {
let text = this.getCmsContent( let text = this.getCmsContent(
"NoServiceZipWidget", "NoServiceZipWidget",
"HeadlineText" "HeadlineText"
).replaceAll("{custom:zip}", this.registrationZip); ).replaceAll("{custom:zip}", this.registrationZip);
return text; return text;
}, },
NoServiceZipBody() { NoServiceZipBody() {
return this.getCmsContent("NoServiceZipWidget", "BodyText"); return this.getCmsContent("NoServiceZipWidget", "BodyText");
},
},
methods: {
arePagePrerequisitesValid() {
return store.getters.vehicle.carId !== null;
},
resetDependentState() {
store.commit(storeMutations.UPDATE_REGISTRATION_ADDRESS, null);
store.commit(storeMutations.UPDATE_REGISTRATION_CITY, null);
store.commit(storeMutations.UPDATE_REGISTRATION_FIRST_NAME, null);
store.commit(storeMutations.UPDATE_REGISTRATION_LAST_NAME, null);
store.dispatch(storeActions.RESET_PARTS_STATE_AND_DEPENDENCIES);
},
attachCustomEvents() {
this.prependActionToMethod(this, this.forwardButtonAction, () => {
this.pushEventToGA(
this.$route.query[this.queryStrings.FMG_PAGE],
this.GaActions.SUBMITTED,
this.GaLabels.LICENSE_PLATE_LOOKUP,
true
);
});
},
getLicensePlateFromStore() {
return store.getters.vehicle.registration.licensePlate;
},
getRegistrationZipFromStore() {
return store.getters.vehicle.registration.zipCode;
},
getEmailFromStore() {
return store.getters.order.customer.emailAddress;
},
getServiceZipFromStore(){
return store.getters.order.serviceLocation.zipCode
},
backButtonAction() {
this.$router.navigate(this.navigationScenarios.CLICKED_BACK, this.$route);
},
async forwardButtonAction() {
const zipValidation = this.serviceZip
? await this.validateZip(this.serviceZip)
: await this.validateZip(this.registrationZip);
if (!zipValidation.data.isServiceable) {
this.$refs.funnelFooter.removeLoader();
this.isVinValid = true;
this.isRegistrationZipServicable = false;
this.isCarIdDifferent = false;
return;
}
const vinLookup = await this.lookupVin(
this.licensePlate,
zipValidation.data.state
).catch(() => {
this.$refs.funnelFooter.removeLoader();
this.isVinValid = false;
this.isCarIdDifferent = false;
return;
});
this.isCarIdDifferent =
vinLookup.data.vehicle.carId !== store.getters.vehicle.carId;
if (
this.isCarIdDifferent &&
vinLookup.data.vehicle.carId !== this.previouslyEnteredCarId
) {
this.previouslyEnteredCarId = vinLookup.data.vehicle.carId;
this.customAlertData.vehicleInfo = vinLookup.data.vehicle;
this.$refs.funnelFooter.updateButtonText(
`Continue with ${vinLookup.data.vehicle.year} ${vinLookup.data.vehicle.make} ${vinLookup.data.vehicle.model}`
);
this.isVinValid = true;
this.isSelectedGlassAvailableForVehicle =
await isGlassAvailableForCarId(vinLookup.data.vehicle.carId);
this.$refs.funnelFooter.removeLoader();
return;
}
this.updateCustomerInfo(
vinLookup.data.vin,
vinLookup.data.vehicle,
zipValidation.data.state
);
const partsData = await baseMixin.methods.dispatchStoreAction(
this.storeActions.GET_PARTS_OR_QUESTIONS,
{
carId: vinLookup.data.vehicle.carId,
glassArray:
this.isCarIdDifferent && !this.isSelectedGlassAvailableForVehicle
? []
: store.getters.damage.glassToReplace,
zipCode: this.serviceZip ? this.serviceZip : this.registrationZip,
vin: vinLookup.data.vin,
}, },
false
);
this.navigateForward(partsData);
}, },
navigateForward(partsData) { methods: {
if (this.isCarIdDifferent && !this.isSelectedGlassAvailableForVehicle) { arePagePrerequisitesValid() {
this.$router.navigateAfterSave( return store.getters.vehicle.carId !== null;
this.navigationScenarios.CLICKED_FORWARD, },
this.$route, resetDependentState() {
{}, store.commit(storeMutations.UPDATE_REGISTRATION_ADDRESS, null);
{ displayVehicleChangeAlert: true }, store.commit(storeMutations.UPDATE_REGISTRATION_CITY, null);
partsData.data store.commit(storeMutations.UPDATE_REGISTRATION_FIRST_NAME, null);
); store.commit(storeMutations.UPDATE_REGISTRATION_LAST_NAME, null);
return; store.dispatch(storeActions.RESET_PARTS_STATE_AND_DEPENDENCIES);
} else { },
navigateAfterSaveToHeritageFunnel(this.$route); attachCustomEvents() {
return; this.prependActionToMethod(this, this.forwardButtonAction, () => {
} this.pushEventToGA(
this.$route.query[this.queryStrings.FMG_PAGE],
this.GaActions.SUBMITTED,
this.GaLabels.LICENSE_PLATE_LOOKUP,
true
);
});
},
getLicensePlateFromStore() {
return store.getters.vehicle.registration.licensePlate;
},
getRegistrationZipFromStore() {
return store.getters.vehicle.registration.zipCode;
},
getEmailFromStore() {
return store.getters.order.customer.emailAddress;
},
getServiceZipFromStore() {
return store.getters.order.serviceLocation.zipCode
},
backButtonAction() {
this.$router.navigate(this.navigationScenarios.CLICKED_BACK, this.$route);
},
async forwardButtonAction() {
const zipValidation = this.serviceZip ?
await this.validateZip(this.serviceZip) :
await this.validateZip(this.registrationZip);
if (!zipValidation.data.isServiceable) {
this.$refs.funnelFooter.removeLoader();
this.isVinValid = true;
this.isRegistrationZipServicable = false;
this.isCarIdDifferent = false;
return;
}
const vinLookup = await this.lookupVin(
this.licensePlate,
zipValidation.data.state
).catch(() => {
this.$refs.funnelFooter.removeLoader();
this.isVinValid = false;
this.isCarIdDifferent = false;
return;
});
this.isCarIdDifferent =
vinLookup.data.vehicle.carId !== store.getters.vehicle.carId;
if (
this.isCarIdDifferent &&
vinLookup.data.vehicle.carId !== this.previouslyEnteredCarId
) {
this.previouslyEnteredCarId = vinLookup.data.vehicle.carId;
this.customAlertData.vehicleInfo = vinLookup.data.vehicle;
this.$refs.funnelFooter.updateButtonText(
`Continue with ${vinLookup.data.vehicle.year} ${vinLookup.data.vehicle.make} ${vinLookup.data.vehicle.model}`
);
this.isVinValid = true;
this.isSelectedGlassAvailableForVehicle =
await isGlassAvailableForCarId(vinLookup.data.vehicle.carId);
this.$refs.funnelFooter.removeLoader();
return;
}
this.updateCustomerInfo(
vinLookup.data.vin,
vinLookup.data.vehicle,
zipValidation.data.state
);
const partsData = await baseMixin.methods.dispatchStoreAction(
this.storeActions.GET_PARTS_OR_QUESTIONS, {
carId: vinLookup.data.vehicle.carId,
glassArray: this.isCarIdDifferent && !this.isSelectedGlassAvailableForVehicle ? [] : store.getters.damage.glassToReplace,
zipCode: this.serviceZip ? this.serviceZip : this.registrationZip,
vin: vinLookup.data.vin,
},
false
);
this.navigateForward(partsData);
},
navigateForward(partsData) {
if (this.isCarIdDifferent && !this.isSelectedGlassAvailableForVehicle) {
this.$router.navigateAfterSave(
this.navigationScenarios.CLICKED_FORWARD,
this.$route, {}, {
displayVehicleChangeAlert: true
},
partsData.data
);
return;
} else {
navigateAfterSaveToHeritageFunnel(this.$route);
return;
}
},
validateZip(zip) {
return baseMixin.methods.dispatchStoreAction(storeActions.VALIDATE_ZIP, {
zip,
});
},
lookupVin(plate, state) {
return baseMixin.methods.dispatchStoreAction(
storeActions.LOOKUP_VIN_BY_PLATE, {
licensePlate: plate,
licenseState: state
}
);
},
updateCustomerInfo(vin, vehicleInfo, registrationState) {
if (this.isCarIdDifferent && !this.isSelectedGlassAvailableForVehicle) {
store.dispatch(storeActions.RESET_DAMAGE_STATE_AND_DEPENDENCIES);
}
store.commit(storeMutations.UPDATE_VEHICLE_VIN, vin);
store.commit(storeMutations.UPDATE_YEAR, vehicleInfo.year);
store.commit(storeMutations.UPDATE_MAKE, vehicleInfo.make);
store.commit(storeMutations.UPDATE_MODEL, vehicleInfo.model);
store.commit(storeMutations.UPDATE_STYLE, vehicleInfo.style);
store.commit(storeMutations.UPDATE_CAR_ID, vehicleInfo.carId);
store.commit(storeMutations.UPDATE_VEHICLE_CATEGORY, vehicleInfo.category);
store.commit(storeMutations.UPDATE_VEHICLE_IMAGE_URL, vehicleInfo.imageUrl);
store.commit(storeMutations.UPDATE_VEHICLE_IMAGE_VIF_NUMBER, vehicleInfo.imageVifNumber);
store.commit(storeMutations.UPDATE_VEHICLE_IMAGE_COLOR, vehicleInfo.imageColor);
store.commit(storeMutations.UPDATE_REGISTRATION_LICENSE_PLATE, this.licensePlate);
store.commit(storeMutations.UPDATE_REGISTRATION_STATE, registrationState);
store.commit(storeMutations.UPDATE_REGISTRATION_ZIP_CODE, this.registrationZip);
store.commit(storeMutations.UPDATE_SERVICE_LOCATION_ZIP_CODE, this.serviceZip);
store.commit(storeMutations.UPDATE_CUSTOMER_EMAIL_ADDRESS, this.email);
},
}, },
validateZip(zip) { watch: {
return baseMixin.methods.dispatchStoreAction(storeActions.VALIDATE_ZIP, { licensePlate() {
zip, this.$refs.funnelFooter.updateButtonText(
}); this.getCmsContent("FunnelFooterWidget", "ForwardButtonText")
);
},
registrationZip() {
this.$refs.funnelFooter.updateButtonText(
this.getCmsContent("FunnelFooterWidget", "ForwardButtonText")
);
},
serviceZip() {
this.$refs.funnelFooter.updateButtonText(
this.getCmsContent("FunnelFooterWidget", "ForwardButtonText")
);
},
}, },
lookupVin(plate, state) { components: {
return baseMixin.methods.dispatchStoreAction( Form,
storeActions.LOOKUP_VIN_BY_PLATE, funnelHeader,
{ licensePlate: plate, licenseState: state } vehicleBanner,
); funnelSubHeader,
textboxQuestion,
alert,
funnelFooter,
}, },
updateCustomerInfo(vin, vehicleInfo, registrationState) { }
if (this.isCarIdDifferent && !this.isSelectedGlassAvailableForVehicle) {
store.dispatch(storeActions.RESET_DAMAGE_STATE_AND_DEPENDENCIES);
}
store.commit(storeMutations.UPDATE_VEHICLE_VIN, vin);
store.commit(storeMutations.UPDATE_YEAR, vehicleInfo.year);
store.commit(storeMutations.UPDATE_MAKE, vehicleInfo.make);
store.commit(storeMutations.UPDATE_MODEL, vehicleInfo.model);
store.commit(storeMutations.UPDATE_STYLE, vehicleInfo.style);
store.commit(storeMutations.UPDATE_CAR_ID, vehicleInfo.carId);
store.commit(storeMutations.UPDATE_VEHICLE_CATEGORY,vehicleInfo.category);
store.commit(storeMutations.UPDATE_VEHICLE_IMAGE_URL,vehicleInfo.imageUrl);
store.commit(storeMutations.UPDATE_VEHICLE_IMAGE_VIF_NUMBER,vehicleInfo.imageVifNumber);
store.commit(storeMutations.UPDATE_VEHICLE_IMAGE_COLOR,vehicleInfo.imageColor);
store.commit(storeMutations.UPDATE_REGISTRATION_LICENSE_PLATE,this.licensePlate);
store.commit(storeMutations.UPDATE_REGISTRATION_STATE, registrationState);
store.commit(storeMutations.UPDATE_REGISTRATION_ZIP_CODE, this.registrationZip);
store.commit(storeMutations.UPDATE_SERVICE_LOCATION_ZIP_CODE, this.serviceZip);
store.commit(storeMutations.UPDATE_CUSTOMER_EMAIL_ADDRESS, this.email);
},
},
watch: {
licensePlate() {
this.$refs.funnelFooter.updateButtonText(
this.getCmsContent("FunnelFooterWidget", "ForwardButtonText")
);
},
registrationZip() {
this.$refs.funnelFooter.updateButtonText(
this.getCmsContent("FunnelFooterWidget", "ForwardButtonText")
);
},
serviceZip() {
this.$refs.funnelFooter.updateButtonText(
this.getCmsContent("FunnelFooterWidget", "ForwardButtonText")
);
},
},
components: {
Form,
funnelHeader,
vehicleBanner,
funnelSubHeader,
textboxQuestion,
alert,
funnelFooter,
},
};
</script> </script>

View file

@ -3,10 +3,12 @@
<funnelHeader cmsWidgetName="FunnelHeaderWidget" /> <funnelHeader cmsWidgetName="FunnelHeaderWidget" />
<vehicleBanner cmsWidgetName="VehicleBannerWidget" :displayGenericVehicleImage=false /> <vehicleBanner cmsWidgetName="VehicleBannerWidget" :displayGenericVehicleImage=false />
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" /> <funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" />
<h1>Part Questions Page Placeholder</h1> <div class="fade-on-route-transition sub-container make-tall">
<funnel-footer <h1>Part Questions Page Placeholder</h1>
cmsWidgetName="FunnelFooterWidget" @back-clicked="backButtonAction" <funnel-footer
/> cmsWidgetName="FunnelFooterWidget" @back-clicked="backButtonAction"
/>
</div>
</div> </div>
</template> </template>

View file

@ -9,57 +9,59 @@
<funnelHeader cmsWidgetName="FunnelHeaderWidget" /> <funnelHeader cmsWidgetName="FunnelHeaderWidget" />
<vehicleBanner cmsWidgetName="VehicleBannerWidget" :displayGenericVehicleImage=false /> <vehicleBanner cmsWidgetName="VehicleBannerWidget" :displayGenericVehicleImage=false />
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" /> <funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" />
<alert <div class="fade-on-route-transition sub-container make-tall">
ref="vehicleChangeAlert" <alert
class="mt-5 mb-0" ref="vehicleChangeAlert"
cmsWidgetName="VehicleChangeAlert" class="mt-5 mb-0"
v-show="shouldDisplayVehicleChangeAlert" cmsWidgetName="VehicleChangeAlert"
alertClass="alert-warning" v-show="shouldDisplayVehicleChangeAlert"
:isDismissible="false" alertClass="alert-warning"
/> :isDismissible="false"
<damageLocationQuestion />
ref="damageLocation" <damageLocationQuestion
cmsWidgetName="DamageLocationQuestion" ref="damageLocation"
v-model="selectedDamageLocations" cmsWidgetName="DamageLocationQuestion"
groupName="DamageLocationQuestion" v-model="selectedDamageLocations"
/> groupName="DamageLocationQuestion"
<windshieldOptions />
ref="windshieldOptions" <windshieldOptions
v-model="selectedWindshieldOptions" ref="windshieldOptions"
:hasRepairReplaceConflict="hasRepairReplaceConflict" v-model="selectedWindshieldOptions"
:hasSplitSingleConflict="hasSplitSingleConflict" :hasRepairReplaceConflict="hasRepairReplaceConflict"
:selectedDamageLocations="selectedDamageLocations" :hasSplitSingleConflict="hasSplitSingleConflict"
/> :selectedDamageLocations="selectedDamageLocations"
<alert />
class="my-3" <alert
cmsWidgetName="HasReplacementConflict" class="my-3"
v-show="hasRepairReplaceConflict" cmsWidgetName="HasReplacementConflict"
alertClass="alert-danger" v-show="hasRepairReplaceConflict"
:isDismissible="false" alertClass="alert-danger"
/> :isDismissible="false"
<sideDoorOptions />
ref="sideDoorOptions" <sideDoorOptions
cmsWidgetName="SideDoorSideQuestion" ref="sideDoorOptions"
groupName="SideDoorSideQuestion" cmsWidgetName="SideDoorSideQuestion"
v-model="sideDoorOptionsData" groupName="SideDoorSideQuestion"
v-show="!hasRepairReplaceConflict" v-model="sideDoorOptionsData"
:selectedDamageLocations="selectedDamageLocations" v-show="!hasRepairReplaceConflict"
/> :selectedDamageLocations="selectedDamageLocations"
<replaceOptionsQuestion />
ref="backGlassOptions" <replaceOptionsQuestion
cmsWidgetName="RearReplaceOptionsQuestion" ref="backGlassOptions"
:isAvailable="isRearWindowDamageLocation && !hasRepairReplaceConflict" cmsWidgetName="RearReplaceOptionsQuestion"
v-model="selectedRearReplaceOptions" :isAvailable="isRearWindowDamageLocation && !hasRepairReplaceConflict"
groupName="BackGlassReplaceOptionsQuestion" v-model="selectedRearReplaceOptions"
validationRules="replace-options-required" groupName="BackGlassReplaceOptionsQuestion"
/> validationRules="replace-options-required"
<funnel-footer />
cmsWidgetName="FunnelFooterWidget" <funnel-footer
:isForwardActionDisabled="!meta.valid" cmsWidgetName="FunnelFooterWidget"
:isBackButtonHidden=shouldHideBackButton :isForwardActionDisabled="!meta.valid"
@back-clicked="backButtonAction" :isBackButtonHidden=shouldHideBackButton
@ForwardClicked="forwardButtonAction" @back-clicked="backButtonAction"
/> @ForwardClicked="forwardButtonAction"
/>
</div>
</div> </div>
</Form> </Form>
</template> </template>

View file

@ -1,6 +1,6 @@
<template> <template>
<buttonQuestion <buttonQuestion
class="radioQuestion" class="radioQuestion"
isOverflowScrollable isOverflowScrollable
selectingInitiatesLoad selectingInitiatesLoad
:questionText="questionText" :questionText="questionText"

View file

@ -1,5 +1,5 @@
<template> <template>
<div class="container-fluid shadow rounded-3 p-0 position-relative make-tall"> <div class="container-fluid shadow rounded-3 p-2 position-relative make-tall px-5">
<funnelHeader cmsWidgetName="FunnelHeaderWidget" /> <funnelHeader cmsWidgetName="FunnelHeaderWidget" />
<div class="select-car"> <div class="select-car">
<div class="select-car-form rounded text-center"> <div class="select-car-form rounded text-center">
@ -10,7 +10,9 @@
backButtonAccessibleText="Change Vehicle Year" backButtonAccessibleText="Change Vehicle Year"
@click-event="backButtonAction" @click-event="backButtonAction"
/> />
<makeQuestion v-model="selectedMake" ref="makeQuestion" cmsWidgetName="VehicleMakeQuestion" /> <div class="fade-on-route-transition">
<makeQuestion v-model="selectedMake" ref="makeQuestion" cmsWidgetName="VehicleMakeQuestion" />
</div>
</div> </div>
</div> </div>
</div> </div>

View file

@ -1,5 +1,5 @@
<template> <template>
<div class="container-fluid shadow rounded-3 p-0 position-relative"> <div class="container-fluid shadow rounded-3 p-2 position-relative make-tall px-5">
<funnelHeader cmsWidgetName="FunnelHeaderWidget" /> <funnelHeader cmsWidgetName="FunnelHeaderWidget" />
<div class="select-car"> <div class="select-car">
<div class="select-car-form rounded text-center"> <div class="select-car-form rounded text-center">
@ -10,7 +10,9 @@
backButtonAccessibleText="Change Vehicle Make" backButtonAccessibleText="Change Vehicle Make"
@click-event="backButtonAction" @click-event="backButtonAction"
/> />
<modelQuestion v-model="selectedModel" ref="modelQuestion" cmsWidgetName="VehicleModelQuestion" /> <div class="fade-on-route-transition">
<modelQuestion v-model="selectedModel" ref="modelQuestion" cmsWidgetName="VehicleModelQuestion" />
</div>
</div> </div>
</div> </div>
</div> </div>

View file

@ -3,34 +3,36 @@
<funnelHeader ref="funnelHeader" cmsWidgetName="FunnelHeaderWidget" /> <funnelHeader ref="funnelHeader" cmsWidgetName="FunnelHeaderWidget" />
<vehicleBanner ref="vehicleBanner" cmsWidgetName="VehicleBannerWidget" :displayGenericVehicleImage="false" /> <vehicleBanner ref="vehicleBanner" cmsWidgetName="VehicleBannerWidget" :displayGenericVehicleImage="false" />
<funnelSubHeader ref="funnelSubHeader" cmsWidgetName="FunnelSubHeaderWidget" /> <funnelSubHeader ref="funnelSubHeader" cmsWidgetName="FunnelSubHeaderWidget" />
<div class="container-fluid prevent-squish my-5"> <div class="fade-on-route-transition sub-container make-tall">
<div class="row"> <div class="container-fluid prevent-squish my-5">
<div class="col"> <div class="row">
<alert <div class="col">
class="rounded border-0 shadow-sm" <alert
alertClass="alert-warning" class="rounded border-0 shadow-sm"
cmsWidgetName="AlertWidget" alertClass="alert-warning"
:isDismissible="false" cmsWidgetName="AlertWidget"
/> :isDismissible="false"
/>
</div>
</div> </div>
</div> </div>
</div>
<div v-for="(item, i) in PartsForQuestions" :key="i"> <div v-for="(item, i) in PartsForQuestions" :key="i">
<!-- Render horizontal lines if there is multi-glass (aka if i > 0) --> <!-- Render horizontal lines if there is multi-glass (aka if i > 0) -->
<div class="container-fluid"> <div class="container-fluid">
<hr v-if="i > 0" /> <hr v-if="i > 0" />
</div>
<glassPartQuestion
:ref="`${RefPrefix}-${item.glassLocation}-${item.glassName}`"
v-model="glassParts[item.glassLocation + '-' + item.glassName]"
:glassLocation="item.glassLocation"
:glassName="item.glassName"
:colorAnswers="item.colorAnswers"
/>
</div> </div>
<funnelFooter cmsWidgetName="FunnelFooterWidget" ref="funnelFooter" @back-clicked="backButtonAction" @ForwardClicked="forwardButtonAction" />
<glassPartQuestion
:ref="`${RefPrefix}-${item.glassLocation}-${item.glassName}`"
v-model="glassParts[item.glassLocation + '-' + item.glassName]"
:glassLocation="item.glassLocation"
:glassName="item.glassName"
:colorAnswers="item.colorAnswers"
/>
</div> </div>
<funnelFooter cmsWidgetName="FunnelFooterWidget" ref="funnelFooter" @back-clicked="backButtonAction" @ForwardClicked="forwardButtonAction" />
</div> </div>
</template> </template>

View file

@ -1,5 +1,5 @@
<template> <template>
<div class="container-fluid shadow rounded-3 p-0 position-relative"> <div class="container-fluid shadow rounded-3 p-2 position-relative make-tall px-5">
<funnelHeader cmsWidgetName="FunnelHeaderWidget" /> <funnelHeader cmsWidgetName="FunnelHeaderWidget" />
<div class="select-car"> <div class="select-car">
<div class="select-car-form rounded text-center"> <div class="select-car-form rounded text-center">
@ -10,7 +10,9 @@
backButtonAccessibleText="Change Vehicle Model" backButtonAccessibleText="Change Vehicle Model"
@click-event="backButtonAction" @click-event="backButtonAction"
/> />
<styleQuestion v-model="selectedStyle" ref="styleQuestion" cmsWidgetName="VehicleStyleQuestion" /> <div class="fade-on-route-transition">
<styleQuestion v-model="selectedStyle" ref="styleQuestion" cmsWidgetName="VehicleStyleQuestion" />
</div>
</div> </div>
</div> </div>
</div> </div>

View file

@ -1,11 +1,18 @@
<template> <template>
<div class="container-fluid shadow rounded-3 p-0 position-relative"> <div class="container-fluid shadow rounded-3 p-2 position-relative make-tall px-5">
<funnelHeader cmsWidgetName="FunnelHeaderWidget" /> <funnelHeader cmsWidgetName="FunnelHeaderWidget" />
<div class="select-car"> <div class="select-car">
<div class="select-car-form rounded text-center"> <div class="select-car-form rounded text-center">
<vehicleBanner cmsWidgetName="VehicleBannerWidget" displayGenericVehicleImage /> <vehicleBanner cmsWidgetName="VehicleBannerWidget" displayGenericVehicleImage />
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" /> <funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" />
<yearQuestion v-model="selectedYear" ref="yearQuestion" cmsWidgetName="VehicleYearQuestion" /> <div class="fade-on-route-transition">
<yearQuestion
class="fade-on-route-transition"
v-model="selectedYear"
ref="yearQuestion"
cmsWidgetName="VehicleYearQuestion"
/>
</div>
</div> </div>
</div> </div>
</div> </div>

View file

@ -14,64 +14,110 @@
:displayGenericVehicleImage="false" :displayGenericVehicleImage="false"
/> />
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" /> <funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" />
<div class="row my-2"> <div class="fade-on-route-transition sub-container make-tall">
<div class="col"> <div class="row my-2">
<textboxQuestion <div class="col">
cmsWidgetName="VinNumber" <textboxQuestion
v-model="vin" cmsWidgetName="VinNumber"
inputId="vin" v-model="vin"
isRequired inputId="vin"
disableAutoFill isRequired
validationRules="vin-required|vin-format" disableAutoFill
:isDisabled="isVinFieldReadOnly" validationRules="vin-required|vin-format"
/> :isDisabled="isVinFieldReadOnly"
/>
</div>
</div> </div>
</div> <div class="row my-2">
<div class="row my-2"> <div class="col">
<div class="col"> <vinInformation />
<vinInformation /> </div>
</div> </div>
</div> <div class="row my-2">
<div class="row my-2"> <div class="col">
<div class="col"> <textboxQuestion
<textboxQuestion cmsWidgetName="ServiceZIP"
cmsWidgetName="ServiceZIP" v-model="zip"
v-model="zip" inputId="zip"
inputId="zip" mask="#####"
mask="#####" isRequired
isRequired disableAutoFill
disableAutoFill validationRules="zip-required"
validationRules="zip-required" />
/> </div>
</div> </div>
</div> <div class="row my-2">
<div class="row my-2"> <div class="col">
<div class="col"> <textboxQuestion
<textboxQuestion cmsWidgetName="EmailAddress"
cmsWidgetName="EmailAddress" v-model="email"
v-model="email" inputId="email"
inputId="email" isRequired
isRequired disableAutoFill
disableAutoFill validationRules="email-address-required|email-address-format"
validationRules="email-address-required|email-address-format" />
/> </div>
</div> </div>
<alert
class="my-3"
:manualHeadline="MatchedDifferentVehicleAlertHeader"
:manualCopy="MatchedDifferentVehicleAlertBody"
v-model="customAlertData"
v-if="matchedDifferentVehicle"
alertClass="alert-danger"
/>
<alert
class="my-3"
v-model="customAlertData"
v-if="noMatchAlert"
alertClass="alert-warning"
cmsWidgetName="NoMatchAlertWidget"
/>
<alert
class="my-3"
:manualHeadline="NoServiceZipHeader"
:manualCopy="NoServiceZipBody"
v-model="customAlertData"
v-if="noServiceZip"
alertClass="alert-warning"
/>
<alert
class="my-3"
v-model="customAlertData"
v-if="foundWindshieldAlert"
alertClass="alert-warning"
cmsWidgetName="FoundWindshieldAlert"
/>
<alert
class="my-3"
v-model="customAlertData"
v-if="vinNotFound"
alertClass="alert-warning"
cmsWidgetName="VinNotFound"
/>
<alert
class="my-3"
v-model="customAlertData"
v-if="perfectMatchNewVinAlert"
alertClass="alert-warning"
cmsWidgetName="PerfectMatchNewVinAlert"
/>
<funnelFooter
cmsWidgetName="FunnelFooterWidget"
ref="funnelFooter"
:isForwardActionDisabled="!meta.valid"
@back-clicked="backButtonAction"
@ForwardClicked="forwardButtonAction"
/>
</div> </div>
<alert <alert
class="my-3" class="my-3"
:manualHeadline="MatchedDifferentVehicleAlertHeader" :manualHeadline="MatchedDifferentVehicleAlertHeader"
:manualCopy="MatchedDifferentVehicleAlertBody" :manualCopy="MatchedDifferentVehicleAlertBody"
v-model="customAlertData" v-model="customAlertData"
v-if="matchedDifferentVehicle" v-if="isCarIdDifferent"
alertClass="alert-danger" alertClass="alert-danger"
/> />
<alert
class="my-3"
v-model="customAlertData"
v-if="noMatchAlert"
alertClass="alert-warning"
cmsWidgetName="NoMatchAlertWidget"
/>
<alert <alert
class="my-3" class="my-3"
:manualHeadline="NoServiceZipHeader" :manualHeadline="NoServiceZipHeader"
@ -80,13 +126,6 @@
v-if="noServiceZip" v-if="noServiceZip"
alertClass="alert-warning" alertClass="alert-warning"
/> />
<alert
class="my-3"
v-model="customAlertData"
v-if="foundWindshieldAlert"
alertClass="alert-warning"
cmsWidgetName="FoundWindshieldAlert"
/>
<alert <alert
class="my-3" class="my-3"
v-model="customAlertData" v-model="customAlertData"
@ -98,7 +137,7 @@
class="my-3" class="my-3"
v-model="customAlertData" v-model="customAlertData"
v-if="perfectMatchNewVinAlert" v-if="perfectMatchNewVinAlert"
alertClass="alert-warning" alertClass="alert-success"
cmsWidgetName="PerfectMatchNewVinAlert" cmsWidgetName="PerfectMatchNewVinAlert"
/> />
<funnelFooter <funnelFooter
@ -175,44 +214,39 @@ export default {
vm.setCmsContent(resultMap.cmsContent); vm.setCmsContent(resultMap.cmsContent);
}); });
}, },
props: {
validationRules: String,
},
data() { data() {
return { return {
matchedDifferentVehicle: false, isCarIdDifferent: false,
noMatchAlert: false,
noServiceZip: false, noServiceZip: false,
vinFound: false,
vinFoundReadOnly: false,
foundWindshieldAlert: false,
vinNotFound: false, vinNotFound: false,
perfectMatchNewVinAlert: false,
vin: this.getVinFromStore(), vin: this.getVinFromStore(),
zip: this.getZipFromStore(), zip: this.getZipFromStore(),
email: this.getEmailFromStore(), email: this.getEmailFromStore(),
customAlertData: {}, customAlertData: {},
isCarIdDifferent: false,
previouslyEnteredCarId: '', previouslyEnteredCarId: '',
invalidZip: '', invalidZip: '',
vinPopulatedOnPageLoad: this.getVinFromStore()?.length > 0,
}; };
}, },
computed: { computed: {
perfectMatchNewVinAlert() {
return this.vinPopulatedOnPageLoad && this.vin === this.getVinFromStore();
},
MatchedDifferentVehicleAlertHeader(){ MatchedDifferentVehicleAlertHeader(){
let text = this.getCmsContent("MatchedDifferentVehicle", const text = this.getCmsContent("MatchedDifferentVehicle",
"HeadlineText").replaceAll("{custom:damage}", getDamageString()); "HeadlineText").replaceAll("{custom:damage}", getDamageString());
return text; return text;
}, },
MatchedDifferentVehicleAlertBody(){ MatchedDifferentVehicleAlertBody(){
let text = this.getCmsContent("MatchedDifferentVehicle", const text = this.getCmsContent("MatchedDifferentVehicle",
"BodyText").replaceAll("{custom:damage}", getDamageString()).replaceAll("{custom:vinlookupYear}", this.customAlertData?.vehicleInfo?.year).replaceAll("{custom:vinlookupMake}", this.customAlertData?.vehicleInfo?.make).replaceAll("{custom:vinlookupModel}", "BodyText").replaceAll("{custom:damage}", getDamageString()).replaceAll("{custom:vinlookupYear}", this.customAlertData?.vehicleInfo?.year).replaceAll("{custom:vinlookupMake}", this.customAlertData?.vehicleInfo?.make).replaceAll("{custom:vinlookupModel}",
this.customAlertData?.vehicleInfo?.model); this.customAlertData?.vehicleInfo?.model);
return text; return text;
}, },
NoServiceZipHeader(){ NoServiceZipHeader(){
let text = this.getCmsContent("NoServiceZipWidget", "HeadlineText").replaceAll("{custom:serviceZip}", this.invalidZip); const text = this.getCmsContent("NoServiceZipWidget", "HeadlineText").replaceAll("{custom:serviceZip}", this.invalidZip);
return text; return text;
}, },
@ -288,7 +322,7 @@ export default {
this.isVinValid = true; this.isVinValid = true;
this.isSelectedGlassAvailableForVehicle = await isGlassAvailableForCarId(vehicleLookup.data.carId); this.isSelectedGlassAvailableForVehicle = await isGlassAvailableForCarId(vehicleLookup.data.carId);
this.$refs.funnelFooter.removeLoader(); this.$refs.funnelFooter.removeLoader();
this.matchedDifferentVehicle = true; this.isCarIdDifferent = true;
return; return;
} }
this.updateStore(vehicleLookup.data); this.updateStore(vehicleLookup.data);

View file

@ -102,19 +102,11 @@ const routingTable = [
maps: [ maps: [
{ {
scenario: navigationScenarios.CLICKED_BACK, scenario: navigationScenarios.CLICKED_BACK,
destinationFmgPageValue: fmgPageValues.REVEAL, destinationFmgPageValue: fmgPageValues.ESTIMATE,
},
{
scenario: navigationScenarios.CLICKED_BACK_WITH_VIN,
destinationFmgPageValue: fmgPageValues.VEHICLE_DAMAGE,
},
{
scenario: navigationScenarios.VIN_LOOKUP,
destinationFmgPageValue: fmgPageValues.PART_QUESTIONS,
}, },
{ {
scenario: navigationScenarios.CLICKED_FORWARD, scenario: navigationScenarios.CLICKED_FORWARD,
destinationFmgPageValue: fmgPageValues.ESTIMATE, destinationFmgPageValue: fmgPageValues.VEHICLE_DAMAGE,
} }
], ],
}, },
@ -157,7 +149,7 @@ const routingTable = [
{ {
scenario: navigationScenarios.CLICKED_FORWARD, scenario: navigationScenarios.CLICKED_FORWARD,
destinationFmgPageValue: fmgPageValues.VEHICLE_DAMAGE, destinationFmgPageValue: fmgPageValues.VEHICLE_DAMAGE,
}, },
], ],
}, },
{fmgPageValue: fmgPageValues.ESTIMATE, {fmgPageValue: fmgPageValues.ESTIMATE,

View file

@ -144,17 +144,17 @@ export const mutations = {
updateRegistrationAddress(state, registrationAddress){ updateRegistrationAddress(state, registrationAddress){
state.order.vehicle.registration.address = registrationAddress; state.order.vehicle.registration.address = registrationAddress;
}, },
updateServiceLocationZipCode(state, serviceLocationZipCode){ updateServiceLocationZip(state, serviceLocationZip){
state.order.serviceLocation.zipCode = serviceLocationZipCode; state.order.vehicle.registration.zip = serviceLocationZip;
}, },
updateRegistrationCity(state, serviceCity){ updateRegistrationCity(state, serviceCity){
state.order.serviceLocation.city = serviceCity; state.order.vehicle.registration.city = serviceCity;
}, },
updateRegistrationFirstName(state, firstName){ updateRegistrationFirstName(state, firstName){
state.order.serviceLocation.firstName = firstName; state.order.vehicle.registration.firstName = firstName;
}, },
updateRegistrationLastName(state, lastName){ updateRegistrationLastName(state, lastName){
state.order.serviceLocation.lastName = lastName; state.order.vehicle.registration.lastName = lastName;
}, },
updateCustomerEmailAddress(state, customerEmailAddress){ updateCustomerEmailAddress(state, customerEmailAddress){
state.order.customer.emailAddress = customerEmailAddress; state.order.customer.emailAddress = customerEmailAddress;

View file

@ -9,4 +9,22 @@
.fade-enter-from, .fade-enter-from,
.fade-leave-to { .fade-leave-to {
opacity: 0; opacity: 0;
}
.route-fade-enter-active .fade-on-route-transition {
transition: opacity 0.8s ease;
}
.route-fade-leave-active .fade-on-route-transition {
transition: opacity 0.3s ease;
}
.route-fade-enter-from .fade-on-route-transition,
.route-fade-leave-to .fade-on-route-transition {
/*
Hack around a Chrome 96 bug in handling nested opacity transitions.
This is not needed in other browsers or Chrome 99+ where the bug
has been fixed.
*/
opacity: 0.001;
} }

View file

@ -26,6 +26,15 @@ body {
overflow-x: hidden; overflow-x: hidden;
} }
.sub-container{
&.make-tall {
height: 100%;
width: 100%;
display: flex;
flex-direction: column;
}
}
.sr-only { .sr-only {
position: absolute; position: absolute;
left: -10000px; left: -10000px;