WIP claim and coverage page additions.
This commit is contained in:
parent
3f0c0513ac
commit
d54353538e
4 changed files with 27 additions and 196 deletions
|
|
@ -46,7 +46,7 @@
|
||||||
:maxlength="maxLength ? maxLength : '999'"
|
:maxlength="maxLength ? maxLength : '999'"
|
||||||
@focus="$emit('focus', $event.target.value)"
|
@focus="$emit('focus', $event.target.value)"
|
||||||
@keydown="keyDownHandler" />
|
@keydown="keyDownHandler" />
|
||||||
<button v-if="includeSearchIcon" type="submit" aria-label="Search button" />
|
<button v-if="includeSearchIcon" type="submit" aria-label="Search button" @click="focusSearchInput" />
|
||||||
<template v-if="includeImageQuestion">
|
<template v-if="includeImageQuestion">
|
||||||
<template v-if="!isDisabled">
|
<template v-if="!isDisabled">
|
||||||
<label class="camera-icon-input" v-show="!isImageProcessing">
|
<label class="camera-icon-input" v-show="!isImageProcessing">
|
||||||
|
|
@ -164,6 +164,10 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
focusSearchInput() { //Focus cursor in input when search icon is clicked
|
||||||
|
const field = document.querySelector('input');
|
||||||
|
field.focus();
|
||||||
|
},
|
||||||
async imageChanged(e) {
|
async imageChanged(e) {
|
||||||
let file = e.target.files[0];
|
let file = e.target.files[0];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -120,7 +120,7 @@ export default {
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.menu-modal-container {
|
.menu-modal-container {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
padding: 1.47rem 1rem 1.47rem 1.47rem;
|
padding: 1.47rem 0 1.47rem 1.47rem;
|
||||||
right: 0;
|
right: 0;
|
||||||
button {
|
button {
|
||||||
border: none;
|
border: none;
|
||||||
|
|
@ -186,7 +186,7 @@ export default {
|
||||||
}
|
}
|
||||||
.menu-modal-container {
|
.menu-modal-container {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
padding: 1.47rem 1rem 1.47rem 1.47rem;
|
padding: 1.47rem 0 1.47rem 1.47rem;
|
||||||
right: 0;
|
right: 0;
|
||||||
top: -5rem;
|
top: -5rem;
|
||||||
button {
|
button {
|
||||||
|
|
|
||||||
|
|
@ -9,111 +9,16 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-md-6 col-xl-4">
|
<div class="col-md-6 col-xl-4">
|
||||||
<vehicleBanner
|
|
||||||
cmsWidgetName="VehicleBannerWidget"
|
|
||||||
:displayGenericVehicleImage="false" />
|
|
||||||
|
|
||||||
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" />
|
<funnelSubHeader
|
||||||
|
cmsWidgetName="FunnelSubHeaderWidget"
|
||||||
|
class="mt-4" />
|
||||||
|
|
||||||
<textboxQuestion
|
<textboxQuestion
|
||||||
class="mb-2 mt-5"
|
class="mb-2 mt-5"
|
||||||
cmsWidgetName="VinNumberQuestionWidget"
|
cmsWidgetName="InsuranceCoQuestionWidget"
|
||||||
v-model="vin"
|
includeSearchIcon
|
||||||
customInputId="vin"
|
cornerStyle="rounded" />
|
||||||
isRequired
|
|
||||||
:validationRules="!vinPopulatedOnPageLoad ? 'vin-required|vin-format' : ''"
|
|
||||||
:isDisabled="vinPopulatedOnPageLoad"
|
|
||||||
maxLength="17"
|
|
||||||
:mask="vinMask"
|
|
||||||
includeImageQuestion
|
|
||||||
:imageQuestionSubmitHandler="getVinFromImage"
|
|
||||||
:maxFileSize="imageUploadMaxFileSize"
|
|
||||||
@image-lookup-error="displayVinScanAlert"
|
|
||||||
@image-validity-error="displayVinScanAlert"
|
|
||||||
data-test="vin-lookup-field"
|
|
||||||
ref="vinLookupQuestion" />
|
|
||||||
|
|
||||||
<alert
|
|
||||||
cmsWidgetName="AlertVinScanFailed"
|
|
||||||
v-if="displayVinScanFailedAlert"
|
|
||||||
alertClass="alert-danger" />
|
|
||||||
|
|
||||||
<vinInformation class="mb-4" />
|
|
||||||
|
|
||||||
<textboxQuestion
|
|
||||||
class="mb-4"
|
|
||||||
cmsWidgetName="ServiceZipQuestionWidget"
|
|
||||||
v-model="serviceZipCode"
|
|
||||||
customInputId="serviceZipCode"
|
|
||||||
mask="#####"
|
|
||||||
isRequired
|
|
||||||
validationRules="zip-required|zip-format" />
|
|
||||||
|
|
||||||
<textboxQuestion
|
|
||||||
cmsWidgetName="EmailAddressQuestionWidget"
|
|
||||||
v-model="emailAddress"
|
|
||||||
customInputId="emailAddress"
|
|
||||||
isRequired
|
|
||||||
validationRules="email-address-required|email-address-format" />
|
|
||||||
|
|
||||||
<textBlock cmsWidgetName="QuoteEmailTextBlockWidget" typeStyle="caption" />
|
|
||||||
|
|
||||||
<alert
|
|
||||||
ref="alertInvalidZip"
|
|
||||||
v-if="displayInvalidZipAlert"
|
|
||||||
class="my-4"
|
|
||||||
cmsWidgetName="AlertInvalidZipWidget"
|
|
||||||
alertClass="alert-danger"
|
|
||||||
v-bind:isDismissible="false" />
|
|
||||||
|
|
||||||
<alert
|
|
||||||
class="my-4"
|
|
||||||
:manualHeadline="AlertPerfectMatchInsuranceVerifiedHeader"
|
|
||||||
:manualCopy="AlertPerfectMatchInsuranceVerifiedBody"
|
|
||||||
v-model="customAlertData"
|
|
||||||
v-if="
|
|
||||||
vinPopulatedOnPageLoad &&
|
|
||||||
isInsuranceVerified &&
|
|
||||||
!displayInvalidZipAlert &&
|
|
||||||
!displayNonServiceableZipAlert
|
|
||||||
"
|
|
||||||
alertClass="alert-success" />
|
|
||||||
|
|
||||||
<alert
|
|
||||||
class="my-4"
|
|
||||||
:manualHeadline="AlertMatchedDifferentVehicleHeader"
|
|
||||||
:manualCopy="AlertMatchedDifferentVehicleBody"
|
|
||||||
v-model="customAlertData"
|
|
||||||
v-if="displayMatchedDifferentVehicleAlert"
|
|
||||||
alertClass="alert-warning" />
|
|
||||||
|
|
||||||
<alert
|
|
||||||
class="my-4"
|
|
||||||
:manualHeadline="AlertNonServiceableZipHeader"
|
|
||||||
:manualCopy="AlertNonServiceableZipBody"
|
|
||||||
v-model="customAlertData"
|
|
||||||
v-if="displayNonServiceableZipAlert"
|
|
||||||
alertClass="alert-danger" />
|
|
||||||
|
|
||||||
<alert
|
|
||||||
class="my-4"
|
|
||||||
v-model="customAlertData"
|
|
||||||
v-if="displayVinNotFoundAlert"
|
|
||||||
alertClass="alert-danger"
|
|
||||||
cmsWidgetName="AlertVinNotFoundWidget" />
|
|
||||||
|
|
||||||
<alert
|
|
||||||
class="my-4"
|
|
||||||
:manualHeadline="AlertPerfectMatchInsuranceNotVerifiedHeader"
|
|
||||||
:manualCopy="AlertPerfectMatchInsuranceNotVerifiedBody"
|
|
||||||
v-model="customAlertData"
|
|
||||||
v-if="
|
|
||||||
vinPopulatedOnPageLoad &&
|
|
||||||
!isInsuranceVerified &&
|
|
||||||
!displayInvalidZipAlert &&
|
|
||||||
!displayNonServiceableZipAlert
|
|
||||||
"
|
|
||||||
alertClass="alert-success" />
|
|
||||||
|
|
||||||
<navbar
|
<navbar
|
||||||
cmsWidgetName="FunnelFooterWidget"
|
cmsWidgetName="FunnelFooterWidget"
|
||||||
|
|
@ -131,12 +36,8 @@
|
||||||
// Components
|
// Components
|
||||||
import funnelHeader from "@/fmg-components/funnel-header/funnel-header";
|
import funnelHeader from "@/fmg-components/funnel-header/funnel-header";
|
||||||
import navbar from "@/fmg-components/nav-bar/nav-bar";
|
import navbar from "@/fmg-components/nav-bar/nav-bar";
|
||||||
import vehicleBanner from "@/fmg-components/vehicle-banner/vehicle-banner";
|
|
||||||
import funnelSubHeader from "@/fmg-components/funnel-sub-header/funnel-sub-header";
|
import funnelSubHeader from "@/fmg-components/funnel-sub-header/funnel-sub-header";
|
||||||
import alert from "@/ux-components/alert/alert";
|
|
||||||
import textboxQuestion from "@/digital-components/textbox-question/textbox-question";
|
import textboxQuestion from "@/digital-components/textbox-question/textbox-question";
|
||||||
import vinInformation from "@/layouts/vin-lookup/vin-information/vin-information";
|
|
||||||
import textBlock from "@/digital-components/text-block/text-block";
|
|
||||||
import loadingModal from "@/fmg-components/loading-modal/loading-modal.vue";
|
import loadingModal from "@/fmg-components/loading-modal/loading-modal.vue";
|
||||||
|
|
||||||
// Supporting files
|
// Supporting files
|
||||||
|
|
@ -234,17 +135,8 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
backButtonAction() {
|
backButtonAction() {
|
||||||
if (this.$store.getters.vehicle.vin) {
|
// route to move backwards
|
||||||
this.$router.navigateWithoutSaving(
|
this.$router.navigateWithoutSaving(this.navigationScenarios.CLICKED_BACK, this.$route);
|
||||||
this.navigationScenarios.CLICKED_BACK_WITH_VIN,
|
|
||||||
this.$route
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
this.$router.navigateWithoutSaving(
|
|
||||||
this.navigationScenarios.CLICKED_BACK,
|
|
||||||
this.$route
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
async forwardButtonAction() {
|
async forwardButtonAction() {
|
||||||
this.resetAlerts();
|
this.resetAlerts();
|
||||||
|
|
@ -425,88 +317,11 @@ export default {
|
||||||
mounted() {
|
mounted() {
|
||||||
this.attachCustomEvents();
|
this.attachCustomEvents();
|
||||||
},
|
},
|
||||||
computed: {
|
|
||||||
AlertMatchedDifferentVehicleHeader() {
|
|
||||||
return this.getCmsContent(
|
|
||||||
"AlertMatchedDifferentVehicleWidget",
|
|
||||||
"HeadlineText"
|
|
||||||
).replaceAll("{custom:damage}", getDamageString());
|
|
||||||
},
|
|
||||||
AlertMatchedDifferentVehicleBody() {
|
|
||||||
return this.getCmsContent("AlertMatchedDifferentVehicleWidget", "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);
|
|
||||||
},
|
|
||||||
AlertNonServiceableZipHeader() {
|
|
||||||
return this.getCmsContent("AlertNonServiceableZipWidget", "HeadlineText").replaceAll(
|
|
||||||
"{custom:serviceZip}",
|
|
||||||
this.serviceZipCode
|
|
||||||
);
|
|
||||||
},
|
|
||||||
AlertNonServiceableZipBody() {
|
|
||||||
return this.getCmsContent("AlertNonServiceableZipWidget", "BodyText");
|
|
||||||
},
|
|
||||||
AlertPerfectMatchInsuranceNotVerifiedHeader() {
|
|
||||||
return this.getCmsContent("AlertPerfectMatchInsuranceNotVerified", "HeadlineText");
|
|
||||||
},
|
|
||||||
AlertPerfectMatchInsuranceNotVerifiedBody() {
|
|
||||||
return this.getCmsContent(
|
|
||||||
"AlertPerfectMatchInsuranceNotVerified",
|
|
||||||
"BodyText"
|
|
||||||
).replaceAll("{custom:damage}", getDamageString());
|
|
||||||
},
|
|
||||||
AlertPerfectMatchInsuranceVerifiedHeader() {
|
|
||||||
return this.getCmsContent("AlertPerfectMatchInsuranceVerified", "HeadlineText");
|
|
||||||
},
|
|
||||||
AlertPerfectMatchInsuranceVerifiedBody() {
|
|
||||||
return this.getCmsContent("AlertPerfectMatchInsuranceVerified", "BodyText").replaceAll(
|
|
||||||
"{custom:damage}",
|
|
||||||
getIsWindshieldOnly()
|
|
||||||
);
|
|
||||||
},
|
|
||||||
isInsuranceVerified() {
|
|
||||||
return (
|
|
||||||
store.getters.payment.insuranceCoverage.isVerified ||
|
|
||||||
getFunnelCookie().HasDelayedClaimRegistration
|
|
||||||
);
|
|
||||||
},
|
|
||||||
vinMask() {
|
|
||||||
if (this.vinPopulatedOnPageLoad) {
|
|
||||||
const lastSixChars = this.vin.substring(11, this.vin.length);
|
|
||||||
return `!X!X!X!X!X!X!X!X!X!X!X${lastSixChars}`;
|
|
||||||
} else {
|
|
||||||
return "XXXXXXXXXXXXXXXXX";
|
|
||||||
}
|
|
||||||
},
|
|
||||||
imageUploadMaxFileSize() {
|
|
||||||
let kiloBytes = 5140;
|
|
||||||
|
|
||||||
return kiloBytes * 1028;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
vin() {
|
|
||||||
this.displayVinNotFoundAlert = false;
|
|
||||||
this.displayVinScanFailedAlert = false;
|
|
||||||
this.$refs.navbar.updateButtonText(
|
|
||||||
this.getCmsContent("FunnelFooterWidget", "ForwardButtonText")
|
|
||||||
);
|
|
||||||
},
|
|
||||||
serviceZipCode() {
|
|
||||||
this.displayNonServiceableZipAlert = false;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
components: {
|
components: {
|
||||||
funnelHeader,
|
funnelHeader,
|
||||||
navbar,
|
navbar,
|
||||||
vehicleBanner,
|
|
||||||
funnelSubHeader,
|
funnelSubHeader,
|
||||||
textboxQuestion,
|
textboxQuestion,
|
||||||
alert,
|
|
||||||
vinInformation,
|
|
||||||
textBlock,
|
|
||||||
Form,
|
Form,
|
||||||
loadingModal,
|
loadingModal,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -394,6 +394,18 @@ const routingTable = function (store) {
|
||||||
destinationFmgPageValue: fmgPageValues.INSURANCE,
|
destinationFmgPageValue: fmgPageValues.INSURANCE,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
},{
|
||||||
|
fmgPageValue: fmgPageValues.INSURANCE,
|
||||||
|
maps: [
|
||||||
|
{
|
||||||
|
scenario: navigationScenarios.CLICKED_BACK,
|
||||||
|
destinationFmgPageValue: fmgPageValues.QUOTE,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
scenario: navigationScenarios.CLICKED_FORWARD,
|
||||||
|
destinationFmgPageValue: fmgPageValues.SCHEDULE,
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fmgPageValue: fmgPageValues.SERVICE_LOCATION,
|
fmgPageValue: fmgPageValues.SERVICE_LOCATION,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue