fixed merge
This commit is contained in:
parent
e4f2fa9ea5
commit
aaf70410e2
1 changed files with 83 additions and 67 deletions
|
|
@ -1,35 +1,91 @@
|
||||||
<template>
|
<template>
|
||||||
<Form @submit="onSubmit" @invalid-submit="onInvalidSubmit" ref="theForm" v-slot="{ meta }">
|
<Form
|
||||||
<div class="container-fluid shadow rounded-3 p-2 position-relative make-tall px-5">
|
@submit="onSubmit"
|
||||||
<funnelHeader cmsWidgetName="FunnelHeaderWidget" />
|
@invalid-submit="onInvalidSubmit"
|
||||||
<vehicleBanner cmsWidgetName="VehicleBannerWidget" :displayGenericVehicleImage="false" />
|
ref="theForm"
|
||||||
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" />
|
v-slot="{ meta }"
|
||||||
<div class="row my-2">
|
>
|
||||||
<div class="col">
|
<div
|
||||||
<textboxQuestion cmsWidgetName="LicensePlateNumber" v-model="licensePlate" isRequired inputId="license_plate" validationRules="license-plate-required" />
|
class="container-fluid shadow rounded-3 p-2 position-relative make-tall px-5"
|
||||||
</div>
|
>
|
||||||
|
<funnelHeader cmsWidgetName="FunnelHeaderWidget" />
|
||||||
|
<vehicleBanner
|
||||||
|
cmsWidgetName="VehicleBannerWidget"
|
||||||
|
:displayGenericVehicleImage="false"
|
||||||
|
/>
|
||||||
|
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" />
|
||||||
|
<div class="row my-2">
|
||||||
|
<div class="col">
|
||||||
|
<textboxQuestion
|
||||||
|
cmsWidgetName="LicensePlateNumber"
|
||||||
|
v-model="licensePlate"
|
||||||
|
isRequired
|
||||||
|
inputId="license_plate"
|
||||||
|
validationRules="license-plate-required"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="row my-2">
|
</div>
|
||||||
<div class="col">
|
<div class="row my-2">
|
||||||
<textboxQuestion cmsWidgetName="RegistrationZip" v-model="registrationZip" inputId="zip" mask="#####" validationRules="zip-required" />
|
<div class="col">
|
||||||
</div>
|
<textboxQuestion
|
||||||
|
cmsWidgetName="RegistrationZip"
|
||||||
|
v-model="registrationZip"
|
||||||
|
inputId="zip"
|
||||||
|
mask="#####"
|
||||||
|
validationRules="zip-required"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="row my-2">
|
</div>
|
||||||
<div class="col">
|
<div class="row my-2">
|
||||||
<textboxQuestion cmsWidgetName="EmailAddress" v-model="email" inputId="email" validationRules="email-address-required|email-address-format" />
|
<div class="col">
|
||||||
</div>
|
<textboxQuestion
|
||||||
|
cmsWidgetName="EmailAddress"
|
||||||
|
v-model="email"
|
||||||
|
inputId="email"
|
||||||
|
validationRules="email-address-required|email-address-format"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<alert class="my-3" :manualHeadline="NoServiceZipHeader" :manualCopy="NoServiceZipBody" v-if="!isRegistrationZipServicable && isVinValid && !isCarIdDifferent" alertClass="alert-danger" />
|
</div>
|
||||||
<div class="row my-2">
|
<alert
|
||||||
<div class="col">
|
class="my-3"
|
||||||
<textboxQuestion v-if="!isRegistrationZipServicable" cmsWidgetName="ServiceZip" v-model="serviceZip" inputId="serviceZip" validationRules="zip-required" />
|
:manualHeadline="NoServiceZipHeader"
|
||||||
</div>
|
:manualCopy="NoServiceZipBody"
|
||||||
|
v-if="!isRegistrationZipServicable && isVinValid && !isCarIdDifferent"
|
||||||
|
alertClass="alert-danger"
|
||||||
|
/>
|
||||||
|
<div class="row my-2">
|
||||||
|
<div class="col">
|
||||||
|
<textboxQuestion
|
||||||
|
v-if="!isRegistrationZipServicable"
|
||||||
|
cmsWidgetName="ServiceZip"
|
||||||
|
v-model="serviceZip"
|
||||||
|
inputId="serviceZip"
|
||||||
|
validationRules="zip-required"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<alert class="my-3" cmsWidgetName="NoMatchAlertWidget" v-if="!isVinValid" alertClass="alert-danger" />
|
</div>
|
||||||
<alert class="my-3" :manualHeadline="MatchedDifferentVehicleAlertHeader" :manualCopy="MatchedDifferentVehicleAlertBody" v-if="isCarIdDifferent" alertClass="alert-warning" />
|
<alert
|
||||||
<funnelFooter ref="funnelFooter" cmsWidgetName="FunnelFooterWidget" :isForwardActionDisabled="!meta.valid" @back-clicked="backButtonAction" @ForwardClicked="forwardButtonAction" />
|
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>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
@ -131,46 +187,6 @@ export default {
|
||||||
mounted() {
|
mounted() {
|
||||||
this.attachCustomEvents();
|
this.attachCustomEvents();
|
||||||
},
|
},
|
||||||
computed: {
|
|
||||||
MatchedDifferentVehicleAlertHeader() {
|
|
||||||
let text = this.getCmsContent(
|
|
||||||
"MatchedDifferentVehicleAlertWidget",
|
|
||||||
"HeadlineText"
|
|
||||||
).replaceAll("{custom:damage}", getDamageString());
|
|
||||||
|
|
||||||
// Settle promises and get results
|
|
||||||
const promiseResultMap = [{
|
|
||||||
resultKey: "cmsContent",
|
|
||||||
promise: cmsContentPromise,
|
|
||||||
}, ];
|
|
||||||
|
|
||||||
const resultMap = await settleAllPromises(promiseResultMap);
|
|
||||||
|
|
||||||
// Call the "next" function to complete the transition to this page.
|
|
||||||
next((vm) => {
|
|
||||||
vm.setCmsContent(resultMap.cmsContent);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
validationRules: String,
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
isRegistrationZipServicable: true,
|
|
||||||
isVinValid: true,
|
|
||||||
isCarIdDifferent: false,
|
|
||||||
licensePlate: this.getLicensePlateFromStore(),
|
|
||||||
registrationZip: this.getRegistrationZipFromStore(),
|
|
||||||
email: this.getEmailFromStore(),
|
|
||||||
serviceZip: this.getServiceZipFromStore(),
|
|
||||||
previouslyEnteredCarId: "",
|
|
||||||
customAlertData: {},
|
|
||||||
isSelectedGlassAvailableForVehicle: true,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.attachCustomEvents();
|
|
||||||
},
|
|
||||||
computed: {
|
computed: {
|
||||||
MatchedDifferentVehicleAlertHeader() {
|
MatchedDifferentVehicleAlertHeader() {
|
||||||
let text = this.getCmsContent(
|
let text = this.getCmsContent(
|
||||||
|
|
@ -382,5 +398,5 @@ export default {
|
||||||
alert,
|
alert,
|
||||||
funnelFooter,
|
funnelFooter,
|
||||||
},
|
},
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue